fix: mock DNS client in resolver tests (replaces PR #25) #27
Reference in New Issue
Block a user
Delete Branch "fix/mock-resolver-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Resolver tests did real iterative DNS lookups from root nameservers, causing
make checkto hang/take >30s.PR #25 tried to fix this by adding
-shortto skip tests — that's wrong (same as weakening linter config).Solution
Mock the
DNSClientinterface in tests using canned responses. Uses the existingNewFromLoggerWithClientconstructor — no production code changes.make checkpasses with 0 issues-shortflags, no skipped tests, no Makefile changesmake checkoutputCloses #25 approach — this is the correct fix.
Pull request closed