diff options
| author | Amitay Isaacs <amitay@gmail.com> | 2014-05-06 17:16:19 +1000 |
|---|---|---|
| committer | Martin Schwenke <martins@samba.org> | 2014-07-07 13:29:50 +0200 |
| commit | 9c8c8a7b0bfd4c1cafa3deaa012049b7f0851617 (patch) | |
| tree | b63dde5efb94c581a277ba0abf9a0d0135c02a38 /ctdb/tests/simple | |
| parent | 2855173dac5386bff655d1bb94c1848591b963e1 (diff) | |
| download | samba-9c8c8a7b0bfd4c1cafa3deaa012049b7f0851617.tar.gz samba-9c8c8a7b0bfd4c1cafa3deaa012049b7f0851617.tar.xz samba-9c8c8a7b0bfd4c1cafa3deaa012049b7f0851617.zip | |
ctdb-tests: Check that ctdb wipedb cleans the database
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/tests/simple')
| -rwxr-xr-x | ctdb/tests/simple/71_ctdb_wipedb.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ctdb/tests/simple/71_ctdb_wipedb.sh b/ctdb/tests/simple/71_ctdb_wipedb.sh index 886e5e6d6f..1919ea70a9 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 |
