mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 19:48:20 +00:00
Merge remote-tracking branch 'origin/topic/jsiwek/exec-module'
* origin/topic/jsiwek/exec-module: Exec module changes/fixes. Coverage test fixes and whitespace/doc tweaks. Update to make Dir::monitor watch inodes instead of file names. Updates to use new input framework mechanism to execute command line programs. Added Exec, Dir, and ActiveHTTP modules. BIT-1046 #merged. Conflicts: magic testing/btest/Baseline/coverage.default-load-baseline/canonified_loaded_scripts.log
This commit is contained in:
commit
e2f8fdc3f6
17 changed files with 629 additions and 8 deletions
28
testing/btest/scripts/base/utils/active-http.test
Normal file
28
testing/btest/scripts/base/utils/active-http.test
Normal file
|
@ -0,0 +1,28 @@
|
|||
# @TEST-REQUIRES: which httpd
|
||||
# @TEST-REQUIRES: which python
|
||||
#
|
||||
# @TEST-EXEC: btest-bg-run httpd python $SCRIPTS/httpd.py --max 1
|
||||
# @TEST-EXEC: sleep 3
|
||||
# @TEST-EXEC: btest-bg-run bro bro -b %INPUT
|
||||
# @TEST-EXEC: btest-bg-wait 15
|
||||
# @TEST-EXEC: btest-diff bro/.stdout
|
||||
|
||||
@load base/utils/active-http
|
||||
|
||||
redef exit_only_after_terminate = T;
|
||||
|
||||
event bro_init()
|
||||
{
|
||||
local req = ActiveHTTP::Request($url="localhost:32123");
|
||||
|
||||
when ( local resp = ActiveHTTP::request(req) )
|
||||
{
|
||||
print resp;
|
||||
terminate();
|
||||
}
|
||||
timeout 1min
|
||||
{
|
||||
print "HTTP request timeout";
|
||||
terminate();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue