summaryrefslogtreecommitdiff
path: root/source3/script/tests
diff options
context:
space:
mode:
Diffstat (limited to 'source3/script/tests')
-rwxr-xr-xsource3/script/tests/test_smbget.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/source3/script/tests/test_smbget.sh b/source3/script/tests/test_smbget.sh
index bb9fde3838c..9afbe240138 100755
--- a/source3/script/tests/test_smbget.sh
+++ b/source3/script/tests/test_smbget.sh
@@ -375,6 +375,35 @@ test_limit_rate()
return 0
}
+test_encrypt()
+{
+ clear_download_area
+ $SMBGET --verbose --encrypt -U$USERNAME%$PASSWORD smb://$SERVER_IP/smbget/testfile
+ if [ $? -ne 0 ]; then
+ echo 'ERROR: RC does not match, expected: 0'
+ return 1
+ fi
+ cmp --silent $WORKDIR/testfile ./testfile
+ if [ $? -ne 0 ]; then
+ echo 'ERROR: file content does not match'
+ return 1
+ fi
+
+ clear_download_area
+ $SMBGET --verbose --client-protection=encrypt -U$USERNAME%$PASSWORD smb://$SERVER_IP/smbget/testfile
+ if [ $? -ne 0 ]; then
+ echo 'ERROR: RC does not match, expected: 0'
+ return 1
+ fi
+ cmp --silent $WORKDIR/testfile ./testfile
+ if [ $? -ne 0 ]; then
+ echo 'ERROR: file content does not match'
+ return 1
+ fi
+
+ return 0
+}
+
create_test_data
@@ -429,6 +458,9 @@ testit "msdfs.upn" test_msdfs_link_upn ||
testit "limit rate" test_limit_rate ||
failed=$((failed + 1))
+testit "encrypt" test_encrypt ||
+ failed=$((failed + 1))
+
clear_download_area
popd # TMPDIR