feat(frametests): add WithBoundHTTPTestDriver - #697
Merged
Conversation
WithHTTPTestDriver lets httptest pick a random loopback port, which does not work when peers must be configured with the service URL before the service starts (e.g. Ory Hydra login/consent redirects and token-hook webhooks in integration suites). WithBoundHTTPTestDriver binds the address frame derives from HTTPServerPort, on the caller's goroutine, so Service.Run returns listen and startup errors synchronously — test suites need no go func()/readiness polling around Run. WithHTTPTestDriver behaviour is unchanged (covered by a regression test). Claude-Session: https://claude.ai/code/session_01XhqbaQcsAVEiTorq8uSyt6
pitabwire
added a commit
to antinvestor/service-authentication
that referenced
this pull request
Aug 31, 2026
frame v2.1.7 ships the bound-address httptest driver upstream (pitabwire/frame#697); use it for the suite-level auth service and drop the interim local copy in pkg/tests/http_driver.go. Claude-Session: https://claude.ai/code/session_01XhqbaQcsAVEiTorq8uSyt6
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.
Adds a bound-address variant of the httptest driver: binds the address frame derives from
HTTPServerPort(synchronously, on the caller's goroutine) soService.Runsurfaces listen/startup errors directly and peers configured with the service URL before startup (Hydra login/consent redirects, token-hook webhooks) can reach the suite service. No behaviour change toWithHTTPTestDriver(regression-tested).First consumer: antinvestor/service-authentication test suites (currently carrying a local copy in
pkg/tests/http_driver.gopending this release).https://claude.ai/code/session_01XhqbaQcsAVEiTorq8uSyt6