Add smoke test for signed contract download endpoint
Deploy to Dev / Deploy & Smoke Test (push) Successful in 23s
Deploy to Dev / Deploy & Smoke Test (push) Successful in 23s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,11 @@ b=$(curl -s --max-time 8 -X POST "$BASE/api/bookings" \
|
|||||||
-d '{"client_name":"Smoke Test","client_email":"smoke@test.lisilou","session_date":"2099-12-31","session_type":"individual","session_length":"mini","location":"studio"}')
|
-d '{"client_name":"Smoke Test","client_email":"smoke@test.lisilou","session_date":"2099-12-31","session_type":"individual","session_length":"mini","location":"studio"}')
|
||||||
[[ "$b" == *'"id"'* ]] && ok "POST /api/bookings → returns id" || fail "POST /api/bookings → returns id (got: $b)"
|
[[ "$b" == *'"id"'* ]] && ok "POST /api/bookings → returns id" || fail "POST /api/bookings → returns id (got: $b)"
|
||||||
|
|
||||||
# 6. Nginx does not 500 on unknown /api/ path
|
# 6. Signed contract 404s gracefully (no file for nonexistent booking)
|
||||||
|
s=$(http_status "$BASE/api/bookings/99999/contract")
|
||||||
|
[ "$s" = "404" ] && ok "GET /api/bookings/99999/contract → 404" || fail "GET /api/bookings/99999/contract → 404 (got $s)"
|
||||||
|
|
||||||
|
# 7. Nginx does not 500 on unknown /api/ path
|
||||||
s=$(http_status "$BASE/api/nonexistent-route")
|
s=$(http_status "$BASE/api/nonexistent-route")
|
||||||
[ "$s" != "500" ] && ok "GET /api/unknown → not 500 (got $s)" || fail "GET /api/unknown → 500 (nginx misconfigured)"
|
[ "$s" != "500" ] && ok "GET /api/unknown → not 500 (got $s)" || fail "GET /api/unknown → 500 (nginx misconfigured)"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user