summaryrefslogtreecommitdiffstats
path: root/source3/script/tests/test_user_in_sharelist.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsource3/script/tests/test_user_in_sharelist.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/source3/script/tests/test_user_in_sharelist.sh b/source3/script/tests/test_user_in_sharelist.sh
new file mode 100755
index 0000000..0069d6d
--- /dev/null
+++ b/source3/script/tests/test_user_in_sharelist.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+if [ $# -lt 2 ]; then
+ echo Usage: $0 RPCCLIENT SERVER
+ exit 1
+fi
+
+incdir=$(dirname $0)/../../../testprogs/blackbox
+. $incdir/subunit.sh
+
+failed=0
+
+RPCCLIENT="$1"; shift 1
+SERVER="$1"; shift 1
+
+"${RPCCLIENT}" "${SERVER}" -U"${USER}"%"${PASSWORD}" -c netshareenum |
+ grep "^netname: $USER\$"
+RC=$?
+testit "Verify username is listed in netshareenum due to [homes]" \
+ test $RC = 0 || failed=$((failed+1))
+
+testok $0 $failed