git.samba.org
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7b2dcc
)
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
Amitay Isaacs
<amitay@gmail.com>
Tue, 8 Jul 2014 01:16:15 +0000
(11:16 +1000)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(Imported from commit
9c8c8a7b0bfd4c1cafa3deaa012049b7f0851617
)
tests/simple/71_ctdb_wipedb.sh
patch
|
blob
|
history
diff --git
a/tests/simple/71_ctdb_wipedb.sh
b/tests/simple/71_ctdb_wipedb.sh
index 886e5e6d6f5f237614b6919eab91c79d80c951e9..1919ea70a961b2f157249f7154b725a35960a31c 100755
(executable)
--- a/
tests/simple/71_ctdb_wipedb.sh
+++ b/
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