diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-12-14 16:54:01 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-14 16:56:10 +0100 |
commit | 28c7c831ed7b5ccf3567c7703964d6c1f6659d89 (patch) | |
tree | 0c525e1e3e603030e0d3c0560d615a7e914496f5 /source3 | |
parent | 9bcfb5af7dce2c2ef51b0164d87c23541fa4a222 (diff) | |
download | samba-28c7c831ed7b5ccf3567c7703964d6c1f6659d89.tar.gz samba-28c7c831ed7b5ccf3567c7703964d6c1f6659d89.tar.bz2 samba-28c7c831ed7b5ccf3567c7703964d6c1f6659d89.zip |
selftest: add a bunch of wbinfo based tests for winbindd
metze
(This used to be commit 88b6d2c0e83f515e2f83e5b4edc0728c434c7294)
Diffstat (limited to 'source3')
-rwxr-xr-x | source3/script/tests/test_wbinfo_s3.sh | 48 | ||||
-rwxr-xr-x | source3/script/tests/tests_all.sh | 1 |
2 files changed, 49 insertions, 0 deletions
diff --git a/source3/script/tests/test_wbinfo_s3.sh b/source3/script/tests/test_wbinfo_s3.sh new file mode 100755 index 0000000000..abd6146e1a --- /dev/null +++ b/source3/script/tests/test_wbinfo_s3.sh @@ -0,0 +1,48 @@ +#!/bin/sh + +if [ $# -lt 4 ]; then +cat <<EOF +Usage: test_wbinfo_s3.sh DOMAIN SERVER USERNAME PASSWORD <wbinfo args> +EOF +exit 1; +fi + +domain="$1" +server="$2" +username="$3" +password="$4" +shift 4 +ADDARGS="$*" + +incdir=`dirname $0` +. $incdir/test_functions.sh + +OLDIFS=$IFS; + +tests="--ping" +tests="$tests:--separator" +tests="$tests:--own-domain" +tests="$tests:--all-domains" +tests="$tests:--trusted-domains" +tests="$tests:--domain-info=BUILTIN" +tests="$tests:--domain-info=$server" +tests="$tests:--sequence" +tests="$tests:--sequence --domain=BUILTIN" +tests="$tests:--sequence --domain=$server" +#Didn't pass yet# tests="$tests:--domain-users" +tests="$tests:--domain-groups" +tests="$tests:--name-to-sid=$username" +#Didn't pass yet# tests="$tests:--user-info=$username" +tests="$tests:--user-groups=$username" + +OLDIFS=$IFS +NEWIFS=$':' +IFS=$NEWIFS +for t in $tests; do + IFS=$OLDIFS + testit "wbinfo $t" $VALGRIND $BINDIR/wbinfo $ADDARGS $t || failed=`expr $failed + 1` + IFS=$NEWIFS +done +IFS=$OLDIFS + +testok $0 $failed diff --git a/source3/script/tests/tests_all.sh b/source3/script/tests/tests_all.sh index dd593899e4..12789aa926 100755 --- a/source3/script/tests/tests_all.sh +++ b/source3/script/tests/tests_all.sh @@ -2,6 +2,7 @@ $SCRIPTDIR/test_local_s3.sh || failed=`expr $failed + $?` $SCRIPTDIR/test_smbtorture_s3.sh //$SERVER_IP/tmp $USERNAME $PASSWORD "" || failed=`expr $failed + $?` $SCRIPTDIR/test_smbclient_s3.sh $SERVER $SERVER_IP || failed=`expr $failed + $?` +$SCRIPTDIR/test_wbinfo_s3.sh $WORKGROUP $SERVER $USERNAME $PASSWORD || failed=`expr $failed + $?` SMBTORTURE4VERSION=`$SMBTORTURE4 --version` if [ -n "$SMBTORTURE4" -a -n "$SMBTORTURE4VERSION" ];then |