diff options
author | Andreas Schneider <asn@samba.org> | 2014-12-11 16:41:55 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2014-12-11 19:14:06 +0100 |
commit | 6d6c673c6d33ceb1379c66d6b4d78a52077b928a (patch) | |
tree | a42b8204f906f764ec26f00dd9812f3e602cf8b9 | |
parent | b299409410751ff3c8c775bd073e34d914a54efc (diff) | |
download | samba-6d6c673c6d33ceb1379c66d6b4d78a52077b928a.tar.gz samba-6d6c673c6d33ceb1379c66d6b4d78a52077b928a.tar.xz samba-6d6c673c6d33ceb1379c66d6b4d78a52077b928a.zip |
selftest: Add 'net dom join' test which fails cause we are a DC
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
-rwxr-xr-x | source3/script/tests/test_net_dom_join_fail_dc.sh | 22 | ||||
-rwxr-xr-x | source3/selftest/tests.py | 5 |
2 files changed, 27 insertions, 0 deletions
diff --git a/source3/script/tests/test_net_dom_join_fail_dc.sh b/source3/script/tests/test_net_dom_join_fail_dc.sh new file mode 100755 index 0000000000..135e1daa07 --- /dev/null +++ b/source3/script/tests/test_net_dom_join_fail_dc.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if [ $# -lt 4 ]; then +cat <<EOF +Usage: test_net_dom_join_fail_dc.sh USERNAME PASSWORD DOMAIN PREFIX +EOF +exit 1; +fi + +DC_USERNAME="$1" +DC_PASSWORD="$2" +DOMAIN="$3" +PREFIX="$4" +shift 4 +ADDARGS="$*" + +incdir=`dirname $0`/../../../testprogs/blackbox +. $incdir/subunit.sh +mkdir -p $PREFIX/private +testit_expect_failure "net_dom_join_fail_dc" $VALGRIND $BINDIR/net dom join domain=$DOMAIN account=$USERNAME password=$PASSWORD --option=netbiosname=netrpcjointest --option=domainlogons=yes --option=privatedir=$PREFIX/private $ADDARGS || failed=`expr $failed + 1` + +testok $0 $failed diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index 40599c36df..092d9cc722 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -411,6 +411,11 @@ for s in signseal_options: plantestsuite("samba3.blackbox.rpcclient_samlogon", "s3member:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"), "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$DC_SERVER", configuration]) +plantestsuite("samba3.blackbox.net_dom_join_fail_dc", "s3dc", + [os.path.join(samba3srcdir, "script/tests/test_net_dom_join_fail_dc.sh"), + "$USERNAME", "$PASSWORD", "$SERVER", "$PREFIX/net_dom_join_fail_dc", + configuration]) + options_list = ["", "-e"] for options in options_list: plantestsuite("samba3.blackbox.smbclient_krb5 old ccache %s" % options, "ktest:local", |