selftest: add new credential change test
authorGarming Sam <garming@catalyst.net.nz>
Mon, 2 Dec 2013 00:20:39 +0000 (13:20 +1300)
committerStefan Metzmacher <metze@samba.org>
Fri, 13 Dec 2013 07:16:25 +0000 (08:16 +0100)
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/script/tests/test_net_cred_change.sh [new file with mode: 0755]
source3/selftest/tests.py

diff --git a/source3/script/tests/test_net_cred_change.sh b/source3/script/tests/test_net_cred_change.sh
new file mode 100755 (executable)
index 0000000..9013d07
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+if [ $# -lt 1 ]; then
+cat <<EOF
+Usage: test_net_cred_change.sh CONFIGURATION
+EOF
+exit 1;
+fi
+
+incdir=`dirname $0`/../../../testprogs/blackbox
+. $incdir/subunit.sh
+testit "first change" $VALGRIND $BINDIR/wbinfo -c || failed =`expr $failed + 1`
+testit "first join" $VALGRIND $BINDIR/net rpc testjoin $@ || failed =`expr $failed + 1`
+testit "second change" $VALGRIND $BINDIR/wbinfo -c || failed =`expr $failed + 1`
+
+testok $0 $failed
index d9d2f91166863af4c1fc290f4c99796363155976..254e9428b4559c4b17dbc460ceb60d917ab3532b 100755 (executable)
@@ -167,6 +167,9 @@ for env in ["s3dc", "member", "s3member"]:
 
     plantestsuite("samba3.ntlm_auth.(%s:local)" % env, "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_s3.sh"), valgrindify(python), samba3srcdir, ntlm_auth3,  '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', configuration])
 
+for env in ["member", "s3member"]:
+    plantestsuite("samba3.blackbox.net_cred_change.(%s:local)" % env, "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_net_cred_change.sh"), configuration])
+
 env = "s3member"
 t = "--krb5auth=$DOMAIN\\\\$DC_USERNAME%$DC_PASSWORD"
 plantestsuite("samba3.wbinfo_s3.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_wbinfo_s3.sh"), t])