]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Revert "ctdb-tests: Improve test quality"
authorMartin Schwenke <martin@meltin.net>
Wed, 22 Jul 2020 04:42:36 +0000 (14:42 +1000)
committerMartin Schwenke <martins@samba.org>
Wed, 22 Jul 2020 05:07:45 +0000 (05:07 +0000)
Fix missing Reviewed-by: tag.

This reverts commit a308f2534d3991866efa2c662921ec63b4238888.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/INTEGRATION/simple/cluster.010.getrelock.sh

index 3a766540db8b33b7b2cc6257b9b59012e632d207..03cf4317a39839d81d4fb910aab0f74bdb363253 100755 (executable)
@@ -11,14 +11,17 @@ set -e
 ctdb_test_init
 
 echo "Check that recovery lock is set the same on all nodes..."
-ctdb_onnode all getreclock
+try_command_on_node -v -q all $CTDB getreclock
 
-# outfile is set above by ctdb_onnode
-# shellcheck disable=SC2154
-n=$(sort -u "$outfile" | wc -l | tr -d '[:space:]')
+if [ -z "$out" ] ; then
+    echo "GOOD: Recovery lock is unset on all nodes"
+    exit 0
+fi
 
-case "$n" in
-0) echo "GOOD: Recovery lock is unset on all nodes" ;;
-1) echo "GOOD: All nodes have the same recovery lock setting" ;;
-*) ctdb_test_fail "BAD: Recovery lock setting differs across nodes" ;;
-esac
+n=$(sort -u "$outfile" | wc -l | tr -d '[:space:]')
+if [ "$n" = 1 ] ; then
+       echo "GOOD: All nodes have the same recovery lock setting"
+else
+       echo "BAD: Recovery lock setting differs across nodes"
+       exit 1
+fi