Test suite: Fix bug in node_has_status().
authorMartin Schwenke <martin@meltin.net>
Tue, 20 Oct 2009 05:45:29 +0000 (16:45 +1100)
committerMartin Schwenke <martin@meltin.net>
Tue, 20 Oct 2009 05:45:29 +0000 (16:45 +1100)
commit11137bc2d492a62a26ec9f9f62ff362e81643f66
tree3ffd3b0965d3b5991e7a463f9d0171a186b745f9
parent1f906bd3476e7cebf217e35b5477d6a7bb615a0c
Test suite: Fix bug in node_has_status().

This function has been broken since it was updated to work with the
"stopped" state (probably commit
67c5bfb5f02c9d45a32d976021ede4fb2174dfe9).  Although ${var#:*:0}
removes the shortest matching prefix of $var, '*' can match substrings
that include ':' if '0' isn't where you expect.  So we were making
unexpected matches and incorrectly returning true for some cases.

Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/scripts/ctdb_test_functions.bash