From: Noel Power Date: Fri, 22 Nov 2019 16:53:08 +0000 (+0000) Subject: s3/script/tests: Add simple test for net share list X-Git-Tag: ldb-2.1.0~441 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=66443fe9340f1ae3894016fd7be51780f4c631b4;p=thirdparty%2Fsamba.git s3/script/tests: Add simple test for net share list Adding a test for the net share list command. Currently this command will fail because of a bug in the net command when it tries to see if rpc is supported. This change adds a known fail to swallow this error. A future commit will fix the net command and remove the known fail Signed-off-by: Noel Power Reviewed-by: Ralph Boehme --- diff --git a/selftest/knownfail b/selftest/knownfail index 82259dcfe90..a3cef7e2bc7 100644 --- a/selftest/knownfail +++ b/selftest/knownfail @@ -375,3 +375,4 @@ ^samba.tests.ntlmdisabled.python\(ktest\).python2.ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ktest\) ^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python3.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\) ^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python2.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\) +^samba3.blackbox.net.misc.lookup share list\(nt4_dc:local\) # when attempting to figure out if rpc is available test will fail because it tries to do this with smb1 which cannot be negotiated with this env diff --git a/source3/script/tests/test_net_misc.sh b/source3/script/tests/test_net_misc.sh index afd6bed2599..cc8781c355b 100755 --- a/source3/script/tests/test_net_misc.sh +++ b/source3/script/tests/test_net_misc.sh @@ -24,6 +24,7 @@ fi NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION" NETTIME="${NET} --option=clientmaxprotocol=${PROTOCOL} time" NETLOOKUP="${NET} --option=clientmaxprotocol=${PROTOCOL} lookup" +NETSHARE="${NET} -U${USERNAME}%${PASSWORD} --option=clientmaxprotocol=${PROTOCOL} -S ${SERVER} share" incdir=`dirname $0`/../../../testprogs/blackbox . $incdir/subunit.sh @@ -44,6 +45,13 @@ test_lookup() ${NETLOOKUP} ${PARAM} } +test_share() +{ + PARAM="$1" + + ${NETSHARE} ${PARAM} +} + testit "get the time" \ test_time || \ failed=`expr $failed + 1` @@ -64,5 +72,10 @@ testit "lookup the master browser" \ test_lookup master || \ failed=`expr $failed + 1` +# This test attempts to lookup shares +testit "lookup share list" \ + test_share list || \ + failed=`expr $failed + 1` + testok $0 $failed