mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 19:48:20 +00:00
Test, trace file, and baseline for testing the known-services policy script
This commit is contained in:
parent
c81f1889a5
commit
ebb4eb552a
5 changed files with 12725 additions and 0 deletions
24
testing/btest/Scripts/known-services-test.bro
Normal file
24
testing/btest/Scripts/known-services-test.bro
Normal file
|
@ -0,0 +1,24 @@
|
|||
|
||||
# Generate some output
|
||||
# @TEST-EXEC: bro -r %DIR/../traces/workshop.trace1.trace %INPUT tcp
|
||||
|
||||
|
||||
# Verify the log file, and stderr/out match the Baseline
|
||||
# @TEST-EXEC: btest-diff KNOWN_SERVICES
|
||||
# @TEST-EXEC: btest-diff .stderr
|
||||
# @TEST-EXEC: btest-diff .stdout
|
||||
|
||||
|
||||
# Load the script we're here to test
|
||||
@load known-services
|
||||
|
||||
# Make some changes to how it runs
|
||||
export {
|
||||
# Log everything, so we get some output
|
||||
redef KnownServices::logged_hosts=Enabled;
|
||||
}
|
||||
|
||||
# If necessary, can take setup action here as well
|
||||
event bro_init()
|
||||
{
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue