tests: remove the DNS stand-ins from the watcher and resolver tests (closes #159)
check / check (push) Successful in 1m21s
check / check (push) Successful in 1m21s
The watcher tests used a stand-in resolver and the resolver timeout test a stand-in DNS client, against the rule that DNS is never mocked. Watcher tests that look something up in DNS now run the real resolver against live servers, each attempt on a new watcher. A DNS change is tested by saving values live DNS never returns (names under .invalid, 192.0.2.1) in the state a check starts from, or by marking a real nameserver failed. The timeout test queries 192.0.2.1, where nothing answers. The live-DNS retry and concurrency limit moved from the resolver tests to internal/livedns, so both packages share them. NewFromLoggerWithClient had no other use and is gone. TESTING.md now states the README's rule. Model: opus-5-5
This commit was merged in pull request #162.
This commit is contained in:
@@ -10,11 +10,7 @@
|
||||
|
||||
# Status
|
||||
|
||||
pre-1.0. No git tags. Core resolver work in flight on feature/resolver
|
||||
(dirty: internal/resolver/resolver_test.go). Local checkout has diverged
|
||||
from origin: origin/main is 8 commits ahead (watcher orchestrator,
|
||||
unified TARGETS) and origin/feature/resolver already contains the full
|
||||
iterative resolver implementation with hermetic mocked tests.
|
||||
pre-1.0. No git tags.
|
||||
|
||||
# Next Step
|
||||
|
||||
@@ -23,6 +19,13 @@ Rationale, Design, TODO, License, Author) if any are still missing.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-09-29: nothing stands in for DNS any more. Watcher tests that look
|
||||
something up in DNS use the real resolver against live DNS servers and test
|
||||
record and nameserver changes by preparing the saved state a check starts
|
||||
from; the resolver timeout test queries an address that never answers, and
|
||||
`NewFromLoggerWithClient`, used only by its stand-in client, is gone. The
|
||||
live-DNS retry and concurrency limit moved to `internal/livedns`, which both
|
||||
test packages use. `TESTING.md` states the README's rule (closes #159).
|
||||
- 2026-09-28: the inconsistency alert is sent once, on the check where two
|
||||
nameservers start to disagree or where a nameserver that disagrees first
|
||||
appears, instead of on every check while they disagree, and not again after
|
||||
@@ -261,6 +264,5 @@ Infrastructure notes (from untracked TODO.md):
|
||||
- Module path sneak.berlin/go/dnswatcher differs from the git.eeqj.de
|
||||
remote intentionally; do not "fix" it
|
||||
- Dependencies: github.com/miekg/dns, golang.org/x/net/publicsuffix
|
||||
- Resolver tests originally used live DNS against *.dns.sneak.cloud
|
||||
(required records documented in the test file header); origin now has
|
||||
mocked hermetic tests, keep them hermetic
|
||||
- DNS is never mocked; tests that look something up in DNS query live DNS
|
||||
servers (README, "No DNS mocking. Ever.")
|
||||
|
||||
Reference in New Issue
Block a user