]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Revert "ctdb-tests: Separate custom cluster startup from test initialisation"
authorMartin Schwenke <martin@meltin.net>
Wed, 22 Jul 2020 04:43:04 +0000 (14:43 +1000)
committerMartin Schwenke <martins@samba.org>
Wed, 22 Jul 2020 05:07:45 +0000 (05:07 +0000)
Fix missing Reviewed-by: tag.

This reverts commit e9df17b500146e62539feac66d0cd4b3ef7aa47a.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/INTEGRATION/failover/pubips.013.failover_noop.sh
ctdb/tests/INTEGRATION/simple/cluster.012.reclock_command.sh
ctdb/tests/INTEGRATION/simple/eventscripts.001.zero_scripts.sh
ctdb/tests/scripts/integration.bash

index 488243d62601053b131f4b70ca11d7cee7472bd3..1c13a3ce3c2c12bcabdb313a8765e840f346c33b 100755 (executable)
@@ -11,10 +11,10 @@ set -e
 
 ctdb_test_skip_on_cluster
 
-ctdb_test_init -n
-
 echo "Starting CTDB with failover disabled..."
-ctdb_nodes_start_custom -F
+ctdb_test_init -F
+
+cluster_is_healthy
 
 echo "Getting IP allocation..."
 try_command_on_node -v any "$CTDB ip all | tail -n +2"
@@ -30,7 +30,9 @@ echo "GOOD: All IP addresses are unassigned"
 echo "----------------------------------------"
 
 echo "Starting CTDB with an empty public addresses configuration..."
-ctdb_nodes_start_custom -P /dev/null
+ctdb_test_init -P /dev/null
+
+cluster_is_healthy
 
 echo "Trying explicit ipreallocate..."
 try_command_on_node any $CTDB ipreallocate
index d043c7e26150b75e5e8eb7867224f786db687a31..76be340d7cbf8794d1570405c2e1b255e8771736 100755 (executable)
@@ -12,9 +12,9 @@ set -e
 
 ctdb_test_skip_on_cluster
 
-ctdb_test_init -n
-
 echo "Starting CTDB with recovery lock command configured..."
-ctdb_nodes_start_custom -R
+ctdb_test_init -R
+
+cluster_is_healthy
 
 echo "Good, that seems to work!"
index 4fdf61cee2ddcf15c51350f53fe140903abc6b1e..fb1d031e9826e0e08fcbbd7eebee4e5c1fe13a86 100755 (executable)
@@ -9,8 +9,8 @@ set -e
 
 ctdb_test_skip_on_cluster
 
-ctdb_test_init -n
+ctdb_test_init --no-event-scripts
 
-ctdb_nodes_start_custom --no-event-scripts
+cluster_is_healthy
 
 echo "Good, that seems to work!"
index aa1554ee318df7cbb17aaf50cfe902112f69c354..2798d61f736dab836ebda3293838ea3e6ceb19dd 100644 (file)
@@ -88,37 +88,19 @@ ctdb_test_cleanup_pid_clear ()
        ctdb_test_cleanup_pid=""
 }
 
-# -n option means do not configure/start cluster
 ctdb_test_init ()
 {
        trap "ctdb_test_exit" 0
 
        ctdb_nodes_stop >/dev/null 2>&1 || true
 
-       if [ "$1" != "-n" ] ; then
-               echo "Configuring cluster..."
-               setup_ctdb || ctdb_test_error "Cluster configuration failed"
-
-               echo "Starting cluster..."
-               ctdb_init || ctdb_test_error "Cluster startup failed"
-       fi
-
-       echo  "*** SETUP COMPLETE AT $(date '+%F %T'), RUNNING TEST..."
-}
-
-ctdb_nodes_start_custom ()
-{
-       if ctdb_test_on_cluster ; then
-               ctdb_test_error "ctdb_nodes_start_custom() on real cluster"
-       fi
-
-       ctdb_nodes_stop >/dev/null 2>&1 || true
-
        echo "Configuring cluster..."
        setup_ctdb "$@" || ctdb_test_error "Cluster configuration failed"
 
        echo "Starting cluster..."
-       ctdb_init || ctdb_test_fail "Cluster startup failed"
+       ctdb_init || ctdb_test_error "Cluster startup failed"
+
+       echo  "*** SETUP COMPLETE AT $(date '+%F %T'), RUNNING TEST..."
 }
 
 ctdb_test_skip_on_cluster ()