diff options
| author | Martin Schwenke <martin@meltin.net> | 2013-06-20 16:43:10 +1000 |
|---|---|---|
| committer | Amitay Isaacs <amitay@gmail.com> | 2013-06-22 15:51:17 +1000 |
| commit | 16d374f75e9120a2d8ea3bb7b503d9d0f9f72a51 (patch) | |
| tree | c83a92714259ef0e20a39ef96938483227291c79 /ctdb/tests/scripts | |
| parent | 0a80d65c2efcb1a76bffb954d0fad218a9c62975 (diff) | |
| download | samba-16d374f75e9120a2d8ea3bb7b503d9d0f9f72a51.tar.gz samba-16d374f75e9120a2d8ea3bb7b503d9d0f9f72a51.tar.xz samba-16d374f75e9120a2d8ea3bb7b503d9d0f9f72a51.zip | |
tests: Integration tests use "ctdb nodestatus" for healthy cluster check
Also check that we're not in recovery mode.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit b7aaa28b3a6a2de923417f3d143f8d516447711e)
Diffstat (limited to 'ctdb/tests/scripts')
| -rw-r--r-- | ctdb/tests/scripts/integration.bash | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/ctdb/tests/scripts/integration.bash b/ctdb/tests/scripts/integration.bash index a43ffe8be0..95d67c3a35 100644 --- a/ctdb/tests/scripts/integration.bash +++ b/ctdb/tests/scripts/integration.bash @@ -320,21 +320,8 @@ sleep_for () _cluster_is_healthy () { - local out x count line - - out=$($CTDB -Y status 2>/dev/null) || return 1 - - { - read x - count=0 - while read line ; do - # We need to see valid lines if we're going to be healthy. - [ "${line#:[0-9]}" != "$line" ] && count=$(($count + 1)) - # A line indicating a node is unhealthy causes failure. - [ "${line##:*:*:*1:}" != "$line" ] && return 1 - done - [ $count -gt 0 ] && return $? - } <<<"$out" # Yay bash! + $CTDB nodestatus all >/dev/null && \ + node_has_status 0 recovered } cluster_is_healthy () |
