Test suite: strengthen function _cluster_is_healthy().
authorMartin Schwenke <martin@meltin.net>
Fri, 13 Aug 2010 07:01:54 +0000 (17:01 +1000)
committerMartin Schwenke <martin@meltin.net>
Fri, 13 Aug 2010 07:01:54 +0000 (17:01 +1000)
commitd4189c7c3fceaa833f9f0446a2b06af6fed714ec
tree2baf234b161a8a685ee7249abeaef193559eec46
parent8222fef1e61836b9bfd406205f9ffb9396aa7480
Test suite: strengthen function _cluster_is_healthy().

If there's a chance that "ctdb status -Y" can return 0 but print
garbage then this function might return a false positive.

So, we do 2 things:

* Redirect stderr to >/dev/null rather than looking at it.  This
  minimises the chance that we will see garbage.

* Since we need at least 1 good line to decide the cluster is healthy,
  we sanity check each line to esnure it starts with :[0-9].

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