mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
testing/btest/*js: Comment all @TEST lines
This commit is contained in:
parent
86249db2a3
commit
51f504b38f
4 changed files with 15 additions and 14 deletions
|
@ -15,8 +15,8 @@ zeek.on('file_state_remove', (f) => {
|
|||
f.info.from_js = "Hello from JavaScript";
|
||||
});
|
||||
|
||||
@TEST-START-FILE ext.zeek
|
||||
// @TEST-START-FILE ext.zeek
|
||||
redef record Files::Info += {
|
||||
from_js: string &log &optional;
|
||||
};
|
||||
@TEST-END-FILE
|
||||
// @TEST-END-FILE
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* @TEST-EXEC: zeek -b -Cr $TRACES/http/get.trace main.zeek LogAscii::use_json=T
|
||||
* @TEST-EXEC: btest-diff http.log
|
||||
*/
|
||||
@TEST-START-FILE main.zeek
|
||||
// @TEST-START-FILE main.zeek
|
||||
@load base/protocols/http
|
||||
|
||||
# Extending log records only works in Zeek script.
|
||||
|
@ -14,9 +14,9 @@ redef record HTTP::Info += {
|
|||
|
||||
# Load the JavaScript pieces
|
||||
@load ./main.js
|
||||
@TEST-END-FILE
|
||||
// @TEST-END-FILE
|
||||
|
||||
@TEST-START-FILE main.js
|
||||
// @TEST-START-FILE main.js
|
||||
const crypto = require('crypto');
|
||||
|
||||
/*
|
||||
|
@ -27,4 +27,4 @@ const crypto = require('crypto');
|
|||
zeek.on('http_request', { priority: -10 }, (c, method, orig_URI, escaped_URI, version) => {
|
||||
c.http.uri_sha256 = crypto.createHash('sha256').update(orig_URI).digest().toString('hex');
|
||||
});
|
||||
@TEST-END-FILE
|
||||
// @TEST-END-FILE
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
* @TEST-EXEC: zeek-cut < intel.log > intel.log.noheader
|
||||
* @TEST-EXEC: TEST_DIFF_CANONIFIER= btest-diff intel.log.noheader
|
||||
*
|
||||
* Following the intel file that we load via Intel::insert().
|
||||
@TEST-START-FILE intel.json_lines
|
||||
*/
|
||||
|
||||
// Following the intel file that we load via Intel::insert().
|
||||
// @TEST-START-FILE intel.json_lines
|
||||
{"indicator": "141.142.228.5", "indicator_type": "Intel::ADDR", "meta": {"source": "json1"}}
|
||||
{"indicator": "bro.org", "indicator_type": "Intel::DOMAIN", "meta": {"source": "json2"}}
|
||||
@TEST-END-FILE
|
||||
*/
|
||||
// @TEST-END-FILE
|
||||
const fs = require('fs');
|
||||
|
||||
zeek.on('zeek_init', () => {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* @TEST-EXEC: zeek-cut -m ts uid id.orig_h id.resp_h new_field < http.log > http.log.cut
|
||||
* @TEST-EXEC: btest-diff http.log.cut
|
||||
*/
|
||||
@TEST-START-FILE main.zeek
|
||||
// @TEST-START-FILE main.zeek
|
||||
@load base/protocols/http
|
||||
|
||||
redef record HTTP::Info += {
|
||||
|
@ -15,9 +15,9 @@ redef record HTTP::Info += {
|
|||
|
||||
# Load the JavaScript pieces
|
||||
@load ./main.js
|
||||
@TEST-END-FILE
|
||||
// @TEST-END-FILE
|
||||
|
||||
@TEST-START-FILE main.js
|
||||
// @TEST-START-FILE main.js
|
||||
zeek.hook('Log::log_stream_policy', (rec, id) => {
|
||||
if ( id != "HTTP::LOG" )
|
||||
return;
|
||||
|
@ -50,4 +50,4 @@ setTimeout(() => {
|
|||
console.error('force exit');
|
||||
process.exit(1);
|
||||
}, 5000);
|
||||
@TEST-END-FILE
|
||||
// @TEST-END-FILE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue