ctdb-tests: Rationalise ctdb stop/continue/disable/enable simple tests
authorMartin Schwenke <martin@meltin.net>
Mon, 8 Oct 2018 00:33:08 +0000 (11:33 +1100)
committerAmitay Isaacs <amitay@samba.org>
Tue, 6 Nov 2018 06:16:15 +0000 (07:16 +0100)
The "continue" and "enable" tests are just extensions of the "stop"
and "disable" tests, so drop the latter 2.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/simple/31_ctdb_disable.sh [deleted file]
ctdb/tests/simple/32_ctdb_disable_enable.sh [moved from ctdb/tests/simple/32_ctdb_enable.sh with 61% similarity]
ctdb/tests/simple/41_ctdb_stop.sh [deleted file]
ctdb/tests/simple/42_ctdb_stop_continue.sh [moved from ctdb/tests/simple/42_ctdb_continue.sh with 62% similarity]

diff --git a/ctdb/tests/simple/31_ctdb_disable.sh b/ctdb/tests/simple/31_ctdb_disable.sh
deleted file mode 100755 (executable)
index e3bb5d6..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-test_info()
-{
-    cat <<EOF
-Verify the operation of 'ctdb disable'.
-
-* Verify that the status of the node changes to 'disabled'.
-
-* Verify that the IP addreses served by the disabled node are failed
-  over to other nodes.
-
-This test does not do any network level checks to make sure IP
-addresses are actually on interfaces.  It just consults "ctdb ip".
-EOF
-}
-
-. "${TEST_SCRIPTS_DIR}/integration.bash"
-
-ctdb_test_init "$@"
-
-set -e
-
-cluster_is_healthy
-
-# Reset configuration
-ctdb_restart_when_done
-
-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
-wait_until_ips_are_on_node '!' $test_node $test_node_ips
similarity index 61%
rename from ctdb/tests/simple/32_ctdb_enable.sh
rename to ctdb/tests/simple/32_ctdb_disable_enable.sh
index 5933dc84c7a773d947f10896ef7ca52928cefdac..f434abfd4cd671063f1c5763205ab2cc16425759 100755 (executable)
@@ -3,17 +3,7 @@
 test_info()
 {
     cat <<EOF
-Verify the operation of 'ctdb enable'.
-
-After disabling a node...
-
-* Verify that the status of a re-enabled node changes back to 'OK'.
-
-* Verify that some public IP addreses are rebalanced to a re-enabled
-  node.
-
-This test does not do any network level checks to make sure IP
-addresses are actually on interfaces.  It just consults "ctdb ip".
+Verify the operation of "ctdb disable" and "ctdb enable"
 EOF
 }
 
diff --git a/ctdb/tests/simple/41_ctdb_stop.sh b/ctdb/tests/simple/41_ctdb_stop.sh
deleted file mode 100755 (executable)
index e11fb0f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-test_info()
-{
-    cat <<EOF
-Verify the operation of the 'ctdb stop' command.
-
-* Verify that the status of the node changes to 'stopped'.
-
-* Verify that the public IP addresses that were being served by
-  the node are failed over to one of the other nodes.
-
-This test does not do any network level checks to make sure IP
-addresses are actually on interfaces.  It just consults "ctdb ip".
-EOF
-}
-
-. "${TEST_SCRIPTS_DIR}/integration.bash"
-
-ctdb_test_init "$@"
-
-set -e
-
-cluster_is_healthy
-
-# Reset configuration
-ctdb_restart_when_done
-
-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
similarity index 62%
rename from ctdb/tests/simple/42_ctdb_continue.sh
rename to ctdb/tests/simple/42_ctdb_stop_continue.sh
index 510dfec2bd24c4f7551dacec2c9dd233f2aa9ff1..04349e2d1538ee711f57c79098ab2aa91fb10446 100755 (executable)
@@ -3,15 +3,7 @@
 test_info()
 {
     cat <<EOF
-Verify the operation of the 'ctdb continue' command.
-
-After stopping a node...
-
-* Verify that the status of the node changes back to 'OK' and that
-  some public IP addresses move back to the node.
-
-This test does not do any network level checks to make sure IP
-addresses are actually on interfaces.  It just consults "ctdb ip".
+Verify the operation of "ctdb stop" and "ctdb continue"
 EOF
 }