1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

s3:tests: Add substitution test for listing shares

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15243

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit c213ead8c4c1b5287294a67e65f271fbb0b922b2)
(cherry picked from commit 8f1ba9193b0a11a320754cfbde2ab42b68d61ad4)
This commit is contained in:
Andreas Schneider 2022-11-16 11:23:44 +01:00 committed by Jule Anger
parent 5ade6d20f3
commit ef39898066
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1 @@
samba3.substitutions.Test.for.share.enum.with.include.substitution

View File

@ -20,6 +20,7 @@ failed=0
samba_bindir="$BINDIR"
samba_srcdir="$SRCDIR"
smbclient="$samba_bindir/smbclient"
rpcclient="$samba_bindir/rpcclient"
. $samba_srcdir/testprogs/blackbox/subunit.sh
. $samba_srcdir/testprogs/blackbox/common_test_fns.inc
@ -59,4 +60,20 @@ test_smbclient_expect_failure \
"ls" "//${SERVER}/${USERNAME}_share" "-U$DC_USERNAME%$DC_PASSWORD" ||
failed=$((failed + 1))
testit_grep_count \
"Test for share enum with include substitution" \
"netname: ${USERNAME}_share" \
1 \
${rpcclient} "ncacn_np:${SERVER}" "-U$USERNAME%$PASSWORD" \
-c netshareenum ||
failed=$((failed + 1))
testit_grep_count \
"Negative test for share enum with include substitution" \
"netname: ${USERNAME}_share" \
0 \
${rpcclient} "ncacn_np:${SERVER}" "-U$DC_USERNAME%$DC_PASSWORD" \
-c netshareenum ||
failed=$((failed + 1))
exit $failed