diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-03-02 22:28:59 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-03-02 14:44:36 +0100 |
commit | 95976d4ec2111a5be7dab2698de35537a10536a1 (patch) | |
tree | c0de54c5d8ed068ab0695ebce85a5cc02565d092 /testprogs/blackbox | |
parent | 5d4144a82674467bccbfe30f42382ed0905026d0 (diff) | |
download | samba-95976d4ec2111a5be7dab2698de35537a10536a1.tar.gz |
selftest: Rework samba4.blackbox.bogusdomain to use a temporary user
This avoids leaving an account in the test environment after the test is run
and therefore avoids issues with interations with other tests.
Also, we now use the local administrator account in the member server to
add the test account.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Mar 2 14:44:36 CET 2012 on sn-devel-104
Diffstat (limited to 'testprogs/blackbox')
-rwxr-xr-x | testprogs/blackbox/bogus.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/testprogs/blackbox/bogus.sh b/testprogs/blackbox/bogus.sh index 019957bf70..68bab03f9c 100755 --- a/testprogs/blackbox/bogus.sh +++ b/testprogs/blackbox/bogus.sh @@ -13,8 +13,16 @@ SERVER=$1 SHARE=$2 USER=$3 PWD=$4 +DC_USER=$5 +DC_PWD=$6 +shift 6 + +TEST_USER=bogus_testuser +TEST_PWD=bogus_pass3#@ smbclient="$BINDIR/smbclient" -testit_expect_failure "smbclient" $smbclient "//$SERVER/$SHARE" -W POUET -U$USER%$PWD -c "dir"&& failed=`expr $failed + 1` -./bin/net rpc user add $USER $PWD -W $SERVER -U$USER%$PWD -S $SERVER -testit "smbclient" $smbclient "//$SERVER/$SHARE" -W POUET -U$USER%$PWD -c "dir"|| failed=`expr $failed + 1` +net="$BINDIR/net" +testit_expect_failure "smbclient" $smbclient "//$SERVER/$SHARE" -W POUET -U$DC_USER%$DC_PWD -c "dir"&& failed=`expr $failed + 1` +testit "net.user.add" $net rpc user add $TEST_USER $TEST_PWD -W $SERVER -U$SERVER\\$USER%$PWD -S $SERVER +testit "smbclient" $smbclient "//$SERVER/$SHARE" -W POUET -U$TEST_USER%$TEST_PWD -c "dir"|| failed=`expr $failed + 1` +testit "net.user.delete" $net rpc user delete $TEST_USER -W $SERVER -U$SERVER\\$USER%$PWD -S $SERVER exit $failed |