# Test that the stop command writes correct values to state database for # a cluster configuration. # # @TEST-REQUIRES: which sqlite3 # @TEST-EXEC: bash %INPUT # @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-state-db btest-diff out . zeekctl-test-setup while read line; do installfile $line; done << EOF etc/zeekctl.cfg__no_email etc/node.cfg__cluster bin/zeek__test EOF test ! -e $ZEEKCTL_INSTALL_PREFIX/spool/state.db zeekctl install zeekctl start zeekctl stop sqlite3 $ZEEKCTL_INSTALL_PREFIX/spool/state.db ".dump" > dump.out # Produce "key = value" output from the database dump. awk -F \' '{ if (NF == 5) { print $2, "=", $4 } }' dump.out | sort > out