Repository navigation
tests: the benchmark proxy-tunnel tests don't read the host's certificate store - #2071
Merged
Merged
Conversation
Both tests set the client's clock so a request never rescans the system roots; without a readable keychain the fetch failed before connecting, so the refusal test passed on zero requests and the tunnel test failed. The refusal test now also requires exactly the one CONNECT it refuses.
ashhart
force-pushed
the
lead/proxy-tests-hermetic
branch
from
November 4, 2026 02:57
9140943 to
bccccbf
Compare
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.
The two https-proxy tests in
benchmark_stream_test.zigloaded the host's system certificates before connecting. On a Mac where the system keychain can't be read (a sandboxed run, for instance), the load failed withCertificateBundleLoadFailure, so the tunnel test failed. The "refuses to tunnel" test then received no request, and it passed without checking anything..now, so no certificates load. What the tests prove is unchanged: an https exchange through the proxy's tunnel is never sent in clear text, and the refusal happens before TLS.CONNECTarrived, forreceiver.example.test:443, so it can't pass on zero requests.Checked by breaking each property. With the proxy forwarding in clear text, both tests fail. With
.nowdropped from the refusal test, it fails with "expected 1, found 0".zig build testnow passes in the sandbox that failed before. Lean is unchanged, andzig fmtis clean.