| Line | |
|---|
| 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 | incdir=`dirname $0`
|
|---|
| 18 | . $incdir/test_functions.sh
|
|---|
| 19 |
|
|---|
| 20 | OLDIFS=$IFS;
|
|---|
| 21 |
|
|---|
| 22 | tests="--ping"
|
|---|
| 23 | tests="$tests:--separator"
|
|---|
| 24 | tests="$tests:--own-domain"
|
|---|
| 25 | tests="$tests:--all-domains"
|
|---|
| 26 | tests="$tests:--trusted-domains"
|
|---|
| 27 | tests="$tests:--domain-info=BUILTIN"
|
|---|
| 28 | tests="$tests:--domain-info=$domain"
|
|---|
| 29 | tests="$tests:--online-status"
|
|---|
| 30 | tests="$tests:--online-status --domain=BUILTIN"
|
|---|
| 31 | tests="$tests:--online-status --domain=$domain"
|
|---|
| 32 | #Didn't pass yet# tests="$tests:--domain-users"
|
|---|
| 33 | tests="$tests:--domain-groups"
|
|---|
| 34 | tests="$tests:--name-to-sid=$username"
|
|---|
| 35 | #Didn't pass yet# tests="$tests:--user-info=$username"
|
|---|
| 36 | tests="$tests:--user-groups=$username"
|
|---|
| 37 | tests="$tests:--allocate-uid"
|
|---|
| 38 | tests="$tests:--allocate-gid"
|
|---|
| 39 |
|
|---|
| 40 | failed=0
|
|---|
| 41 |
|
|---|
| 42 | OLDIFS=$IFS
|
|---|
| 43 | NEWIFS=$':'
|
|---|
| 44 | IFS=$NEWIFS
|
|---|
| 45 | for t in $tests; do
|
|---|
| 46 | IFS=$OLDIFS
|
|---|
| 47 | testit "wbinfo $t" $VALGRIND $BINDIR/wbinfo $CONFIGURATION $ADDARGS $t || failed=`expr $failed + 1`
|
|---|
| 48 | IFS=$NEWIFS
|
|---|
| 49 | done
|
|---|
| 50 | IFS=$OLDIFS
|
|---|
| 51 |
|
|---|
| 52 | testok $0 $failed
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.