mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s3:tests: Reformat test_rpcclientsrvsvc.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> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Jun 8 14:13:35 UTC 2022 on sn-devel-184
This commit is contained in:
parent
c4b343e54b
commit
8e701978a7
@ -5,10 +5,10 @@
|
||||
# Copyright (C) 2015 Christof Schmitt
|
||||
|
||||
if [ $# -lt 5 ]; then
|
||||
cat <<EOF
|
||||
cat <<EOF
|
||||
Usage: test_net_srvsvc.sh USERNAME PASSWORD SERVER RPCCLIENT SHARE1
|
||||
EOF
|
||||
exit 1;
|
||||
exit 1
|
||||
fi
|
||||
|
||||
USERNAME="$1"
|
||||
@ -34,20 +34,20 @@ $RPCCLIENTCMD -c "netsharegetinfo $SHARE1"
|
||||
RC=$?
|
||||
testit "getinfo on S$SHARE1" test $RC = 0 || failed=$(expr $failed + 1)
|
||||
|
||||
SHAREPATH=$($RPCCLIENTCMD -c "netsharegetinfo '$SHARE1'" | \
|
||||
SHAREPATH=$($RPCCLIENTCMD -c "netsharegetinfo '$SHARE1'" |
|
||||
grep path: | sed -e 's/.*path:\t//')
|
||||
testit "verifying $SHARE1 path" test -n "$SHAREPATH" || \
|
||||
testit "verifying $SHARE1 path" test -n "$SHAREPATH" ||
|
||||
failed=$(expr $failed + 1)
|
||||
|
||||
# Add a new share
|
||||
|
||||
$RPCCLIENTCMD -c "netshareadd '$SHAREPATH' '$SHARENAME' '$MAX_USERS' '$COMMENT'"
|
||||
RC=$?
|
||||
testit "netshareadd" test $RC = 0 || failed=$(expr $failed + 1)
|
||||
testit "netshareadd" test $RC = 0 || failed=$(expr $failed + 1)
|
||||
|
||||
# Verify comment for new share
|
||||
|
||||
COMMENT_RET=$($RPCCLIENTCMD -c "netsharegetinfo '$SHARENAME'" | \
|
||||
COMMENT_RET=$($RPCCLIENTCMD -c "netsharegetinfo '$SHARENAME'" |
|
||||
grep remark: | sed -e 's/.*remark:\t//')
|
||||
|
||||
test "$COMMENT" = "$COMMENT_RET"
|
||||
@ -56,7 +56,7 @@ testit "verifying comment" test $RC -eq 0 || failed=$(expr $failed + 1)
|
||||
|
||||
# Verify share path for new share
|
||||
|
||||
SHAREPATH_RET=$($RPCCLIENTCMD -c "netsharegetinfo '$SHARENAME'" | \
|
||||
SHAREPATH_RET=$($RPCCLIENTCMD -c "netsharegetinfo '$SHARENAME'" |
|
||||
grep path: | sed -e 's/.*path:\t//')
|
||||
test "$SHAREPATH" = "$SHAREPATH_RET"
|
||||
RC=$?
|
||||
@ -66,13 +66,13 @@ testit "verifying share path" test $RC -eq 0 || failed=$(expr $failed + 1)
|
||||
|
||||
$RPCCLIENTCMD -c "netsharesetdfsflags '$SHARENAME' 0x30"
|
||||
RC=$?
|
||||
testit "set csc policy" test $RC -eq 0 || failed=$(expr $failed + 1)
|
||||
testit "set csc policy" test $RC -eq 0 || failed=$(expr $failed + 1)
|
||||
|
||||
# Query CSC policy
|
||||
|
||||
CSC_CACHING_RET=$($RPCCLIENTCMD -c "netsharegetinfo '$SHARENAME' 1005" | \
|
||||
CSC_CACHING_RET=$($RPCCLIENTCMD -c "netsharegetinfo '$SHARENAME' 1005" |
|
||||
grep 'csc caching' | sed -e 's/.*csc caching: //')
|
||||
testit "verifying csc policy" test $CSC_CACHING_RET -eq 3 || \
|
||||
testit "verifying csc policy" test $CSC_CACHING_RET -eq 3 ||
|
||||
failed=$(expr $failed + 1)
|
||||
|
||||
# Delete share
|
||||
@ -85,6 +85,6 @@ testit "deleting share" test $RC -eq 0 || failed=$(expr $failed + 1)
|
||||
|
||||
$RPCCLIENTCMD -c "netsharegetinfo '$SHARENAME' 1005"
|
||||
RC=$?
|
||||
testit "querying deleted share" test $RC -eq 1 || failed=$(expr $failed + 1)
|
||||
testit "querying deleted share" test $RC -eq 1 || failed=$(expr $failed + 1)
|
||||
|
||||
testok $0 $failed
|
||||
|
Loading…
Reference in New Issue
Block a user