zeek/testing/btest/scripts/base/frameworks/notice/suppression-disable.bro
Jon Siwek 556b88e322 Tweaking notice suppression disable and notice policy order tests.
They should be less sensitive to script-layer changes now.
2011-10-14 10:47:32 -05:00

25 lines
594 B
Text

# @TEST-EXEC: bro -b %INPUT
# The "Test_Notice" should be logged twice
# @TEST-EXEC: test `grep Test_Notice notice.log | wc -l` -eq 2
@load base/frameworks/notice
redef enum Notice::Type += {
Test_Notice,
};
redef Notice::not_suppressed_types += { Test_Notice };
# The second notice needs to be scheduled due to how the notice framework
# uses the event queue.
event second_notice()
{
NOTICE([$note=Test_Notice, $msg="another test", $identifier="static"]);
}
event bro_init()
{
NOTICE([$note=Test_Notice, $msg="test", $identifier="static"]);
schedule 1msec { second_notice() };
}