From bda916915c93f02eb641d32798773143eee605c7 Mon Sep 17 00:00:00 2001 From: jhodgkin Date: Wed, 8 Jul 2026 21:48:07 -0600 Subject: [PATCH] Add smoke test for signed contract download endpoint Co-Authored-By: Claude Sonnet 4.6 --- scripts/smoke-test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/smoke-test.sh b/scripts/smoke-test.sh index c8b7156..4696ec9 100755 --- a/scripts/smoke-test.sh +++ b/scripts/smoke-test.sh @@ -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"}') [[ "$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" != "500" ] && ok "GET /api/unknown → not 500 (got $s)" || fail "GET /api/unknown → 500 (nginx misconfigured)"