1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

ctdb-tests: Check that ctdb wipedb cleans the database

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Amitay Isaacs 2014-05-06 17:16:19 +10:00 committed by Martin Schwenke
parent 2855173dac
commit 9c8c8a7b0b

View File

@ -52,6 +52,16 @@ db_ctdb_tstore 1 "$test_db" "DEF" "DEF"
# 4. # 4.
echo "Wipe database" echo "Wipe database"
try_command_on_node 0 $CTDB wipedb "$test_db" 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" echo "Force a recovery"
try_command_on_node 0 $CTDB recover try_command_on_node 0 $CTDB recover