selftest: Rename wbinfo_s3 to wbinfo_simple and reorder code for clarity
authorAndrew Bartlett <abartlet@samba.org>
Mon, 31 Mar 2014 01:02:18 +0000 (14:02 +1300)
committerDavid Disseldorp <ddiss@samba.org>
Wed, 2 Apr 2014 11:07:24 +0000 (13:07 +0200)
Change-Id: Ic2e06e448fce1d91422b711abf663b9253009a53
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Apr  2 13:07:24 CEST 2014 on sn-devel-104

nsswitch/tests/test_wbinfo_simple.sh [moved from source3/script/tests/test_wbinfo_s3.sh with 68% similarity]
source3/selftest/tests.py

similarity index 68%
rename from source3/script/tests/test_wbinfo_s3.sh
rename to nsswitch/tests/test_wbinfo_simple.sh
index 91a9f45b3a6a8cff001100a6b02193ac1f58104c..dc90ddcadf0b342dcff0e5b8feb5ac2740120628 100755 (executable)
@@ -2,14 +2,14 @@
 
 if [ $# -lt 1 ]; then
 cat <<EOF
-Usage: test_wbinfo_s3.sh <wbinfo args>
+Usage: test_wbinfo_simple.sh <wbinfo args>
 EOF
 exit 1;
 fi
 
 ADDARGS="$*"
 
-incdir=`dirname $0`/../../../testprogs/blackbox
+incdir=`dirname $0`/../../testprogs/blackbox
 . $incdir/subunit.sh
 
 testit "wbinfo" $VALGRIND $BINDIR/wbinfo $ADDARGS || failed=`expr $failed + 1`
index 19e3066e7b1cce1598a8e5ed803026b2f766cfde..81ef184372dee2f22cc6a6251f806a0a409b26c6 100755 (executable)
@@ -109,29 +109,6 @@ local_tests = [
 for t in local_tests:
     plantestsuite("samba3.smbtorture_s3.%s" % t, "s3dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', '$PASSWORD', smbtorture3, "-e"])
 
-tests = ["--ping", "--separator",
-       "--own-domain",
-       "--all-domains",
-       "--trusted-domains",
-       "--domain-info=BUILTIN",
-       "--domain-info=$DOMAIN",
-       "--online-status",
-       "--online-status --domain=BUILTIN",
-       "--online-status --domain=$DOMAIN",
-       "--check-secret --domain=$DOMAIN",
-       "--change-secret --domain=$DOMAIN",
-       "--check-secret --domain=$DOMAIN",
-       "--online-status --domain=$DOMAIN",
-       #Didn't pass yet# "--domain-users",
-       "--domain-groups",
-       "--name-to-sid=$DC_USERNAME",
-       "--name-to-sid=$DOMAIN\\\\$DC_USERNAME",
-     #Didn't pass yet# "--user-info=$USERNAME",
-       "--user-groups=$DOMAIN\\\\$DC_USERNAME",
-       "--authenticate=$DOMAIN\\\\$DC_USERNAME%$DC_PASSWORD",
-       "--allocate-uid",
-       "--allocate-gid"]
-
 plantestsuite("samba.vfstest.stream_depot", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/stream-depot/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
 plantestsuite("samba.vfstest.xattr-tdb-1", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/xattr-tdb-1/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
 plantestsuite("samba.vfstest.acl", "s3dc:local", [os.path.join(samba3srcdir, "script/tests/vfstest-acl/run.sh"), binpath("vfstest"), "$PREFIX", configuration])
@@ -148,8 +125,31 @@ for env in ["s3dc", "member", "s3member"]:
     plantestsuite("samba3.blackbox.smbclient_auth.plain (%s)" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$DC_USERNAME', '$DC_PASSWORD', smbclient3, configuration])
     plantestsuite("samba3.blackbox.smbclient_auth.plain (%s) member creds" % env, env, [os.path.join(samba3srcdir, "script/tests/test_smbclient_auth.sh"), '$SERVER', '$SERVER_IP', '$SERVER\\\\$USERNAME', '$PASSWORD', smbclient3, configuration])
 
+    tests = ["--ping", "--separator",
+             "--own-domain",
+             "--all-domains",
+             "--trusted-domains",
+             "--domain-info=BUILTIN",
+             "--domain-info=$DOMAIN",
+             "--online-status",
+             "--online-status --domain=BUILTIN",
+             "--online-status --domain=$DOMAIN",
+             "--check-secret --domain=$DOMAIN",
+             "--change-secret --domain=$DOMAIN",
+             "--check-secret --domain=$DOMAIN",
+             "--online-status --domain=$DOMAIN",
+             #Didn't pass yet# "--domain-users",
+             "--domain-groups",
+             "--name-to-sid=$DC_USERNAME",
+             "--name-to-sid=$DOMAIN\\\\$DC_USERNAME",
+             #Didn't pass yet# "--user-info=$USERNAME",
+             "--user-groups=$DOMAIN\\\\$DC_USERNAME",
+             "--authenticate=$DOMAIN\\\\$DC_USERNAME%$DC_PASSWORD",
+             "--allocate-uid",
+             "--allocate-gid"]
+
     for t in tests:
-        plantestsuite("samba3.wbinfo_s3.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(samba3srcdir, "script/tests/test_wbinfo_s3.sh"), t])
+        plantestsuite("samba3.wbinfo_simple.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t])
 
     plantestsuite(
         "samba3.wbinfo_sids2xids.(%s:local)" % env, "%s:local" % env,
@@ -166,7 +166,7 @@ for env in ["member", "s3member"]:
 
 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])
+plantestsuite("samba3.wbinfo_simple.(%s:local).%s" % (env, t), "%s:local" % env, [os.path.join(srcdir(), "nsswitch/tests/test_wbinfo_simple.sh"), t])
 
 plantestsuite("samba3.ntlm_auth.krb5(ktest:local) old ccache", "ktest:local", [os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_krb5.sh"), valgrindify(python), samba3srcdir, ntlm_auth3, '$PREFIX/ktest/krb5_ccache-2', '$SERVER', configuration])