diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-12-28 10:06:39 +1100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-09-04 07:08:16 +0200 |
commit | 16b26eafa75280e576333975cff5dd1505c118fa (patch) | |
tree | e29b01b2e1552109307422f43eada821db7fc834 | |
parent | 013c4990c6f1412dd25592bf177ceffab4b5d16d (diff) | |
download | samba-16b26eafa75280e576333975cff5dd1505c118fa.tar.gz samba-16b26eafa75280e576333975cff5dd1505c118fa.tar.bz2 samba-16b26eafa75280e576333975cff5dd1505c118fa.zip |
selftest: Add a basic test of samba_upgradedns
This does not check that the command runs correctly, but does at least check
that the command runs to completion without errors.
Andrew Bartlett
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rwxr-xr-x | source4/selftest/tests.py | 1 | ||||
-rwxr-xr-x | testprogs/blackbox/test_samba_upgradedns.sh | 37 |
2 files changed, 38 insertions, 0 deletions
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 10b8a25d1f..f656acd8e1 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -312,6 +312,7 @@ plantestsuite("samba4.blackbox.rfc2307_mapping(dc:local)", "dc:local", [os.path. plantestsuite("samba4.blackbox.wbinfo(dc:local)", "dc:local", [os.path.join(samba4srcdir, "../nsswitch/tests/test_wbinfo.sh"), '$DOMAIN', '$USERNAME', '$PASSWORD', "dc"]) plantestsuite("samba4.blackbox.wbinfo(s4member:local)", "s4member:local", [os.path.join(samba4srcdir, "../nsswitch/tests/test_wbinfo.sh"), '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', "s4member"]) plantestsuite("samba4.blackbox.chgdcpass", "chgdcpass", [os.path.join(bbdir, "test_chgdcpass.sh"), '$SERVER', "CHGDCPASS\$", '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", '$SELFTEST_PREFIX/chgdcpass', smbclient4]) +plantestsuite("samba4.blackbox.samba_upgradedns(chgdcpass:local)", "chgdcpass:local", [os.path.join(bbdir, "test_samba_upgradedns.sh"), '$SERVER', '$REALM', '$PREFIX', '$SELFTEST_PREFIX/chgdcpass']) plantestsuite_loadlist("samba4.rpc.echo against NetBIOS alias", "dc", [valgrindify(smbtorture4), "$LISTOPT", 'ncacn_np:$NETBIOSALIAS', '-U$DOMAIN/$USERNAME%$PASSWORD', 'rpc.echo']) # Tests using the "Simple" NTVFS backend diff --git a/testprogs/blackbox/test_samba_upgradedns.sh b/testprogs/blackbox/test_samba_upgradedns.sh new file mode 100755 index 0000000000..a080f735ea --- /dev/null +++ b/testprogs/blackbox/test_samba_upgradedns.sh @@ -0,0 +1,37 @@ +#!/bin/sh +# Blackbox tests for the samba_upgradedns +# Copyright (C) 2006-2007 Jelmer Vernooij <jelmer@samba.org> +# Copyright (C) 2006-2012 Andrew Bartlett <abartlet@samba.org> + +if [ $# -lt 4 ]; then +cat <<EOF +Usage: test_samba_upgradedns.sh SERVER REALM PREFIX PROVDIR +EOF +exit 1; +fi + +SERVER=$1 +REALM=$2 +PREFIX=$3 +PROVDIR=$4 +shift 4 +failed=0 + +samba4bindir="$BINDIR" +samba4srcdir="$SRCDIR/source4" +samba4kinit="$samba4bindir/samba4kinit" + +. `dirname $0`/subunit.sh + +testit "run samba_upgradedns converting to bind9 DLZ" $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=BIND9_DLZ -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1` + +testit "run samba_upgradedns converting to internal" $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=SAMBA_INTERNAL -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1` + +testit "run samba_upgradedns converting to internal (2nd time)" $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=SAMBA_INTERNAL -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1` + +testit "run samba_upgradedns converting to bind9 DLZ (2nd time)" $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=BIND9_DLZ -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1` + +testit "run samba_upgradedns converting to bind9 DLZ (3rd time)" $samba4srcdir/scripting/bin/samba_upgradedns --dns-backend=BIND9_DLZ -s $PROVDIR/etc/smb.conf || failed=`expr $failed + 1` + + +exit $failed |