Test suite: Fixes for node state parsing plus new stop/continue tests.
authorMartin Schwenke <martin@meltin.net>
Wed, 29 Jul 2009 08:01:07 +0000 (18:01 +1000)
committerMartin Schwenke <martin@meltin.net>
Wed, 29 Jul 2009 08:01:07 +0000 (18:01 +1000)
commit67c5bfb5f02c9d45a32d976021ede4fb2174dfe9
tree8b60da95582876917e0535b09f8142577d7b49c8
parentd7ff60a74595dcb4ae41f5a8193de5b898d61227
Test suite: Fixes for node state parsing plus new stop/continue tests.

The parsing of "ctdb status -Y" output to determine various node
states was implemented very strictly.  Therefore, the parsing broke
due to the addition of the new "stopped" state to the output of "ctdb
status -Y".  This relaxes the parsing so that it should work for
versions prior to the introduction of the "stopped" state, as well as
future versions that add new states to the end of the list of bits in
output of "ctdb status -Y".

Similarly the check for cluster unhealthy (in _cluster_is_healthy())
now just checks for a single 1 in any bit in the "ctdb status -Y"
output, rather than checking for a particular number of 0s.

New tests
tests/simple/{41_ctdb_stop.sh,42_ctdb_continue.sh,43_stop_recmaster_yield.sh}
do rudimentary testing of the stop and continue functions.

Remove tests tests/simple/41_ctdb_ban.sh and
tests/simple/42_ctdb_unban.sh.  They were both unreliable.

tests/simple/21_ctdb_disablemonitor.sh now schedules a restart, since
one will be required.

Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/scripts/ctdb_test_functions.bash
tests/simple/21_ctdb_disablemonitor.sh
tests/simple/41_ctdb_ban.sh [deleted file]
tests/simple/41_ctdb_stop.sh [new file with mode: 0755]
tests/simple/42_ctdb_continue.sh [new file with mode: 0755]
tests/simple/42_ctdb_unban.sh [deleted file]
tests/simple/43_stop_recmaster_yield.sh [new file with mode: 0755]