ctdb-tests: Create 20.multipathd.sh
authorMartin Schwenke <martin@meltin.net>
Mon, 19 Mar 2018 09:40:40 +0000 (20:40 +1100)
committerAmitay Isaacs <amitay@samba.org>
Wed, 28 Mar 2018 00:57:17 +0000 (02:57 +0200)
Contains testing support used only by tests for 20.multipathd event
script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/eventscripts/scripts/20.multipathd.sh [new file with mode: 0644]
ctdb/tests/eventscripts/scripts/local.sh

diff --git a/ctdb/tests/eventscripts/scripts/20.multipathd.sh b/ctdb/tests/eventscripts/scripts/20.multipathd.sh
new file mode 100644 (file)
index 0000000..be7152a
--- /dev/null
@@ -0,0 +1,18 @@
+setup_multipathd ()
+{
+       for i ; do
+               case "$i" in
+               \!*)
+                       _t="${i#!}"
+                       echo "Marking ${_t} as having no active paths"
+                       FAKE_MULTIPATH_FAILURES="${FAKE_MULTIPATH_FAILURES}${FAKE_MULTIPATH+FAILURES:+ }${_t}"
+               ;;
+               *)
+                       _t="$i"
+               esac
+               CTDB_MONITOR_MPDEVICES="${CTDB_MONITOR_MPDEVICES}${CTDB_MONITOR_MPDEVICES:+ }${_t}"
+       done
+
+       export CTDB_MONITOR_MPDEVICES FAKE_MULTIPATH_FAILURES
+       export FAKE_SLEEP_FORCE=0.1
+}
index d9457420e84c71267c95790b7b465ff1a87d8e2b..9d5dff71533d71ea3df6d9013cd935499e23c45e 100644 (file)
@@ -935,29 +935,6 @@ setup_httpd ()
 
 ######################################################################
 
-# multipathd fakery
-
-setup_multipathd ()
-{
-    for i ; do
-       case "$i" in
-           \!*)
-               _t="${i#!}"
-               echo "Marking ${_t} as having no active paths"
-               FAKE_MULTIPATH_FAILURES="${FAKE_MULTIPATH_FAILURES}${FAKE_MULTIPATH+FAILURES:+ }${_t}"
-               ;;
-           *)
-               _t="$i"         
-       esac
-       CTDB_MONITOR_MPDEVICES="${CTDB_MONITOR_MPDEVICES}${CTDB_MONITOR_MPDEVICES:+ }${_t}"
-    done
-
-    export CTDB_MONITOR_MPDEVICES FAKE_MULTIPATH_FAILURES
-    export FAKE_SLEEP_FORCE=0.1
-}
-
-######################################################################
-
 # Result and test functions
 
 # Set some globals and print the summary.