mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00

This also installs symlinks from "zeek" and "bro-config" to a wrapper script that prints a deprecation warning. The btests pass, but this is still WIP. broctl renaming is still missing. #239
43 lines
785 B
Text
43 lines
785 B
Text
# @TEST-EXEC: btest-bg-run master "zeek -b %INPUT >out"
|
|
# @TEST-EXEC: btest-bg-wait 60
|
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-sort btest-diff master/out
|
|
|
|
redef exit_only_after_terminate = T;
|
|
|
|
global query_timeout = 1sec;
|
|
|
|
global h: opaque of Broker::Store;
|
|
|
|
event done()
|
|
{
|
|
terminate();
|
|
}
|
|
|
|
event zeek_init()
|
|
{
|
|
h = Broker::create_master("master");
|
|
Broker::put(h, "one", "110");
|
|
Broker::put(h, "two", 223);
|
|
|
|
when ( local res1 = Broker::get(h, "one") )
|
|
{
|
|
local s = (res1$result as string);
|
|
print "string", s;
|
|
}
|
|
timeout query_timeout
|
|
{
|
|
print "timeout";
|
|
}
|
|
|
|
when ( local res2 = Broker::get(h, "two") )
|
|
{
|
|
local c = (res2$result as count);
|
|
print "count", c;
|
|
}
|
|
timeout query_timeout
|
|
{
|
|
print "timeout";
|
|
}
|
|
|
|
schedule 2secs { done() };
|
|
}
|