diff options
-rw-r--r-- | source4/selftest/quick | 1 | ||||
-rwxr-xr-x | source4/selftest/tests.py | 3 | ||||
-rwxr-xr-x | testprogs/blackbox/dbcheck.sh | 21 |
3 files changed, 25 insertions, 0 deletions
diff --git a/source4/selftest/quick b/source4/selftest/quick index 1827caf48f..aa602fd383 100644 --- a/source4/selftest/quick +++ b/source4/selftest/quick @@ -34,3 +34,4 @@ rpc.handles rpc.echo smb.signing drs.unit +samba4.blackbox.dbcheck diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 292b428dc2..9997628cee 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -464,3 +464,6 @@ plantestsuite("samba4.blackbox.provision-backend.py", "none", ["PYTHON=%s" % pyt # 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]) diff --git a/testprogs/blackbox/dbcheck.sh b/testprogs/blackbox/dbcheck.sh new file mode 100755 index 0000000000..447d14a8c8 --- /dev/null +++ b/testprogs/blackbox/dbcheck.sh @@ -0,0 +1,21 @@ +#!/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 |