diff options
author | Andreas Schneider <asn@samba.org> | 2022-11-16 11:23:44 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2022-11-18 18:17:28 +0000 |
commit | c213ead8c4c1b5287294a67e65f271fbb0b922b2 (patch) | |
tree | 958b3f9be4a25d8bca9628c6cc176cd481a2d2b6 /source3/script/tests | |
parent | ce3d27a9f5a98b4680af5fb5a595b0e7e94f8c30 (diff) | |
download | samba-c213ead8c4c1b5287294a67e65f271fbb0b922b2.tar.gz |
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>
Diffstat (limited to 'source3/script/tests')
-rwxr-xr-x | source3/script/tests/test_substitutions.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/script/tests/test_substitutions.sh b/source3/script/tests/test_substitutions.sh index 0ccd45aa55e..aa0b38d1b64 100755 --- a/source3/script/tests/test_substitutions.sh +++ b/source3/script/tests/test_substitutions.sh @@ -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 |