From 7293767a8b1a87aad8bb2b536de8a28dfac2f866 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 16 Mar 2015 10:27:56 +0100 Subject: [PATCH] selftest: make blackbox.passwords test independent of test environment. This also prevents the test from cluttering the main selftest directort with temporary data. Signed-off-by: Michael Adam Reviewed-by: Andrew Bartlett --- source4/selftest/tests.py | 2 +- testprogs/blackbox/test_passwords.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index 038513d9d10..163170d484f 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -303,7 +303,7 @@ plantestsuite("samba4.blackbox.kinit(dc:local)", "dc:local", [os.path.join(bbdir plantestsuite("samba4.blackbox.kinit(fl2000dc:local)", "fl2000dc:local", [os.path.join(bbdir, "test_kinit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', "arcfour-hmac-md5", smbclient4, configuration]) plantestsuite("samba4.blackbox.kinit(fl2008r2dc:local)", "fl2008r2dc:local", [os.path.join(bbdir, "test_kinit.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", smbclient4, configuration]) plantestsuite("samba4.blackbox.ktpass(dc)", "dc", [os.path.join(bbdir, "test_ktpass.sh"), '$PREFIX']) -plantestsuite("samba4.blackbox.passwords(dc:local)", "dc:local", [os.path.join(bbdir, "test_passwords.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', "$PREFIX", smbclient4]) +plantestsuite("samba4.blackbox.passwords(dc:local)", "dc:local", [os.path.join(bbdir, "test_passwords.sh"), '$SERVER', '$USERNAME', '$PASSWORD', '$REALM', '$DOMAIN', "$PREFIX/dc", smbclient4]) plantestsuite("samba4.blackbox.export.keytab(dc:local)", "dc:local", [os.path.join(bbdir, "test_export_keytab.sh"), '$SERVER', '$USERNAME', '$REALM', '$DOMAIN', "$PREFIX", smbclient4]) plantestsuite("samba4.blackbox.cifsdd(dc)", "dc", [os.path.join(samba4srcdir, "client/tests/test_cifsdd.sh"), '$SERVER', '$USERNAME', '$PASSWORD', "$DOMAIN"]) plantestsuite("samba4.blackbox.nmblookup(dc)", "dc", [os.path.join(samba4srcdir, "utils/tests/test_nmblookup.sh"), '$NETBIOSNAME', '$NETBIOSALIAS', '$SERVER', '$SERVER_IP', nmblookup4]) diff --git a/testprogs/blackbox/test_passwords.sh b/testprogs/blackbox/test_passwords.sh index 9dbef8549f0..09d70eb3436 100755 --- a/testprogs/blackbox/test_passwords.sh +++ b/testprogs/blackbox/test_passwords.sh @@ -70,7 +70,7 @@ do_kinit() { UID_WRAPPER_ROOT=1 export UID_WRAPPER_ROOT -CONFIG="--configfile=$PREFIX/dc/etc/smb.conf" +CONFIG="--configfile=$PREFIX/etc/smb.conf" export CONFIG testit "reset password policies beside of minimum password age of 0 days" $VALGRIND $samba_tool domain passwordsettings $CONFIG set --complexity=default --history-length=default --min-pwd-length=default --min-pwd-age=0 --max-pwd-age=default || failed=`expr $failed + 1` @@ -176,7 +176,7 @@ expect Retype new SMB password: send ${NEWUSERPASS}\n EOF -testit "set user password with smbpasswd" $texpect ./tmpsmbpasswdscript $smbpasswd -L -c $PREFIX/dc/etc/smb.conf nettestuser || failed=`expr $failed + 1` +testit "set user password with smbpasswd" $texpect ./tmpsmbpasswdscript $smbpasswd -L -c $PREFIX/etc/smb.conf nettestuser || failed=`expr $failed + 1` USERPASS=$NEWUSERPASS test_smbclient "Test login with user (ntlm)" 'ls' -k no -Unettestuser@$REALM%$NEWUSERPASS || failed=`expr $failed + 1` @@ -226,7 +226,7 @@ expect Retype new SMB password: send ${NEWUSERPASS}\n EOF -testit "change user password with smbpasswd (after must change flag set)" $texpect ./tmpsmbpasswdscript $smbpasswd -r $SERVER -c $PREFIX/dc/etc/smb.conf -U nettestuser || failed=`expr $failed + 1` +testit "change user password with smbpasswd (after must change flag set)" $texpect ./tmpsmbpasswdscript $smbpasswd -r $SERVER -c $PREFIX/etc/smb.conf -U nettestuser || failed=`expr $failed + 1` USERPASS=$NEWUSERPASS -- 2.11.4.GIT