diff options
author | Martin Schwenke <martin@meltin.net> | 2018-03-22 14:39:45 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2018-03-28 02:57:21 +0200 |
commit | 1db96ce26e555f1faa879ea4b29816f4ab2eb1a7 (patch) | |
tree | 0cd4ed6a5bafb1a9763f0da5cc11ce968a899ac9 /ctdb | |
parent | 66cfddc61c77fa0eb7b8da05c34ae7eaf2596004 (diff) | |
download | samba-1db96ce26e555f1faa879ea4b29816f4ab2eb1a7.tar.gz |
ctdb-tests: Rename setup_config() to setup_tunable_config()
Drop the "CTDB_SET_" prefix from variable names and add it back for
now. When there is a better way of setting tunables then this
function will support that.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rwxr-xr-x | ctdb/tests/eventscripts/00.ctdb.setup.002.sh | 6 | ||||
-rwxr-xr-x | ctdb/tests/eventscripts/00.ctdb.setup.003.sh | 6 | ||||
-rwxr-xr-x | ctdb/tests/eventscripts/00.ctdb.setup.004.sh | 6 | ||||
-rw-r--r-- | ctdb/tests/eventscripts/scripts/00.ctdb.sh | 9 |
4 files changed, 16 insertions, 11 deletions
diff --git a/ctdb/tests/eventscripts/00.ctdb.setup.002.sh b/ctdb/tests/eventscripts/00.ctdb.setup.002.sh index e91f8d7e11c..fc1ec76996a 100755 --- a/ctdb/tests/eventscripts/00.ctdb.setup.002.sh +++ b/ctdb/tests/eventscripts/00.ctdb.setup.002.sh @@ -6,9 +6,9 @@ define_test "setup, known tunables in config" setup -setup_config <<EOF -CTDB_SET_MonitorInterval=5 -CTDB_SET_TDBMutexEnabled=0 +setup_tunable_config <<EOF +MonitorInterval=5 +TDBMutexEnabled=0 EOF required_result 0 <<EOF diff --git a/ctdb/tests/eventscripts/00.ctdb.setup.003.sh b/ctdb/tests/eventscripts/00.ctdb.setup.003.sh index 898a6835321..6b76ce9ff64 100755 --- a/ctdb/tests/eventscripts/00.ctdb.setup.003.sh +++ b/ctdb/tests/eventscripts/00.ctdb.setup.003.sh @@ -6,9 +6,9 @@ define_test "setup, known and unknown tunables in config" setup -setup_config <<EOF -CTDB_SET_MonitorInterval=5 -CTDB_SET_UnknownMagic=0 +setup_tunable_config <<EOF +MonitorInterval=5 +UnknownMagic=0 EOF required_result 1 <<EOF diff --git a/ctdb/tests/eventscripts/00.ctdb.setup.004.sh b/ctdb/tests/eventscripts/00.ctdb.setup.004.sh index 636cd2bead9..eebf93b2534 100755 --- a/ctdb/tests/eventscripts/00.ctdb.setup.004.sh +++ b/ctdb/tests/eventscripts/00.ctdb.setup.004.sh @@ -6,9 +6,9 @@ define_test "setup, known and obsolete tunables in config" setup -setup_config <<EOF -CTDB_SET_MonitorInterval=5 -CTDB_SET_EventScriptUnhealthyOnTimeout=0 +setup_tunable_config <<EOF +MonitorInterval=5 +EventScriptUnhealthyOnTimeout=0 EOF required_result 0 <<EOF diff --git a/ctdb/tests/eventscripts/scripts/00.ctdb.sh b/ctdb/tests/eventscripts/scripts/00.ctdb.sh index 68db2de996f..c17634984e8 100644 --- a/ctdb/tests/eventscripts/scripts/00.ctdb.sh +++ b/ctdb/tests/eventscripts/scripts/00.ctdb.sh @@ -16,13 +16,18 @@ setup () " } -setup_config () +setup_tunable_config () { _t="${EVENTSCRIPTS_TESTS_VAR_DIR}/fake-tunable-config.sh" export FAKE_CTDB_EXTRA_CONFIG="$_t" rm -f "$FAKE_CTDB_EXTRA_CONFIG" - cat >"$FAKE_CTDB_EXTRA_CONFIG" + while read line ; do + case "$line" in + \#*|"") : ;; + *) echo "CTDB_SET_${line}" + esac + done >"$FAKE_CTDB_EXTRA_CONFIG" } result_filter () |