File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change
1
+ 0.3.1
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ function usage() {
139
139
# api methods
140
140
call_api () {
141
141
ROUTE=$( jq -r " .testCases.$1 .path" $FILE )
142
- BODY=" $( jq -r " .testCases.$1 .body" $FILE ) "
142
+ BODY=" $( jq -r " .testCases.$1 | select(.body != null) | .body" $FILE ) "
143
143
QUERY_PARAMS=$( cat $FILE | jq -r " .testCases.$1 | select(.query != null) | .query | to_entries | map(\" \(.key)=\(.value|tostring)\" ) | join(\" &\" ) | \" ?\" + . " )
144
144
REQUEST_HEADER=$( cat $FILE | jq -r " .testCases.$1 | .header | if . != null then . else {} end | to_entries | map(\" \(.key): \(.value|tostring)\" ) | join(\" \n\" ) | if ( . | length) != 0 then \" -H\" + . else \" -H \" end" )
145
145
METHOD=" $( jq -r " .testCases.$1 .method //\" GET\" | ascii_upcase" $FILE ) "
@@ -266,7 +266,7 @@ test_factory() {
266
266
TEST_SCENARIO=$( jq -r " .testCases.$TEST_CASE .expect.external? | select(. !=null and . != \"\" )" $FILE )
267
267
if [[ ! -z $TEST_SCENARIO ]]; then
268
268
tput cuf 2
269
- echo " ${UNDERLINE} Checking condition form external program${RESET} "
269
+ echo " ${UNDERLINE} Checking condition from external program${RESET} "
270
270
external_script " $TEST_SCENARIO " " $TEST_CASE " " $RESPONSE_BODY " " $RESPONSE_HEADER "
271
271
TOTAL_TEST_CASE=$(( TOTAL_TEST_CASE + 1 ))
272
272
echo " "
You can’t perform that action at this time.
0 commit comments