diff options
author | 2016-04-02 17:49:13 +0100 | |
---|---|---|
committer | 2016-04-02 17:49:13 +0100 | |
commit | 2adbdf34d98f1181243b8c1b6392d193c5878ec3 (patch) | |
tree | 7cc638a43b3569ac7871c05e644223e2a850df69 /middleware/file/closest_test.go | |
parent | 9b21646954c8fea174be8b769f16ddb213286753 (diff) | |
download | coredns-2adbdf34d98f1181243b8c1b6392d193c5878ec3.tar.gz coredns-2adbdf34d98f1181243b8c1b6392d193c5878ec3.tar.zst coredns-2adbdf34d98f1181243b8c1b6392d193c5878ec3.zip |
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
Diffstat (limited to 'middleware/file/closest_test.go')
-rw-r--r-- | middleware/file/closest_test.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/middleware/file/closest_test.go b/middleware/file/closest_test.go index db0b718b2..91b65f231 100644 --- a/middleware/file/closest_test.go +++ b/middleware/file/closest_test.go @@ -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) } |