fix: mock DNS in resolver tests for hermetic, fast unit tests
- Extract DNSClient interface from resolver to allow dependency injection - Convert all resolver methods from package-level to receiver methods using the injectable DNS client - Rewrite resolver_test.go with a mock DNS client that simulates the full delegation chain (root → TLD → authoritative) in-process - Move 2 integration tests (real DNS) behind //go:build integration tag - Add NewFromLoggerWithClient constructor for test injection - Add LookupAllRecords implementation (was returning ErrNotImplemented) All unit tests are hermetic (no network) and complete in <1s. Total make check passes in ~5s. Closes #12
This commit is contained in:
1 parent
1e04a29fbf
commit
0486dcfd07
7 files changed
+741
-446
No files matched your search
+532
-400
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user