samba-tool: updated test suite to account for newuser change
authorGiampaolo Lauria <lauria2@yahoo.com>
Wed, 27 Jul 2011 19:44:34 +0000 (15:44 -0400)
committerAndrew Tridgell <tridge@samba.org>
Thu, 28 Jul 2011 05:20:51 +0000 (15:20 +1000)
Updated test suite invocations of newuser to "user add" as
the newuser functionality is now being moved to "user add"

Signed-off-by: Andrew Tridgell <tridge@samba.org>
source4/setup/tests/blackbox_group.sh
source4/setup/tests/blackbox_newuser.sh
source4/setup/tests/blackbox_setpassword.sh
testprogs/blackbox/test_export_keytab.sh
testprogs/blackbox/test_ktpass.sh
testprogs/blackbox/test_passwords.sh
wintest/test-s4-howto.py

index 1a9e26bd04fc8e1ad329cc1cee5e6e4337d9b87b..6c58e91dfd2939e985af3e9dd4b9f847ccaac63f 100755 (executable)
@@ -20,8 +20,8 @@ samba_tool="./bin/samba-tool"
 CONFIG="--configfile=$PREFIX/simple-dc/etc/smb.conf"
 
 #creation of two test subjects
-testit "newuser" $samba_tool newuser $CONFIG --given-name="User" --surname="Tester" --initial="UT" testuser testp@ssw0Rd
-testit "newuser" $samba_tool newuser $CONFIG --given-name="User1" --surname="Tester" --initial="UT" testuser1 testp@ssw0Rd
+testit "user add" $samba_tool user add $CONFIG --given-name="User" --surname="Tester" --initial="UT" testuser testp@ssw0Rd
+testit "user add" $samba_tool user add $CONFIG --given-name="User1" --surname="Tester" --initial="UT" testuser1 testp@ssw0Rd
 
 #test creation of six different groups
 testit "group add" $samba_tool group add $CONFIG --group-scope='Domain' --group-type='Security' --description='DomainSecurityGroup' --mail-address='dsg@samba.org' --notes='Notes' dsg
index 3f3e2bd3fbd8409b97bececf914a8384363ebfb8..c6046846ea4a6010e99cadc29e12a90a7072736d 100755 (executable)
@@ -22,8 +22,8 @@ CONFIG="--configfile=$PREFIX/simple-dc/etc/smb.conf"
 #two test for creating new user
 #newuser  account is created with cn=Given Name Initials. Surname
 #newuser1 account is created using cn=username
-testit "newuser" $samba_tool newuser $CONFIG --given-name="User" --surname="Tester" --initials="T" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" NewUser testp@ssw0Rd
-testit "newuser" $samba_tool newuser $CONFIG --use-username-as-cn --given-name="User1" --surname="Tester1" --initials="UT1" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" NewUser1 testp@ssw0Rd
+testit "user add" $samba_tool user add $CONFIG --given-name="User" --surname="Tester" --initials="T" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" NewUser testp@ssw0Rd
+testit "user add" $samba_tool user add $CONFIG --use-username-as-cn --given-name="User1" --surname="Tester1" --initials="UT1" --profile-path="\\\\myserver\\my\\profile" --script-path="\\\\myserver\\my\\script" --home-directory="\\\\myserver\\my\\homedir" --job-title="Tester" --department="Testing" --company="Samba.org" --description="Description" --mail-address="tester@samba.org" --internet-address="http://samba.org" --telephone-number="001122334455" --physical-delivery-office="101" --home-drive="H:" NewUser1 testp@ssw0Rd
 
 # check the enable account script
 testit "enableaccount" $samba_tool user enable $CONFIG NewUser
index 84194e846593d9978d8d1b6c8fd5f945c72d6755..8858767ef73a7ffc65e582a99f1603ca36e406b0 100755 (executable)
@@ -17,7 +17,7 @@ samba_tool="./bin/samba-tool"
 rm -rf $PREFIX/simple-dc
 testit "simple-dc" $PYTHON $SRCDIR/source4/setup/provision --server-role="dc" --domain=FOO --realm=foo.example.com --domain-sid=S-1-5-21-4177067393-1453636373-93818738 --targetdir=$PREFIX/simple-dc
 
-testit "newuser" $samba_tool newuser --configfile=$PREFIX/simple-dc/etc/smb.conf testuser testp@ssw0Rd
+testit "user add" $samba_tool user add --configfile=$PREFIX/simple-dc/etc/smb.conf testuser testp@ssw0Rd
 
 testit "setpassword" $samba_tool user setpassword --configfile=$PREFIX/simple-dc/etc/smb.conf testuser --newpassword=testp@ssw0Rd
 
index fc25a9f807bf5fb4ca52fb83c9527a3d642c52f9..81db5204419bd80f459dca3d23ada06dde0f45c8 100755 (executable)
@@ -22,7 +22,7 @@ samba4bindir="$BINDIR"
 smbclient="$samba4bindir/smbclient$EXEEXT"
 samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
 samba_tool="$samba4bindir/samba-tool$EXEEXT"
-newuser="$samba_tool newuser"
+newuser="$samba_tool user add"
 
 . `dirname $0`/subunit.sh
 
index 33adba42713974adf4968fb4ec29e9a246065553..348916d7792e22b730a8d13a964b0610517ed117 100755 (executable)
@@ -21,7 +21,7 @@ CONFIG="--configfile=$PREFIX/dc/etc/smb.conf"
 
 TESTUSER="ktpassUser"
 
-testit "newuser" $samba_tool newuser $CONFIG $TESTUSER testp@ssw0Rd || failed=`expr $failed + 1`
+testit "user add" $samba_tool user add $CONFIG $TESTUSER testp@ssw0Rd || failed=`expr $failed + 1`
 
 KRB5CCNAME="$PREFIX/tmpccache"
 export KRB5CCNAME
index dc5eaa1a3b34c48e936443c15ab37aed6e15610a..179aec35c17573779403682f621f87d846b983f7 100755 (executable)
@@ -25,7 +25,7 @@ samba4kinit="$samba4bindir/samba4kinit$EXEEXT"
 samba_tool="$samba4bindir/samba-tool$EXEEXT"
 rkpty="$samba4bindir/rkpty$EXEEXT"
 samba4kpasswd="$samba4bindir/samba4kpasswd$EXEEXT"
-newuser="$samba_tool newuser"
+newuser="$samba_tool user add"
 
 . `dirname $0`/subunit.sh
 
index abd6eebccdd3722e23ed6b92462140e491e28cba..294a94e7481d449c8d88f60ee256cf14561b78e1 100755 (executable)
@@ -39,8 +39,8 @@ def provision_s4(t, func_level="2008"):
     if t.getvar('INTERFACE_IPV6'):
         provision.append('--host-ip6=${INTERFACE_IPV6}')
     t.run_cmd(provision)
-    t.run_cmd('bin/samba-tool newuser testallowed ${PASSWORD1}')
-    t.run_cmd('bin/samba-tool newuser testdenied ${PASSWORD1}')
+    t.run_cmd('bin/samba-tool user add testallowed ${PASSWORD1}')
+    t.run_cmd('bin/samba-tool user add testdenied ${PASSWORD1}')
     t.run_cmd('bin/samba-tool group addmembers "Allowed RODC Password Replication Group" testallowed')
 
 
@@ -259,7 +259,7 @@ def test_dcpromo(t, vm):
     child.expect("was successful")
 
     t.info("Checking if new users propogate to windows")
-    t.retry_cmd('bin/samba-tool newuser test2 ${PASSWORD2}', ["created successfully"])
+    t.retry_cmd('bin/samba-tool user add test2 ${PASSWORD2}', ["created successfully"])
     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k no", ['Sharename', 'Remote IPC'])
     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k yes", ['Sharename', 'Remote IPC'])
 
@@ -373,7 +373,7 @@ def test_dcpromo_rodc(t, vm):
                    regex=True)
 
     t.info("Checking if new users are available on windows")
-    t.run_cmd('bin/samba-tool newuser test2 ${PASSWORD2}')
+    t.run_cmd('bin/samba-tool user add test2 ${PASSWORD2}')
     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k yes", ['Sharename', 'Remote IPC'])
     t.retry_cmd("bin/samba-tool drs replicate ${WIN_HOSTNAME}.${LCREALM} ${HOSTNAME}.${LCREALM} ${BASEDN}", ["was successful"])
     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${LCREALM} -Utest2%${PASSWORD2} -k no", ['Sharename', 'Remote IPC'])
@@ -445,7 +445,7 @@ def test_join_as_dc(t, vm):
     child.expect("was successful")
 
     t.info("Checking if new users propogate to windows")
-    t.retry_cmd('bin/samba-tool newuser test2 ${PASSWORD2}', ["created successfully"])
+    t.retry_cmd('bin/samba-tool user add test2 ${PASSWORD2}', ["created successfully"])
     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${WIN_REALM} -Utest2%${PASSWORD2} -k no", ['Sharename', 'Remote IPC'])
     t.retry_cmd("bin/smbclient -L ${WIN_HOSTNAME}.${WIN_REALM} -Utest2%${PASSWORD2} -k yes", ['Sharename', 'Remote IPC'])
 
@@ -528,7 +528,7 @@ def test_join_as_rodc(t, vm):
 
     # should this work?
     t.info("Checking if new users propogate to windows")
-    t.cmd_contains('bin/samba-tool newuser test2 ${PASSWORD2}', ['No RID Set DN'])
+    t.cmd_contains('bin/samba-tool user add test2 ${PASSWORD2}', ['No RID Set DN'])
 
     t.info("Checking propogation of user deletion")
     child.sendline("net user test3 /del")