mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
tests/ntlm_auth: Port ntlm_auth_diagnostics tests to python
Port ntlm_auth_diagnostics bash script tests to python Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Noel Power <npower@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Wed Dec 19 16:21:32 CET 2018 on sn-devel-144
This commit is contained in:
parent
4846d4a713
commit
fe7ab7d513
@ -314,3 +314,12 @@ class NTLMAuthHelpersTests(NTLMAuthTestCase):
|
||||
|
||||
self.assertEqual(len(lines), 5)
|
||||
self.assertEquals(lines[0], b"Authenticated: No")
|
||||
|
||||
def test_diagnostics(self):
|
||||
""" ntlm_auth diagnostics """
|
||||
cmd_line = [self.ntlm_auth_path,
|
||||
"--username", self.username,
|
||||
"--password", self.password,
|
||||
"--domain", self.domain,
|
||||
"--diagnostics"]
|
||||
self.check_exit_code(cmd_line, 0)
|
||||
|
@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
cat <<EOF
|
||||
Usage: test_ntlm_auth_diagnostics.sh NTLM_AUTH DOMAIN USERNAME PASSWORD
|
||||
EOF
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
NTLM_AUTH=$1
|
||||
DOMAIN=$2
|
||||
USERNAME=$3
|
||||
PASSWORD=$4
|
||||
shift 4
|
||||
|
||||
ADDARGS="$*"
|
||||
|
||||
incdir=`dirname $0`/../../../testprogs/blackbox
|
||||
. $incdir/subunit.sh
|
||||
|
||||
testit "ntlm_auth" $VALGRIND $NTLM_AUTH --domain=$DOMAIN --username=$USERNAME --password=$PASSWORD --diagnostics $ADDARGS || failed=`expr $failed + 1`
|
||||
|
||||
testok $0 $failed
|
@ -586,10 +586,6 @@ for env in ["nt4_dc", "nt4_member", "ad_dc", "ad_member", "s4member", "chgdcpass
|
||||
"samba.wbinfo_sids2xids.(%s:local)" % env, "%s:local" % env,
|
||||
[os.path.join(samba3srcdir, "script/tests/test_wbinfo_sids2xids.sh")])
|
||||
|
||||
plantestsuite(
|
||||
"samba.ntlm_auth.diagnostics(%s:local)" % env, "%s:local" % env,
|
||||
[os.path.join(samba3srcdir, "script/tests/test_ntlm_auth_diagnostics.sh"), ntlm_auth3, '$DOMAIN', '$DC_USERNAME', '$DC_PASSWORD', configuration])
|
||||
|
||||
planpythontestsuite(env + ":local", "samba.tests.ntlm_auth", py3_compatible=True)
|
||||
|
||||
for env in ["ktest"]:
|
||||
|
Loading…
Reference in New Issue
Block a user