1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

s3:tests: Reformat test_smbclient_basic.sh

shfmt -f source3/script/| xargs shfmt -w -p -i 0 -fn

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
Andreas Schneider 2022-04-22 15:34:10 +02:00 committed by Günther Deschner
parent c0e1566e25
commit c112b07337

View File

@ -3,10 +3,10 @@
# this runs the file serving tests that are expected to pass with samba3 against shares with various options # this runs the file serving tests that are expected to pass with samba3 against shares with various options
if [ $# -lt 5 ]; then if [ $# -lt 5 ]; then
cat <<EOF cat <<EOF
Usage: test_smbclient_basic.sh SERVER SERVER_IP DOMAIN USERNAME PASSWORD SMBCLIENT <smbclient arguments> Usage: test_smbclient_basic.sh SERVER SERVER_IP DOMAIN USERNAME PASSWORD SMBCLIENT <smbclient arguments>
EOF EOF
exit 1; exit 1
fi fi
SERVER="$1" SERVER="$1"
@ -18,21 +18,21 @@ CONFIGURATION="$6"
shift 6 shift 6
ADDARGS="$@" ADDARGS="$@"
incdir=`dirname $0`/../../../testprogs/blackbox incdir=$(dirname $0)/../../../testprogs/blackbox
. $incdir/subunit.sh . $incdir/subunit.sh
. $incdir/common_test_fns.inc . $incdir/common_test_fns.inc
# TEST using \ as the separator (default) # TEST using \ as the separator (default)
test_smbclient "smbclient as $DOMAIN\\$USERNAME" 'ls' "//$SERVER/tmp" -U$DOMAIN\\$USERNAME%$PASSWORD $ADDARGS || failed=`expr $failed + 1` test_smbclient "smbclient as $DOMAIN\\$USERNAME" 'ls' "//$SERVER/tmp" -U$DOMAIN\\$USERNAME%$PASSWORD $ADDARGS || failed=$(expr $failed + 1)
# TEST using / as the separator (default) # TEST using / as the separator (default)
test_smbclient "smbclient as $DOMAIN/$USERNAME" 'ls' "//$SERVER/tmp" -U$DOMAIN/$USERNAME%$PASSWORD $ADDARGS || failed=`expr $failed + 1` test_smbclient "smbclient as $DOMAIN/$USERNAME" 'ls' "//$SERVER/tmp" -U$DOMAIN/$USERNAME%$PASSWORD $ADDARGS || failed=$(expr $failed + 1)
# TEST using 'winbind separator = +' # TEST using 'winbind separator = +'
test_smbclient "smbclient as $DOMAIN+$USERNAME" 'ls' "//$SERVER/tmp" -U$DOMAIN+$USERNAME%$PASSWORD $ADDARGS --option=winbindseparator=+ || failed=`expr $failed + 1` test_smbclient "smbclient as $DOMAIN+$USERNAME" 'ls' "//$SERVER/tmp" -U$DOMAIN+$USERNAME%$PASSWORD $ADDARGS --option=winbindseparator=+ || failed=$(expr $failed + 1)
# TEST using 'winbind separator = +' set in a config file # TEST using 'winbind separator = +' set in a config file
smbclient_config="$PREFIX/tmpsmbconf" smbclient_config="$PREFIX/tmpsmbconf"
cat > $smbclient_config <<EOF cat >$smbclient_config <<EOF
[global] [global]
include = $(echo $CONFIGURATION | cut -d= -f2) include = $(echo $CONFIGURATION | cut -d= -f2)
winbind separator = + winbind separator = +
@ -40,7 +40,7 @@ EOF
SAVE_CONFIGURATION="$CONFIGURATION" SAVE_CONFIGURATION="$CONFIGURATION"
CONFIGURATION="--configfile=$smbclient_config" CONFIGURATION="--configfile=$smbclient_config"
test_smbclient "smbclient as $DOMAIN+$USERNAME" 'ls' "//$SERVER/tmp" -U$DOMAIN+$USERNAME%$PASSWORD $ADDARGS || failed=`expr $failed + 1` test_smbclient "smbclient as $DOMAIN+$USERNAME" 'ls' "//$SERVER/tmp" -U$DOMAIN+$USERNAME%$PASSWORD $ADDARGS || failed=$(expr $failed + 1)
CONFIGURATION="$SAVE_CONFIGURATION" CONFIGURATION="$SAVE_CONFIGURATION"
rm -rf $smbclient_config rm -rf $smbclient_config