resolver test: use documentation names in the CNAME fixture (closes #309)
check / check (push) In progress

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 was merged in pull request #310.
This commit is contained in:
clawbot committed 2026-11-16 07:29:05 +01:00
1 parent 70fbf55832
commit d0a34301f0
1 file changed
+4 -4
+4 -4
View File
@@ -265,9 +265,9 @@ func TestCollectAnswerRecords_CNAMEOnce(t *testing.T) {
cname := &dns.CNAME{ cname := &dns.CNAME{
Hdr: dns.RR_Header{ 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{}} 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, dns.TypeTXT, dns.TypeSRV, dns.TypeCAA, dns.TypeNS,
} { } {
msg := new(dns.Msg) msg := new(dns.Msg)
msg.SetQuestion("git.eeqj.de.", qtype) msg.SetQuestion("www.example.com.", qtype)
msg.Answer = []dns.RR{cname} msg.Answer = []dns.RR{cname}
resolver.CollectAnswerRecords(msg, resp) resolver.CollectAnswerRecords(msg, resp)
} }
assert.Equal(t, assert.Equal(t,
map[string][]string{"CNAME": {"fsn1app1.datavi.be."}}, map[string][]string{"CNAME": {"host.example.net."}},
resp.Records, resp.Records,
) )
} }