test: replace flaky httpbin.org with a local go-httpbin for proxy tests#323
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The proxy integration tests hit the public httpbin.org, which is unreliable in CI
(intermittent
503s — it's been flaking thetestjob). This makes them hermetic byrunning a self-hosted go-httpbin during
make test-integrationand pointing the proxymocks at it.
Notably, an external echo service cannot cover the
keep_hostcase: forwarding theoriginal
Host(which doesn't match the echo's domain) is rejected with403by their CDN.A local target is the only way to keep that coverage.
Changes
go-httpbin(v2.18.3) tool, started on:8090for the duration oftest-integrationand stopped afterwards (even if venom fails).http://localhost:8090; venom assertionsupdated because go-httpbin returns header values as arrays (
headers.host.host0,custom.custom0,multi.multi0/1); golden files regenerated.jsonplaceholderandself-signed.badssl.comtargets are unchanged (only httpbin was flaky).Test plan
set_mocksanduse_mocksfully green, includingUse-proxy-mock-list(echo host,keep_host,/headers).go test ./server/...pass.🤖 Generated with Claude Code