1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
samba-mirror/ctdb/tests/simple/28_zero_eventscripts.sh
Amitay Isaacs 0869501577 ctdb-tests: Do not remove event script dir before shutting down ctdb
When the test is over, the exit_hook will remove the temporary event
script directory and then CTDB is restarted.  Explicitly shutting down
CTDB ensures that event script directory is not removed while CTDB is
still running.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-12-16 08:42:32 +01:00

43 lines
761 B
Bash
Executable File

#!/bin/bash
test_info()
{
cat <<EOF
Check that CTDB operated correctly if there are 0 event scripts
This test only does anything with local daemons. On a real cluster it
has no way of updating configuration.
EOF
}
. "${TEST_SCRIPTS_DIR}/integration.bash"
ctdb_test_init "$@"
set -e
cluster_is_healthy
if [ -z "$TEST_LOCAL_DAEMONS" ] ; then
echo "SKIPPING this test - only runs against local daemons"
exit 0
fi
# Reset configuration
ctdb_restart_when_done
daemons_stop
echo "Starting CTDB with an empty eventscript directory..."
empty_dir=$(mktemp -d --tmpdir="$TEST_VAR_DIR")
ctdb_test_exit_hook_add "rmdir $empty_dir"
CTDB_EVENT_SCRIPT_DIR="$empty_dir" daemons_start
wait_until_ready
ps_ctdbd
echo "Good, that seems to work!"
daemons_stop