diff options
author | Martin Schwenke <martin@meltin.net> | 2015-03-04 11:51:20 +1100 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2015-03-04 10:42:27 +0100 |
commit | 22602f76bc1ec91e807a8f1cd45ba6fb4c05e622 (patch) | |
tree | 0e98202bb2e67661eb62b09f460d170bf67ea4a3 /ctdb/tests/eventscripts/statd-callout.005.sh | |
parent | d98c7ba382189161c5b8cbbebbdfbe36f1456572 (diff) | |
download | samba-22602f76bc1ec91e807a8f1cd45ba6fb4c05e622.tar.gz |
ctdb-tests: Unit tests for statd-callout
With improvements to unit test infrastructure to support. This
includes linking the real statd-callout into etc-ctdb/ in place of the
placeholder script.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/tests/eventscripts/statd-callout.005.sh')
-rwxr-xr-x | ctdb/tests/eventscripts/statd-callout.005.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ctdb/tests/eventscripts/statd-callout.005.sh b/ctdb/tests/eventscripts/statd-callout.005.sh new file mode 100755 index 00000000000..65e291d0884 --- /dev/null +++ b/ctdb/tests/eventscripts/statd-callout.005.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +. "${TEST_SCRIPTS_DIR}/unit.sh" + +define_test "2 x add-client to different nodes, notify on 1" + +setup_ctdb + +FAKE_DATE_OUTPUT="1234565789" + +ok_null +simple_test_event "add-client" "192.168.123.45" + +FAKE_CTDB_PNN=1 + +ok_null +simple_test_event "add-client" "192.168.123.46" + +FAKE_CTDB_PNN=0 + +check_statd_callout_smnotify "192.168.123.45" + +FAKE_CTDB_PNN=1 + +check_ctdb_tdb_statd_state "192.168.123.46" |