From: Martin Schwenke Date: Fri, 2 Aug 2019 06:18:32 +0000 (+1000) Subject: ctdb-tests: Use db_ctdb_cattdb_count_records() X-Git-Tag: talloc-2.3.1~849 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8aed06ce8c802d75e7bacb289916c835164e7307;p=thirdparty%2Fsamba.git ctdb-tests: Use db_ctdb_cattdb_count_records() Avoid reinventing the wheel. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/simple/69_recovery_resurrect_deleted.sh b/ctdb/tests/simple/69_recovery_resurrect_deleted.sh index e5615cddb86..51d806a5d47 100755 --- a/ctdb/tests/simple/69_recovery_resurrect_deleted.sh +++ b/ctdb/tests/simple/69_recovery_resurrect_deleted.sh @@ -45,8 +45,9 @@ database_has_zero_records () { local n for n in $notfirst ; do - try_command_on_node $n $CTDB cattdb "$testdb" - if grep -q '^key(' "$outfile" ; then + local num_records + num_records=$(db_ctdb_cattdb_count_records "$n" "$testdb") + if [ "$num_records" != 0 ] ; then return 1 fi done