9758014a3d08ac6fea698f942b14b1f1ebdbb51e
[ira/wip.git] / source3 / script / tests / test_wbinfo_s3.sh
1 #!/bin/sh
2
3 if [ $# -lt 4 ]; then
4 cat <<EOF
5 Usage: test_wbinfo_s3.sh DOMAIN SERVER USERNAME PASSWORD <wbinfo args>
6 EOF
7 exit 1;
8 fi
9
10 domain="$1"
11 server="$2"
12 username="$3"
13 password="$4"
14 shift 4
15 ADDARGS="$*"
16
17 test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
18 incdir=`dirname $0`
19 . $incdir/test_functions.sh
20 }
21
22 OLDIFS=$IFS;
23
24 tests="--ping"
25 tests="$tests:--separator"
26 tests="$tests:--own-domain"
27 tests="$tests:--all-domains"
28 tests="$tests:--trusted-domains"
29 tests="$tests:--domain-info=BUILTIN"
30 tests="$tests:--domain-info=$domain"
31 tests="$tests:--online-status"
32 tests="$tests:--online-status --domain=BUILTIN"
33 tests="$tests:--online-status --domain=$domain"
34 #Didn't pass yet# tests="$tests:--domain-users"
35 tests="$tests:--domain-groups"
36 tests="$tests:--name-to-sid=$username"
37 #Didn't pass yet# tests="$tests:--user-info=$username"
38 tests="$tests:--user-groups=$username"
39 tests="$tests:--allocate-uid"
40 tests="$tests:--allocate-gid"
41
42 failed=0
43
44 OLDIFS=$IFS
45 NEWIFS=$':'
46 IFS=$NEWIFS
47 for t in $tests; do
48    IFS=$OLDIFS
49    testit "wbinfo $t" $VALGRIND $BINDIR/wbinfo $ADDARGS $t || failed=`expr $failed + 1`
50    IFS=$NEWIFS
51 done
52 IFS=$OLDIFS
53
54 testok $0 $failed