diff options
author | Martin Schwenke <martin@meltin.net> | 2010-08-18 11:25:44 +1000 |
---|---|---|
committer | Martin Schwenke <martin@meltin.net> | 2010-08-18 11:25:44 +1000 |
commit | 4e9fe3545c6df86b33a3aad8a6fd119e79d6f078 (patch) | |
tree | 2c46632f4f6873d094507746e8e36d4def731e7f | |
parent | a3e9fe20583848625bcdb59db5df277b8c024281 (diff) | |
download | samba-4e9fe3545c6df86b33a3aad8a6fd119e79d6f078.tar.gz samba-4e9fe3545c6df86b33a3aad8a6fd119e79d6f078.tar.xz samba-4e9fe3545c6df86b33a3aad8a6fd119e79d6f078.zip |
Test suite: loosen the getmonmode test.
Monitoring could be off at the beginning of the test.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 6a33a7715067175869ea2f3f15b64c3371079a6b)
-rwxr-xr-x | ctdb/tests/simple/20_ctdb_getmonmode.sh | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/ctdb/tests/simple/20_ctdb_getmonmode.sh b/ctdb/tests/simple/20_ctdb_getmonmode.sh index eab3dad45a..56a38d8525 100755 --- a/ctdb/tests/simple/20_ctdb_getmonmode.sh +++ b/ctdb/tests/simple/20_ctdb_getmonmode.sh @@ -18,7 +18,7 @@ Steps: 1. Verify that the status on all of the ctdb nodes is 'OK'. 2. Use 'ctdb getmodmode -n <node>' to get the current monitoring mode. -3. Verify that it shows monitoring as 'active'. +3. Verify that it looks sane. 4. Verify that the command prints the output in colon-separated format when run with the '-Y' option. 5. Disable monitoring on the node using 'ctdb disablemonitor'. @@ -47,19 +47,12 @@ try_command_on_node -v 0 $CTDB getmonmode -n $test_node sanity_check_output \ 1 \ - '^Monitoring mode:ACTIVE \(0\)$' \ + '^Monitoring mode:(ACTIVE \(0\)|DISABLED \(1\))$' \ "$out" -colons=$(printf ':mode:\n:0:') - try_command_on_node -v 0 $CTDB -Y getmonmode -n $test_node -if [ "$out" = "$colons" ] ; then - echo "Looks OK" -else - echo "BAD: -Y output isn't what was expected" - testfailures=1 -fi +sanity_check_output 2 '^(:mode:|:0:|:1:)$' "$out" try_command_on_node -v 0 $CTDB disablemonitor -n $test_node |