From 5a37d3217a257b28d94b04d2637585e71e80d33c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 9 Jun 2011 16:20:15 +1000 Subject: s3-selftest Add test for smbclient --authentication-file Autobuild-User: Andrew Bartlett Autobuild-Date: Thu Jun 9 13:49:59 CEST 2011 on sn-devel-104 --- source3/script/tests/test_smbclient_s3.sh | 58 ++++++++++++++++++++++++++----- 1 file changed, 50 insertions(+), 8 deletions(-) (limited to 'source3/script/tests') diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh index 60c3610ee8..8937c97bbe 100755 --- a/source3/script/tests/test_smbclient_s3.sh +++ b/source3/script/tests/test_smbclient_s3.sh @@ -4,22 +4,23 @@ if [ $# -lt 7 ]; then cat < $tmpfile <&1 + ret=$? + rm $tmpfile + + if [ $ret != 0 ] ; then + echo "smbclient failed to use auth file" + false + return + fi + + cat > $tmpfile <&1 + ret=$? + rm $tmpfile + + if [ $ret -eq 0 ] ; then + echo "smbclient succeeded with wrong auth file credentials" + false + return + fi +} + LOGDIR_PREFIX=test_smbclient_s3 # possibly remove old logdirs: @@ -492,6 +530,10 @@ testit "sending a message to the remote server" \ test_message || \ failed=`expr $failed + 1` +testit "using an authentication file" \ + test_auth_file || \ + failed=`expr $failed + 1` + testit "rm -rf $LOGDIR" \ rm -rf $LOGDIR || \ failed=`expr $failed + 1` -- cgit