diff options
| author | Garming Sam <garming@catalyst.net.nz> | 2013-11-29 16:51:08 +1300 |
|---|---|---|
| committer | Stefan Metzmacher <metze@samba.org> | 2013-12-23 09:18:15 +0100 |
| commit | 0e46205ff83d137ca486868e4376b258b6dfa1a2 (patch) | |
| tree | b8244506c9e8a8b9fa119cf3bdcdcde04bed0cd0 /source3 | |
| parent | ae6720117ae5fb3c922486ce46e2b0d51e020301 (diff) | |
| download | samba-0e46205ff83d137ca486868e4376b258b6dfa1a2.tar.gz samba-0e46205ff83d137ca486868e4376b258b6dfa1a2.tar.xz samba-0e46205ff83d137ca486868e4376b258b6dfa1a2.zip | |
selftest: add new rpc client test
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
| -rwxr-xr-x | source3/script/tests/test_rpcclient_samlogon.sh | 27 | ||||
| -rwxr-xr-x | source3/selftest/tests.py | 2 |
2 files changed, 29 insertions, 0 deletions
diff --git a/source3/script/tests/test_rpcclient_samlogon.sh b/source3/script/tests/test_rpcclient_samlogon.sh new file mode 100755 index 0000000000..01af7f80a1 --- /dev/null +++ b/source3/script/tests/test_rpcclient_samlogon.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +if [ $# -lt 3 ]; then +cat <<EOF +Usage: test_rpcclient_samlogon.sh USERNAME PASSWORD binding <rpcclient commands> +EOF +exit 1; +fi + +USERNAME="$1" +PASSWORD="$2" +shift 2 +ADDARGS="$*" + +rpcclient_samlogon() +{ + $VALGRIND $BINDIR/rpcclient -U% -c "samlogon $USERNAME $PASSWORD;samlogon $USERNAME $PASSWORD" $@ +} + + +incdir=`dirname $0`/../../../testprogs/blackbox +. $incdir/subunit.sh +testit "rpcclient dsenumdomtrusts" $VALGRIND $BINDIR/rpcclient $ADDARGS -U% -c "dsenumdomtrusts" || failed=`expr $failed + 1` +testit "rpcclient getdcsitecoverage" $VALGRIND $BINDIR/rpcclient $ADDARGS -U% -c "getdcsitecoverage" || failed=`expr $failed + 1` +testit "rpcclient samlogon" rpcclient_samlogon $ADDARGS || failed=`expr $failed +1` + +testok $0 $failed diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index b6425859af..d9d2f91166 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -395,6 +395,8 @@ for s in signseal_options: plantestsuite("samba3.blackbox.rpcclient krb5 ncacn_np with [%s%s%s] " % (a, s, e), "ktest:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"), "$PREFIX/ktest/krb5_ccache-3", binding_string, "-k", configuration]) +plantestsuite("samba3.blackbox.rpcclient_samlogon", "s3member:local", [os.path.join(samba3srcdir, "script/tests/test_rpcclient_samlogon.sh"), + "$DC_USERNAME", "$DC_PASSWORD", "ncacn_np:$DC_SERVER", configuration]) options_list = ["", "-e"] for options in options_list: |
