ctdb-tests: Use wait_until_node_has_no_ips() in some tests
authorMartin Schwenke <martin@meltin.net>
Mon, 8 Oct 2018 00:13:15 +0000 (11:13 +1100)
committerAmitay Isaacs <amitay@samba.org>
Tue, 6 Nov 2018 06:16:15 +0000 (07:16 +0100)
This strengthens those tests to ensure that released IPs aren't
replaced with others.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/simple/32_ctdb_enable.sh
ctdb/tests/simple/42_ctdb_continue.sh

index dddf8813313af352f18e26488288786f0b50cd4b..5933dc84c7a773d947f10896ef7ca52928cefdac 100755 (executable)
@@ -32,9 +32,7 @@ select_test_node_and_ips
 echo "Disabling node $test_node"
 try_command_on_node 1 $CTDB disable -n $test_node
 wait_until_node_has_status $test_node disabled
-
-echo "Waiting for IPs to no longer be hosted on node ${test_node}"
-wait_until_ips_are_on_node '!' $test_node $test_node_ips
+wait_until_node_has_no_ips "$test_node"
 
 echo "Re-enabling node $test_node"
 try_command_on_node 1 $CTDB enable -n $test_node
index b75759fce4af55a387b16582112c6e2c9df45981..510dfec2bd24c4f7551dacec2c9dd233f2aa9ff1 100755 (executable)
@@ -31,7 +31,7 @@ select_test_node_and_ips
 echo "Stopping node ${test_node}..."
 try_command_on_node 1 $CTDB stop -n $test_node
 wait_until_node_has_status $test_node stopped
-wait_until_ips_are_on_node '!' $test_node $test_node_ips
+wait_until_node_has_no_ips "$test_node"
 
 echo "Continuing node $test_node"
 try_command_on_node 1 $CTDB continue -n $test_node