mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 20:48:21 +00:00
DHCP: Adding unit tests.
This commit is contained in:
parent
0f1b0e75b7
commit
1786a3b92d
10 changed files with 68 additions and 2 deletions
|
@ -0,0 +1,6 @@
|
|||
# This tests that DHCP leases are logged in dhcp.log
|
||||
# The trace has a message of each DHCP message type,
|
||||
# but only one lease should show up in the logs.
|
||||
|
||||
# @TEST-EXEC: bro -r $TRACES/dhcp/dhcp.trace %INPUT
|
||||
# @TEST-EXEC: btest-diff dhcp.log
|
5
testing/btest/scripts/base/protocols/dhcp/inform.test
Normal file
5
testing/btest/scripts/base/protocols/dhcp/inform.test
Normal file
|
@ -0,0 +1,5 @@
|
|||
# DHCPINFORM leases are special-cased in the code.
|
||||
# This tests that those leases are correctly logged.
|
||||
|
||||
# @TEST-EXEC: bro -r $TRACES/dhcp/dhcp_inform.trace %INPUT
|
||||
# @TEST-EXEC: btest-diff dhcp.log
|
|
@ -0,0 +1,8 @@
|
|||
# This tests that the known_devices log is created,
|
||||
# that devices are logged by MAC address, and that
|
||||
# the DHCP hostname is added, if available.
|
||||
|
||||
# @TEST-EXEC: bro -r $TRACES/dhcp/dhcp.trace -r $TRACES/dhcp/dhcp_inform.trace %INPUT
|
||||
# @TEST-EXEC: btest-diff known_devices.log
|
||||
|
||||
@load policy/protocols/dhcp/known-devices-and-hostnames
|
Loading…
Add table
Add a link
Reference in a new issue