validate.sh
Run the validation suite against a framework. Builds the Docker image, starts the container (and Postgres sidecar if needed), and runs correctness checks for every test profile listed in the framework’s meta.json.
./scripts/validate.sh <framework>What it does
- Reads the framework’s
meta.jsonto determine which tests are subscribed - Builds the Docker image
- Mounts only the data volumes required by the subscribed tests
- Starts a Postgres sidecar when
async-dbormixedtests are enabled - Waits for the server to start (up to 30 seconds)
- Runs all validation checks for the subscribed tests
- Prints a pass/fail summary and exits with code 1 if any check failed
Validation coverage
Each subscribed test triggers its corresponding validation checks. Subscribing to mixed automatically triggers validation for all 7 endpoints it uses (baseline, json, db, upload, compression, static, async-db), even if those individual tests are not in meta.json.
On failure, each check prints a link to the relevant validation documentation page for reference.
Anti-cheat checks
Several validations use randomized inputs to detect hardcoded responses:
- Baseline: random query parameters and POST bodies
- Upload: random binary payload with byte count verification
- Database / Async DB: empty price range that must return zero results
Example output
=== Validating: express ===
[info] Subscribed tests: baseline json upload compression
[build] Building Docker image...
[ready] Server is up
[test] baseline endpoints
PASS [GET /baseline11?a=13&b=42]
PASS [POST /baseline11?a=13&b=42 body=20]
...
[test] json endpoint
PASS [GET /json] (50 items, totals computed correctly)
PASS [GET /json Content-Type] (Content-Type: application/json)
...
=== Results: 15 passed, 0 failed ===