Help us shape the future of Go! Take the 2026 Go Developer Survey

fixture

command
v0.5.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL