Add and modify some of the various tests I have had sitting around here for a
[kai/samba.git] / testsuite / build_farm / basicsmb-domainsec.test
1 if [ $whoami != "root" ]; then
2         exit 0;
3 fi
4
5 . basicsmb.fns
6
7 test_joindomain() {
8         test_joindomain_password="$1"
9
10         echo "$prefix/bin/smbpasswd -L -j TESTWG -U $whoami%$test_join_domain_password"
11         $prefix/bin/smbpasswd -L -j TESTWG -U $whoami%$test_join_domain_password
12         status=$?
13         if [ $status = 0 ]; then
14             echo "smbpasswd correctly joined the domain ($workgroup)"
15         else
16             echo "smbpasswd failed to join the domain ($workgroup)! (status $status)"
17             return 1
18         fi
19         return 0
20 }
21
22 password=samba
23 security=DOMAIN
24 (test_smb_conf_setup && test_smbpasswd $password ) || exit 1
25
26 test_joindomain $password || exit 1
27
28 test_listfilesauth $security  || exit 1
29 test_listfilesnpw $security  || exit 1
30