summaryrefslogtreecommitdiffstats
path: root/debian/tests/smbclient-share-access
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:02 +0000
commit0a354ad0b2c9eaaa204c31db478da109dc6d2a8b (patch)
tree2467caa8ad20a7fca31bef64224e41a4238db0c9 /debian/tests/smbclient-share-access
parentAdding upstream version 2:4.20.0+dfsg. (diff)
downloadsamba-debian/2%4.20.0+dfsg-1_exp1.tar.xz
samba-debian/2%4.20.0+dfsg-1_exp1.zip
Adding debian version 2:4.20.0+dfsg-1~exp1.debian/2%4.20.0+dfsg-1_exp1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/smbclient-share-access')
-rw-r--r--debian/tests/smbclient-share-access23
1 files changed, 23 insertions, 0 deletions
diff --git a/debian/tests/smbclient-share-access b/debian/tests/smbclient-share-access
new file mode 100644
index 0000000..b124c0c
--- /dev/null
+++ b/debian/tests/smbclient-share-access
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -x
+set -e
+
+. debian/tests/util
+
+username="smbtest$$"
+password="$$"
+add_user "${username}" "${password}"
+
+myshare="myshare$$"
+add_share "${myshare}"
+
+echo "Creating file with random data and computing its md5"
+populate_share "${myshare}" "${username}"
+
+rm -f downloaded-data
+echo "Downloading file and comparing its md5"
+smbclient //localhost/"${myshare}" -U "${username}"%"${password}" -c "get data downloaded-data"
+
+mv -f downloaded-data data
+md5sum -c data.md5