ctdb/tests/simple: Local daemons version of setup_ctdb() overrides
authorMartin Schwenke <martin@meltin.net>
Thu, 28 Nov 2013 06:27:06 +0000 (17:27 +1100)
committerMichael Adam <obnox@samba.org>
Wed, 4 Dec 2013 23:41:50 +0000 (00:41 +0100)
setup_ctdb() doesn't need to do anything on a cluster.  To avoid a
conditional, just override it for local daemons.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/tests/scripts/integration.bash
ctdb/tests/simple/scripts/local_daemons.bash

index 446c663bee324d05586e664c5fac297f43b4b39b..c13ee1f60275ff2ae8a52eba02b651bd854dd6fb 100644 (file)
@@ -449,11 +449,10 @@ _restart_ctdb ()
     fi
 }
 
+# Nothing needed for a cluster.  Override for local daemons.
 setup_ctdb ()
 {
-    if [ -n "$CTDB_NODES_SOCKETS" ] ; then
-       daemons_setup
-    fi
+    :
 }
 
 restart_ctdb ()
index 0bc62c9dd0418f17226dcd117d63446bbdcabd79..b286b4d5b5c1edef010514198aa18ed6a3c62c75 100644 (file)
@@ -39,7 +39,7 @@ daemons_stop ()
     rm -rf "${TEST_VAR_DIR}/test.db"
 }
 
-daemons_setup ()
+setup_ctdb ()
 {
     mkdir -p "${TEST_VAR_DIR}/test.db/persistent"