wip: restore transport-failure classification coverage
check / check (push) Failing after 21s

This commit is contained in:
clawbot
2026-09-03 22:51:30 +00:00
parent 62dec447e3
commit 240c1bd393
3 changed files with 274 additions and 10 deletions
+3 -9
View File
@@ -517,15 +517,9 @@ func TestQueryAllNameservers_ContextCanceled(t *testing.T) {
assert.Error(t, err)
}
// The resolver's transport-failure classification (StatusTimeout /
// StatusError for a nameserver that does not answer) is deliberately
// not covered here. Forcing it required the mock DNSClient this
// change removes, and a live substitute is not available: the build
// environment transparently intercepts all UDP/53 traffic and answers
// it locally, so a query to a black-holed address such as an RFC 5737
// documentation address comes back StatusOK with real records. See
// TESTING.md; restoring this coverage needs a mechanism that is
// neither a mock nor dependent on the sandbox's network behaviour.
// Transport-failure classification (StatusTimeout / StatusError)
// is covered in transport_test.go, against real nameservers bound on
// loopback.
func TestResolveIPAddresses_ContextCanceled(t *testing.T) {
t.Parallel()