CVE-2016-0771: tests/dns: Remove dependencies on env variables
[Samba.git] / ctdb / tests / simple / 32_ctdb_enable.sh
blobdddf8813313af352f18e26488288786f0b50cd4b
1 #!/bin/bash
3 test_info()
5 cat <<EOF
6 Verify the operation of 'ctdb enable'.
8 After disabling a node...
10 * Verify that the status of a re-enabled node changes back to 'OK'.
12 * Verify that some public IP addreses are rebalanced to a re-enabled
13 node.
15 This test does not do any network level checks to make sure IP
16 addresses are actually on interfaces. It just consults "ctdb ip".
17 EOF
20 . "${TEST_SCRIPTS_DIR}/integration.bash"
22 ctdb_test_init "$@"
24 ########################################
26 set -e
28 cluster_is_healthy
30 select_test_node_and_ips
32 echo "Disabling node $test_node"
33 try_command_on_node 1 $CTDB disable -n $test_node
34 wait_until_node_has_status $test_node disabled
36 echo "Waiting for IPs to no longer be hosted on node ${test_node}"
37 wait_until_ips_are_on_node '!' $test_node $test_node_ips
39 echo "Re-enabling node $test_node"
40 try_command_on_node 1 $CTDB enable -n $test_node
41 wait_until_node_has_status $test_node enabled
42 wait_until_node_has_some_ips "$test_node"