From 8daa83a594a2e98f39d764422bfbdbc62c9efd44 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 19:20:00 +0200 Subject: Adding upstream version 2:4.20.0+dfsg. Signed-off-by: Daniel Baumann --- source3/script/tests/test_smbpasswd.sh | 133 +++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100755 source3/script/tests/test_smbpasswd.sh (limited to 'source3/script/tests/test_smbpasswd.sh') diff --git a/source3/script/tests/test_smbpasswd.sh b/source3/script/tests/test_smbpasswd.sh new file mode 100755 index 0000000..b4d4f40 --- /dev/null +++ b/source3/script/tests/test_smbpasswd.sh @@ -0,0 +1,133 @@ +#!/bin/sh +# +# Blackbox tests for smbpasswd +# +# Copyright (c) 2015-2016 Andreas Schneider +# + +if [ $# -lt 4 ]; then + cat <$tmpfile <$tmpfile </dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + echo "Failed to change password for user $user" + echo "$out" + return 1 + fi +} + +testit "Create user $samba_test_user" \ + create_local_smb_user $samba_test_user $samba_test_user_pwd || + failed=$(expr $failed + 1) + +testit "Change user password" \ + test_smbpasswd $samba_test_user $samba_test_user_pwd $samba_test_user_new_pwd || + failed=$(expr $failed + 1) + +testit "Delete user $samba_test_user" \ + delete_local_smb_user $samba_test_user || + failed=$(expr $failed + 1) + +exit $failed -- cgit v1.2.3