git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2855173
)
ctdb-tests: Check that ctdb wipedb cleans the database
author
Amitay Isaacs
<amitay@gmail.com>
Tue, 6 May 2014 07:16:19 +0000
(17:16 +1000)
committer
Martin Schwenke
<martins@samba.org>
Mon, 7 Jul 2014 11:29:50 +0000
(13:29 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/tests/simple/71_ctdb_wipedb.sh
patch
|
blob
|
history
diff --git
a/ctdb/tests/simple/71_ctdb_wipedb.sh
b/ctdb/tests/simple/71_ctdb_wipedb.sh
index 886e5e6d6f5f237614b6919eab91c79d80c951e9..1919ea70a961b2f157249f7154b725a35960a31c 100755
(executable)
--- 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