TT#29620 Clean TAP test warning: Double quote to prevent globbing and word splitting [SC2086]

Change-Id: I3bb27ac2641cb3ad431a210ae305308b6c14c675
changes/80/21280/8
Alexander Lutay 8 years ago
parent ab47a1f9ef
commit dbd3007d3e

@ -20,7 +20,7 @@ POT="lib/NGCP/Panel/I18N/messages.pot"
DIRS=""
for d in ${I18_DIRS}; do
DIRS="$DIRS --directory $d";
DIRS="$DIRS --directory $d"
done
echo; echo "Dumping DB and Form strings"; echo

@ -26,7 +26,7 @@ if [ -z "$APIUSER" ] ; then
APIUSER="administrator:administrator"
fi
fi
INPUT="-T -"
INPUT=(-T -)
CTYPE="application/json-patch+json"
PREFER="representation"
@ -37,8 +37,8 @@ do
usage
;;
f)
INPUT=""
FILE_INPUT="--data-binary @$OPTARG"
INPUT=()
FILE_INPUT=(--data-binary @$OPTARG)
if [ ! -f "$OPTARG" ]; then
echo "No '$OPTARG' file found"
usage
@ -65,4 +65,4 @@ fi
${CURL} -i ${VERBOSE} -X PATCH \
-H 'Connection: close' -H "Prefer: return=$PREFER" \
-H "Content-Type: $CTYPE" \
--user "$APIUSER" --insecure ${FILE_INPUT} "$URL" ${INPUT}
--user "$APIUSER" --insecure "${FILE_INPUT[@]}" "$URL" "${INPUT[@]}"

@ -25,7 +25,7 @@ if [ -z "$APIUSER" ] ; then
APIUSER="administrator:administrator"
fi
fi
INPUT="-T -"
INPUT=(-T -)
while getopts "f:hv" OPTION
do
@ -34,8 +34,8 @@ do
usage
;;
f)
INPUT=""
FILE_INPUT="--data-binary @$OPTARG"
INPUT=()
FILE_INPUT=(--data-binary @$OPTARG)
if [ ! -f "$OPTARG" ]; then
echo "No '$OPTARG' file found"
usage
@ -60,4 +60,4 @@ CTYPE=${2:-application/json}
${CURL} -i ${VERBOSE} -X POST \
-H 'Connection: close' -H 'Prefer: return=representation' \
-H "Content-Type: $CTYPE" \
--user "$APIUSER" --insecure ${FILE_INPUT} "$URL" ${INPUT}
--user "$APIUSER" --insecure "${FILE_INPUT[@]}" "$URL" "${INPUT[@]}"

@ -25,7 +25,7 @@ if [ -z "$APIUSER" ] ; then
APIUSER="administrator:administrator"
fi
fi
INPUT="-T -"
INPUT=(-T -)
while getopts "f:hv" OPTION
do
@ -34,8 +34,8 @@ do
usage
;;
f)
INPUT=""
FILE_INPUT="--data-binary @$OPTARG"
INPUT=()
FILE_INPUT=(--data-binary @$OPTARG)
if [ ! -f "$OPTARG" ]; then
echo "No '$OPTARG' file found"
usage
@ -60,4 +60,4 @@ CTYPE=${2:-application/json}
${CURL} -i ${VERBOSE} -X PUT \
-H 'Connection: close' -H 'Prefer: return=representation' \
-H "Content-Type: $CTYPE" \
--user "$APIUSER" --insecure ${FILE_INPUT} "$URL" ${INPUT}
--user "$APIUSER" --insecure "${FILE_INPUT[@]}" "$URL" "${INPUT[@]}"

Loading…
Cancel
Save