Pull request: 5035-dhcp-hosts-netip-addr
Updates #5035. Squashed commit of the following: commit 3a272842f738da322abb2bc5306aed94da79304b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Oct 26 20:34:49 2022 +0300 dnsforward: imp docs, tests commit b442ca9b57d730be3af14c68759c706f1742e4c4 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Oct 26 19:51:21 2022 +0300 dnsforward: imp code, tests commit 8fca6de93edb8cfdb0ff5a940d08f8700e12a423 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Oct 26 16:38:27 2022 +0300 dnsforward: mv dhcp hosts to netip.Addr
This commit is contained in:
@@ -33,7 +33,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
aghtest.DiscardLogOutput(m)
|
||||
testutil.DiscardLogOutput(m)
|
||||
}
|
||||
|
||||
const (
|
||||
@@ -1061,11 +1061,12 @@ func TestPTRResponseFromDHCPLeases(t *testing.T) {
|
||||
|
||||
require.Len(t, resp.Answer, 1)
|
||||
|
||||
assert.Equal(t, dns.TypePTR, resp.Answer[0].Header().Rrtype)
|
||||
assert.Equal(t, "34.12.168.192.in-addr.arpa.", resp.Answer[0].Header().Name)
|
||||
ans := resp.Answer[0]
|
||||
assert.Equal(t, dns.TypePTR, ans.Header().Rrtype)
|
||||
assert.Equal(t, "34.12.168.192.in-addr.arpa.", ans.Header().Name)
|
||||
|
||||
ptr := testutil.RequireTypeAssert[*dns.PTR](t, ans)
|
||||
|
||||
ptr, ok := resp.Answer[0].(*dns.PTR)
|
||||
require.True(t, ok)
|
||||
assert.Equal(t, dns.Fqdn("myhost."+localDomain), ptr.Ptr)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user