mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
Adding test for alarm mail.
Can't test all the functionality, so skipping DNS lookup and the actual mailing via sendmail.
This commit is contained in:
parent
2dc04b2ce5
commit
dacc019f1f
2 changed files with 21 additions and 0 deletions
17
testing/btest/scripts/base/frameworks/notice/mail-alarms.bro
Normal file
17
testing/btest/scripts/base/frameworks/notice/mail-alarms.bro
Normal file
|
@ -0,0 +1,17 @@
|
|||
# @TEST-EXEC: bro -C -r $TRACES/web.trace %INPUT
|
||||
# @TEST-EXEC: btest-diff alarm-mail.txt
|
||||
|
||||
redef Notice::policy += { [$action = Notice::ACTION_ALARM, $priority = 1 ] };
|
||||
redef Notice::force_email_summaries = T;
|
||||
|
||||
redef enum Notice::Type += {
|
||||
Test_Notice,
|
||||
};
|
||||
|
||||
event connection_established(c: connection)
|
||||
{
|
||||
NOTICE([$note=Test_Notice, $conn=c, $msg="test", $identifier="static"]);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue