Skip to content

test: replace flaky httpbin.org with a local go-httpbin for proxy tests#323

Merged
gwleclerc merged 1 commit into
mainfrom
fix/flaky-proxy-tests
Jul 18, 2026
Merged

test: replace flaky httpbin.org with a local go-httpbin for proxy tests#323
gwleclerc merged 1 commit into
mainfrom
fix/flaky-proxy-tests

Conversation

@gwleclerc

Copy link
Copy Markdown
Collaborator

Summary

The proxy integration tests hit the public httpbin.org, which is unreliable in CI
(intermittent 503s — it's been flaking the test job). This makes them hermetic by
running a self-hosted go-httpbin during make test-integration and pointing the proxy
mocks at it.

Notably, an external echo service cannot cover the keep_host case: forwarding the
original Host (which doesn't match the echo's domain) is rejected with 403 by their CDN.
A local target is the only way to keep that coverage.

Changes

  • Makefile: pinned go-httpbin (v2.18.3) tool, started on :8090 for the duration of
    test-integration and stopped afterwards (even if venom fails).
  • Fixture & assertions: proxy mocks target http://localhost:8090; venom assertions
    updated because go-httpbin returns header values as arrays (headers.host.host0,
    custom.custom0, multi.multi0/1); golden files regenerated. jsonplaceholder and
    self-signed.badssl.com targets are unchanged (only httpbin was flaky).

Test plan

  • Verified locally with venom (port-shifted to avoid the busy 8080): set_mocks and
    use_mocks fully green, including Use-proxy-mock-list (echo host, keep_host, /headers).
  • Golden serialization test and go test ./server/... pass.

🤖 Generated with Claude Code

The proxy integration tests hit the public httpbin.org, which is unreliable in CI
(intermittent 503s). Run a self-hosted go-httpbin on :8090 during
`make test-integration` and point the proxy mocks at it, so the echo/headers/
keep_host cases are hermetic. External echo services can't cover keep_host anyway
(a forwarded Host mismatch is rejected by their CDN with 403).

- Makefile: pinned go-httpbin tool + start/stop it around the venom run.
- Fixture + venom assertions updated (go-httpbin returns header values as arrays);
  golden files regenerated. jsonplaceholder and badssl targets are unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gwleclerc
gwleclerc merged commit 9cc0509 into main Jul 18, 2026
6 checks passed
@gwleclerc
gwleclerc deleted the fix/flaky-proxy-tests branch July 18, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant