ctdb-tests: Clean up tests to not expose script options
authorMartin Schwenke <martin@meltin.net>
Wed, 2 May 2018 08:38:41 +0000 (18:38 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 17 May 2018 02:04:31 +0000 (04:04 +0200)
The tests still use the script options but the event scripts no longer
see them exported from the test infrastructure.  Testing now depends
on the event scripts successfully fetching the options from the
configuration file.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/eventscripts/scripts/01.reclock.sh
ctdb/tests/eventscripts/scripts/local.sh

index 34f10a5a42a6ef80cfb5ea677447ca39b3ecab96..a7094317a11db24d8953a16586f5b1aa0702bfe1 100644 (file)
@@ -9,7 +9,7 @@ cleanup_reclock ()
 
 setup ()
 {
-       export CTDB_RECOVERY_LOCK="${EVENTSCRIPTS_TESTS_VAR_DIR}/rec.lock"
+       CTDB_RECOVERY_LOCK="${EVENTSCRIPTS_TESTS_VAR_DIR}/rec.lock"
 
        cat >>"${CTDB_BASE}/ctdb.conf" <<EOF
 [cluster]
index def4192d69c2fe92d66a05f4d638e9dd1dc2cf9b..d34135eba35cf54a991bc6ccdd8c41924a69e48e 100644 (file)
@@ -99,9 +99,9 @@ setup_script_options ()
 setup_dbdir ()
 {
        export CTDB_DBDIR_BASE="${EVENTSCRIPTS_TESTS_VAR_DIR}/db"
-       export CTDB_DBDIR="${CTDB_DBDIR_BASE}/volatile"
-       export CTDB_DBDIR_PERSISTENT="${CTDB_DBDIR_BASE}/persistent"
-       export CTDB_DBDIR_STATE="${CTDB_DBDIR_BASE}/state"
+       CTDB_DBDIR="${CTDB_DBDIR_BASE}/volatile"
+       CTDB_DBDIR_PERSISTENT="${CTDB_DBDIR_BASE}/persistent"
+       CTDB_DBDIR_STATE="${CTDB_DBDIR_BASE}/state"
        cat >>"${CTDB_BASE}/ctdb.conf" <<EOF
 [database]
        volatile database directory = ${CTDB_DBDIR}