]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/script/tests: Add simple test for net share list
authorNoel Power <noel.power@suse.com>
Fri, 22 Nov 2019 16:53:08 +0000 (16:53 +0000)
committerRalph Boehme <slow@samba.org>
Thu, 5 Dec 2019 17:14:47 +0000 (17:14 +0000)
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 <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
selftest/knownfail
source3/script/tests/test_net_misc.sh

index 82259dcfe907a6f71db6b61cf56a0cccf15e9c2c..a3cef7e2bc770710991e9ebc400ccc611b29b21b 100644 (file)
 ^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
index afd6bed25991d74959fcec4a56662b9d23d5b9f2..cc8781c355b4a9f0975f13ff451ac6265e95e02c 100755 (executable)
@@ -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