summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/eventscripts/60.nfs.monitor.122.sh
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2012-04-16 16:24:12 +1000
committerMartin Schwenke <martin@meltin.net>2012-04-16 16:24:12 +1000
commitdf39a671db2a88de7e6b1e9a9ce4885f2b9bb393 (patch)
tree35577f88651301bbc8f66de5f12096496ca19861 /ctdb/tests/eventscripts/60.nfs.monitor.122.sh
parenta35eca8bdad298a823d9ca01957dfa501ef503a5 (diff)
downloadsamba-df39a671db2a88de7e6b1e9a9ce4885f2b9bb393.tar.gz
samba-df39a671db2a88de7e6b1e9a9ce4885f2b9bb393.tar.xz
samba-df39a671db2a88de7e6b1e9a9ce4885f2b9bb393.zip
tests/eventscripts - Restructure according to new convention
Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit eb13507713ba6732271b7c3024bfddbda6da5ffc)
Diffstat (limited to 'ctdb/tests/eventscripts/60.nfs.monitor.122.sh')
-rwxr-xr-xctdb/tests/eventscripts/60.nfs.monitor.122.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/ctdb/tests/eventscripts/60.nfs.monitor.122.sh b/ctdb/tests/eventscripts/60.nfs.monitor.122.sh
new file mode 100755
index 0000000000..fc5cea87c7
--- /dev/null
+++ b/ctdb/tests/eventscripts/60.nfs.monitor.122.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+. "${TEST_SCRIPTS_DIR}/unit.sh"
+
+define_test "lockd down, 15 iterations, back up after 10"
+
+# This simulates a success the eventscript's automated attempts to
+# restart the service.
+
+setup_nfs
+rpc_services_down "nlockmgr"
+
+# Iteration 10 should try to restart rpc.lockd. However, our test
+# stub rpc.lockd does nothing, so we have to explicitly flag it as up.
+
+iterate_test 15 "ok_null" \
+ 10 "rpc_set_service_failure_response 'lockd'" \
+ 11 "rpc_services_up nlockmgr"
+