simplify dns.MockResolver, changing MockReq to just a string representing the request

similar to Authentic/Inauthentic
This commit is contained in:
Mechiel Lukkien
2023-10-12 16:07:25 +02:00
parent c095f3f39c
commit 7dce883097
10 changed files with 57 additions and 54 deletions

View File

@ -460,8 +460,8 @@ test
})
// DNS request is failing temporarily.
test(nil, StatusTemperror, ErrDNS, func() {
resolver.Fail = map[dns.Mockreq]struct{}{
{Type: "txt", Name: "test._domainkey.mox.example."}: {},
resolver.Fail = []string{
"txt test._domainkey.mox.example.",
}
})
// Claims to be DKIM through v=, but cannot be parsed. ../rfc/6376:2621