File: install-layout-files.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 (40 lines) | stat: -rw-r--r-- 1,273 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
37
38
39
40
# Test that the install command installs either the standalone-layout.zeek or
# cluster-layout.zeek file, and that the contents of the file are correct.
#
# @TEST-EXEC: bash %INPUT
# @TEST-EXEC: btest-diff standalone
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-cluster-layout btest-diff no-logger
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-cluster-layout btest-diff logger
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-cluster-layout btest-diff two-loggers

. zeekctl-test-setup

# Test using a standalone config.
zeekctl install
cp $ZEEKCTL_INSTALL_PREFIX/spool/installed-scripts-do-not-touch/auto/standalone-layout.zeek standalone

clusterlayout=$ZEEKCTL_INSTALL_PREFIX/spool/installed-scripts-do-not-touch/auto/cluster-layout.zeek

# Install a cluster config with no logger nodes.
while read line; do installfile $line; done << EOF
etc/node.cfg__cluster
EOF

zeekctl install
cp ${clusterlayout} no-logger

# Install a cluster config with one logger node.
while read line; do installfile $line; done << EOF
etc/node.cfg__logger
EOF

zeekctl install
cp ${clusterlayout} logger

# Install a cluster config with two logger nodes.
while read line; do installfile $line; done << EOF
etc/node.cfg__two_loggers
EOF

zeekctl install
cp ${clusterlayout} two-loggers