#!/bin/bash # Smoke test for endpoints converted from StreamingResponseBody to Resource. # Verifies that: # - Response status is 200 # - Content-Length header matches actual body size # - Body is a valid PDF (starts with %PDF-) # - Multiple sequential requests all complete cleanly (no silent truncation) # # Run against a local bootRun on port 8088. set -u BASE_URL="${BASE_URL:-http://localhost:8088}" TEST_PDF="${TEST_PDF:-testing/test_pdf_1.pdf}" ITERATIONS="${ITERATIONS:-5}" PASS=0 FAIL=0 if [ ! -f "$TEST_PDF" ]; then echo "ERROR: Test PDF not found at $TEST_PDF (run from repo root)" exit 1 fi # hit_endpoint