Pull request: imp-ups-tests

Merge in DNS/adguard-home from imp-ups-tests to master

Squashed commit of the following:

commit 60c22e8dfb81c3613b00994ccf01ba96137946f9
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Oct 28 19:26:34 2022 +0300

    all: imp names, fix aaaa

commit c3bd8a9fa95a86f5af86ea2956565337ee620c99
Merge: 23f82237 746e9df7
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Oct 28 19:16:56 2022 +0300

    Merge branch 'master' into imp-ups-tests

commit 23f82237a81b0ef22cf418afdc2ec95dc50639a3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Oct 28 18:14:27 2022 +0300

    all: imp upstream tests
This commit is contained in:
Ainar Garipov 2022-10-28 19:35:59 +03:00
parent 746e9df727
commit ac7634da37
4 changed files with 155 additions and 147 deletions
internal/home

View file

@ -189,13 +189,11 @@ func TestRDNS_WorkerLoop(t *testing.T) {
locUpstream := &aghtest.UpstreamMock{
OnAddress: func() (addr string) { return "local.upstream.example" },
OnExchange: func(req *dns.Msg) (resp *dns.Msg, err error) {
resp = aghalg.Coalesce(
aghtest.RespondTo(t, req, dns.ClassINET, dns.TypePTR, revIPv4, "local.domain"),
aghtest.RespondTo(t, req, dns.ClassINET, dns.TypePTR, revIPv6, "ipv6.domain"),
return aghalg.Coalesce(
aghtest.MatchedResponse(req, dns.TypePTR, revIPv4, "local.domain"),
aghtest.MatchedResponse(req, dns.TypePTR, revIPv6, "ipv6.domain"),
new(dns.Msg).SetRcode(req, dns.RcodeNameError),
)
return resp, nil
), nil
},
}