This should catch corruption that happens during a test run
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
rpc.echo
smb.signing
drs.unit
+samba4.blackbox.dbcheck
# Test renaming the DC
plantestsuite("samba4.blackbox.renamedc.sh", "none", ["PYTHON=%s" % python, os.path.join(bbdir, "renamedc.sh"), '$PREFIX/provision'])
+
+# check the database is all OK. PLEASE LEAVE THIS AS THE LAST TEST
+plantestsuite("samba4.blackbox.dbcheck.sh", "dc:local", ["PYTHON=%s" % python, os.path.join(bbdir, "dbcheck.sh"), '$PREFIX/provision', configuration])
--- /dev/null
+#!/bin/sh
+
+if [ $# -lt 1 ]; then
+cat <<EOF
+Usage: dbcheck.sh PREFIX
+EOF
+exit 1;
+fi
+
+PREFIX="$1"
+shift 1
+
+. `dirname $0`/subunit.sh
+
+dbcheck() {
+ $BINDIR/samba-tool dbcheck --fix --cross-ncs --yes $@
+}
+
+testit "dbcheck" dbcheck
+
+exit $failed