Patrick Kelley 8fd444092b initial
2025-05-07 15:35:15 -04:00

35 lines
1.2 KiB
Plaintext

# Test that the deploy command can start all nodes before any other zeekctl
# command is run. Test that the deploy command works when there is a mix of
# running and stopped nodes. Test that the deploy command returns exit status
# of zero when all nodes started successfully.
#
# @TEST-EXEC: bash %INPUT
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff deploy1.out
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-status-output btest-diff status1.out
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-status-output btest-diff status2.out
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff deploy2.out
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-status-output btest-diff status3.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 that deploy works without first running any other zeekctl command
zeekctl deploy > deploy1.out
zeekctl status > status1.out
# stop one node
zeekctl stop worker-1
! zeekctl status > status2.out
# test that deploy works when there is a mix of running/stopped nodes
zeekctl deploy > deploy2.out
zeekctl status > status3.out
zeekctl stop