From 9c8c8a7b0bfd4c1cafa3deaa012049b7f0851617 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 6 May 2014 17:16:19 +1000 Subject: [PATCH] ctdb-tests: Check that ctdb wipedb cleans the database Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/tests/simple/71_ctdb_wipedb.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ctdb/tests/simple/71_ctdb_wipedb.sh b/ctdb/tests/simple/71_ctdb_wipedb.sh index 886e5e6d6f5..1919ea70a96 100755 --- a/ctdb/tests/simple/71_ctdb_wipedb.sh +++ b/ctdb/tests/simple/71_ctdb_wipedb.sh @@ -52,6 +52,16 @@ db_ctdb_tstore 1 "$test_db" "DEF" "DEF" # 4. echo "Wipe database" try_command_on_node 0 $CTDB wipedb "$test_db" + +# check that the database is wiped +num_records=$(db_ctdb_cattdb_count_records 1 "$test_db") +if [ $num_records = "0" ] ; then + echo "OK: Database was wiped" +else + echo "BAD: We did not end up with an empty database" + exit 1 +fi + echo "Force a recovery" try_command_on_node 0 $CTDB recover -- 2.34.1