Documentation
¶
Overview ¶
Command fixture is the soak battery's local HTTP endpoint.
The soak's non-native `airflow_operator` leg runs an HttpOperator. Pointing it at a public API would make a weekend of scheduled runs into a weekend of unsolicited traffic against somebody else's service, and would let their outage turn our resilience report red for a reason that says nothing about our scheduler. So the operator points here instead: one static Go binary bound to loopback, serving deterministic JSON.
It also records what it served, so the harness can assert that the operator leg really executed rather than trusting the task's own exit code.
Endpoints:
GET /healthz -> 200 "ok"
GET /fixture/events?n=50 -> 200 application/json, n synthetic events
GET /fixture/stats -> 200 application/json, request counters
GET /fixture/flaky?p=20 -> 503 for p% of requests, 200 otherwise
GET /fixture/ready?key=K&after=N
-> 404 for the first N pokes of key K, then 200.
This is what makes a reschedule-mode sensor
deterministic and repeatable without a clock or
an Admin Variable that goes stale after one run.
Usage:
go run ./test/soak/fixture --addr 127.0.0.1:18701
Click to show internal directories.
Click to hide internal directories.