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
|