File: install-networks.test

package info (click to toggle)
zeekctl 2.2.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,544 kB
  • sloc: python: 5,639; sh: 1,374; makefile: 71; awk: 24
file content (36 lines) | stat: -rw-r--r-- 935 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Test that the install command creates local-networks.zeek file with correct
# contents.
#
# @TEST-EXEC: bash %INPUT
# @TEST-EXEC: btest-diff ipv4-v6.out
# @TEST-EXEC: btest-diff ipv4.out
# @TEST-EXEC: btest-diff ipv6.out

. zeekctl-test-setup

### Test a mix of IPv4 and IPv6 networks
while read line; do installfile $line; done << EOF
etc/networks.cfg__ipv4_ipv6
EOF

zeekctl install

cp $ZEEKCTL_INSTALL_PREFIX/spool/installed-scripts-do-not-touch/auto/local-networks.zeek ipv4-v6.out

### Test IPv4 networks only
while read line; do installfile $line; done << EOF
etc/networks.cfg__ipv4
EOF

zeekctl install

cp $ZEEKCTL_INSTALL_PREFIX/spool/installed-scripts-do-not-touch/auto/local-networks.zeek ipv4.out

### Test IPv6 networks only
while read line; do installfile $line; done << EOF
etc/networks.cfg__ipv6
EOF

zeekctl install

cp $ZEEKCTL_INSTALL_PREFIX/spool/installed-scripts-do-not-touch/auto/local-networks.zeek ipv6.out