Skip to content

Commit 7d52efb

Browse files
committed
Set nonzero exitcode on incorrect HTTP code.
1 parent 675f8d5 commit 7d52efb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contest-api/check-api.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,9 @@ if [ -n "$CHECK_ERRORS" ]; then
322322
verbose '%20s: ' "$ENDPOINT"
323323
if query_endpoint /dev/null "$URL" '' "$CODE" ; then
324324
verbose 'OK (returned %s)\n' "$CODE"
325+
else
326+
EXIT=1
327+
[ $EXIT -gt $EXITCODE ] && EXITCODE=$EXIT
325328
fi
326329
done
327330
fi

0 commit comments

Comments
 (0)