spawn/test/fixtures/fly
Ahmed Abushagur a9d0ee9863
test: add mock test coverage for all 15 Fly.io agent scripts (#1390)
Fly.io had zero test coverage — every bug fixed this session (stale
tokens, FlyV1 auth, name-taken failures, SSH hangs, PATH issues) went
undetected. This adds the full mock test infrastructure:

- test/fixtures/fly/ — env vars, API assertions, fixture JSONs for
  app creation, machine creation, and token validation endpoints
- test/mock-curl-script.sh — URL stripping for api.machines.dev,
  body validation for machine creation, synthetic status responses,
  app creation POST handler, state tracking
- test/mock.sh — mock fly/flyctl CLI binary (ssh console, auth token),
  URL stripping, required field validation, base64 mock
- test/record.sh — Fly.io REST endpoints now recordable, live
  create+delete cycle, error detection, auth var mapping

All 15 agent scripts (aider, claude, openclaw, etc.) are automatically
discovered and tested: 75 passed, 0 failed.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 05:52:26 -05:00
..
_api_assertions.sh test: add mock test coverage for all 15 Fly.io agent scripts (#1390) 2026-02-17 05:52:26 -05:00
_env.sh test: add mock test coverage for all 15 Fly.io agent scripts (#1390) 2026-02-17 05:52:26 -05:00
_metadata.json test: add mock test coverage for all 15 Fly.io agent scripts (#1390) 2026-02-17 05:52:26 -05:00
apps.json test: add mock test coverage for all 15 Fly.io agent scripts (#1390) 2026-02-17 05:52:26 -05:00
create_server.json test: add mock test coverage for all 15 Fly.io agent scripts (#1390) 2026-02-17 05:52:26 -05:00