mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
Use qname/qtype for lookups
Drop the use of dns.RR when in fact the only thing we use is the name and type of the RR. Cleans up a bunch of stuff and also stops the weird making of dns.RRs just for a lookup. Should safe some memory as well. Fixes: #66
This commit is contained in:
@@ -25,11 +25,8 @@ func TestClosestEncloser(t *testing.T) {
|
||||
{"blaat.a.miek.nl.", "a.miek.nl."},
|
||||
}
|
||||
|
||||
mk, _ := dns.TypeToRR[dns.TypeA]
|
||||
rr := mk()
|
||||
for _, tc := range tests {
|
||||
rr.Header().Name = tc.in
|
||||
ce := z.ClosestEncloser(rr)
|
||||
ce := z.ClosestEncloser(tc.in, dns.TypeA)
|
||||
if ce != tc.out {
|
||||
t.Errorf("expected ce to be %s for %s, got %s", tc.out, tc.in, ce)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user