ctdb-tests: Use local_daemons.sh onnode for local daemons tests
authorMartin Schwenke <martin@meltin.net>
Thu, 5 Sep 2019 05:47:13 +0000 (15:47 +1000)
committerAmitay Isaacs <amitay@samba.org>
Tue, 24 Sep 2019 02:27:29 +0000 (02:27 +0000)
With some upcoming changes, the setting of CTDB_BASE becomes
problematic because it will be included unconditionally whereas it is
currently being conveniently and almost accidentally not include in
some contexts.

So, instead of trying to coerce onnode into behaving as desired, have
the local daemons tests use local_daemons.sh onnode directly.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/simple/scripts/local_daemons.bash

index 95af943f6d79daa7004a87c58f6935163a4410bf..07284f71286922344005f99f3644648f7c77694b 100644 (file)
@@ -12,9 +12,6 @@ fi
 
 ctdb_local_daemons="${helper} ${SIMPLE_TESTS_VAR_DIR}"
 
-# onnode will execute this, which fakes ssh against local daemons
-export ONNODE_SSH="${ctdb_local_daemons} ssh"
-
 #######################################
 
 setup_ctdb ()
@@ -74,5 +71,7 @@ restart_ctdb_1 ()
        start_ctdb_1 "$1"
 }
 
-# onnode just needs the nodes file, so use the common one
-export CTDB_BASE="$SIMPLE_TESTS_VAR_DIR"
+onnode ()
+{
+       $ctdb_local_daemons onnode "$@"
+}