Tests - new NFS share checking tests
authorMartin Schwenke <martin@meltin.net>
Fri, 19 Aug 2011 01:24:56 +0000 (11:24 +1000)
committerMartin Schwenke <martin@meltin.net>
Tue, 30 Aug 2011 06:51:55 +0000 (16:51 +1000)
Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/eventscripts/simple/60.nfs.monitor.161.sh [new file with mode: 0755]
tests/eventscripts/simple/60.nfs.monitor.162.sh [new file with mode: 0755]

diff --git a/tests/eventscripts/simple/60.nfs.monitor.161.sh b/tests/eventscripts/simple/60.nfs.monitor.161.sh
new file mode 100755 (executable)
index 0000000..4abe68e
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
+
+define_test "2nd share missing"
+
+setup_nfs
+
+shares_missing "ERROR: nfs directory \"%s\" not available" 2
+
+required_result 1 "$MISSING_SHARES_TEXT"
+
+simple_test
diff --git a/tests/eventscripts/simple/60.nfs.monitor.162.sh b/tests/eventscripts/simple/60.nfs.monitor.162.sh
new file mode 100755 (executable)
index 0000000..865b1c6
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+. "${EVENTSCRIPTS_TESTS_DIR}/common.sh"
+
+define_test "2nd share missing, skipping share checks"
+
+setup_nfs
+export CTDB_NFS_SKIP_SHARE_CHECK="yes"
+
+shares_missing "ERROR: nfs directory \"%s\" not available" 2
+
+ok_null
+
+simple_test