resolver test: use documentation names in the CNAME fixture (closes #309)
check / check (push) Successful in 4m13s

TestCollectAnswerRecords_CNAMEOnce used a real record of ours and a CNAME
target naming one of our servers. It now uses www.example.com. and
host.example.net.; the assertion is unchanged.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-11-16 05:57:26 +00:00
1 parent 70fbf55832
commit f769b971a3
1 file changed
+4 -4
+4 -4
View File
@@ -265,9 +265,9 @@ func TestCollectAnswerRecords_CNAMEOnce(t *testing.T) {
cname := &dns.CNAME{
Hdr: dns.RR_Header{
Name: "git.eeqj.de.", Rrtype: dns.TypeCNAME, Class: dns.ClassINET,
Name: "www.example.com.", Rrtype: dns.TypeCNAME, Class: dns.ClassINET,
},
Target: "fsn1app1.datavi.be.",
Target: "host.example.net.",
}
resp := &resolver.NameserverResponse{Records: map[string][]string{}}
@@ -277,14 +277,14 @@ func TestCollectAnswerRecords_CNAMEOnce(t *testing.T) {
dns.TypeTXT, dns.TypeSRV, dns.TypeCAA, dns.TypeNS,
} {
msg := new(dns.Msg)
msg.SetQuestion("git.eeqj.de.", qtype)
msg.SetQuestion("www.example.com.", qtype)
msg.Answer = []dns.RR{cname}
resolver.CollectAnswerRecords(msg, resp)
}
assert.Equal(t,
map[string][]string{"CNAME": {"fsn1app1.datavi.be."}},
map[string][]string{"CNAME": {"host.example.net."}},
resp.Records,
)
}