Repository navigation
refactor(tests): one DNS seam with a shared fake and contract suite - #3773
Merged
Merged
Conversation
…ared fake and its contract suite vet_addresses and avet_addresses resolve through the Resolver Protocol. SystemResolver is the real lookup, and install_resolver gives a test another. DnsFake and its dns fixture map names to addresses, script answers per lookup, stall a name and record each lookup. The contract suite runs each case over the fake and the real resolver. Refs #1314
…ting tests prove the seam The contract suite moves to tests/http. The vetting tests install a bare DnsFake, so they fail if vet_addresses or avet_addresses skip the seam. SystemResolver is compared by class.
Owner
Author
|
Test and check results:
Review findings fixed: the contract suite moved to tests/http/test_dns_contract.py (it mirrors http/egress.py); the vetting tests install a bare DnsFake; SystemResolver is compared by class; the duplicate default-resolver test is gone. The title scope is |
anyio.getaddrinfo cuts an IPv6 socket address to two items, so a whole-tuple compare failed on a runner where localhost answers ::1.
The change files name the new place of the contract suite.
dan-petty
force-pushed
the
refactor/1314-dns-seam
branch
from
November 6, 2026 07:48
3563a97 to
37c55f5
Compare
dan-petty
marked this pull request as ready for review
November 6, 2026 07:55
dan-petty
pushed a commit
that referenced
this pull request
Nov 6, 2026
🤖 I have created a release *beep* *boop* --- ## [0.67.2](v0.67.1...v0.67.2) (2026-11-06) ### Code Refactoring * **ai:** test-only model request hooks leave src ([#3768](#3768)) ([9b01821](9b01821)) * **tests:** one DNS seam with a shared fake and contract suite ([#3773](#3773)) ([10c7896](10c7896)), closes [#3752](#3752) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This was referenced Nov 6, 2026
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 egress check resolved names through socket.getaddrinfo and anyio.getaddrinfo, so a test had to patch the standard library. The Resolver seam in http/egress.py now serves both vet_addresses and avet_addresses. SystemResolver is the real lookup. DnsFake in tests/support/fakes/dns.py replaces it, behind the dns fixture, and one contract suite runs over the fake and the real lookup. Checks, errors and timeouts do not change.
Closes #3752
Change:
openspec/changes/archive/2026-11-06-3752-dns-seam/