ctdb-tests: Don't used daemons_start()/daemons_stop() directly in tests
authorMartin Schwenke <martin@meltin.net>
Thu, 27 Sep 2018 06:02:54 +0000 (16:02 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 8 Oct 2018 00:46:22 +0000 (02:46 +0200)
There are too many functions to start/stop daemons.  Simplify this.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/simple/19_ip_takeover_noop.sh
ctdb/tests/simple/28_zero_eventscripts.sh

index f369988274e28e8bbef5c416c254dddaded8fa06..670e33e3408c6e8bec4c13428331be4c238cdd80 100755 (executable)
@@ -31,11 +31,11 @@ ctdb_restart_when_done
 
 select_test_node_and_ips
 
-daemons_stop
+ctdb_stop_all
 
 echo "Starting CTDB with failover disabled..."
 setup_ctdb --disable-failover
-daemons_start
+ctdb_start_all
 
 wait_until_ready
 
@@ -53,11 +53,11 @@ EOF
 echo "GOOD: All IP addresses are unassigned"
 
 echo "----------------------------------------"
-daemons_stop
+ctdb_stop_all
 
 echo "Starting CTDB with an empty public addresses configuration..."
 setup_ctdb --no-public-addresses
-daemons_start
+ctdb_start_all
 
 wait_until_ready
 
index b360ab8768959d4fb4073cc09559d10292906fd7..ee976cba1078c87a3ba87bd083da93067ed3e6f9 100755 (executable)
@@ -26,14 +26,14 @@ fi
 # Reset configuration
 ctdb_restart_when_done
 
-daemons_stop
+ctdb_stop_all
 
 echo "Starting CTDB with an empty eventscript directory..."
 setup_ctdb --no-event-scripts
-daemons_start
+ctdb_start_all
 
 wait_until_ready
 
 echo "Good, that seems to work!"
 
-daemons_stop
+ctdb_stop_all