diff options
author | 2016-11-09 10:02:26 +0000 | |
---|---|---|
committer | 2016-11-09 10:02:26 +0000 | |
commit | 4ef53081c536a66acf77c7b1e3df15c2fc0ca52b (patch) | |
tree | 0fa5650b1483ce16cb308b05e2aa1e94754c941d /middleware/file/dnssec_test.go | |
parent | 6abbe231e5a587940d7cc64de4348ced05b70828 (diff) | |
download | coredns-4ef53081c536a66acf77c7b1e3df15c2fc0ca52b.tar.gz coredns-4ef53081c536a66acf77c7b1e3df15c2fc0ca52b.tar.zst coredns-4ef53081c536a66acf77c7b1e3df15c2fc0ca52b.zip |
middleware/file: Add CNAME chain support (#400)
Up till now we would only chase 1 CNAME. Spec requires we will chase
all. This PR add support for this. Up to 8 CNAMEs are chased (this
could be longer, by just checking for cycles, but 8 seems enough for
now).
Also add RRSIG of the first CNAME for DNSSEC.
Diffstat (limited to 'middleware/file/dnssec_test.go')
-rw-r--r-- | middleware/file/dnssec_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/middleware/file/dnssec_test.go b/middleware/file/dnssec_test.go index 7f4a0916b..40e6429ea 100644 --- a/middleware/file/dnssec_test.go +++ b/middleware/file/dnssec_test.go @@ -58,6 +58,7 @@ var dnssecTestCases = []test.Case{ test.A("a.miek.nl. 1800 IN A 139.162.196.78"), test.RRSIG("a.miek.nl. 1800 IN RRSIG A 8 3 1800 20160426031301 20160327031301 12051 miek.nl. lxLotCjWZ3kihTxk="), test.CNAME("www.miek.nl. 1800 IN CNAME a.miek.nl."), + test.RRSIG("www.miek.nl. 1800 RRSIG CNAME 8 3 1800 20160426031301 20160327031301 12051 miek.nl. NVZmMJaypS+wDL2Lar4Zw1zF"), }, Extra: []dns.RR{ @@ -118,7 +119,7 @@ var dnssecTestCases = []test.Case{ func TestLookupDNSSEC(t *testing.T) { zone, err := Parse(strings.NewReader(dbMiekNLSigned), testzone, "stdin") if err != nil { - t.Fatalf("expect no error when reading zone, got %q", err) + t.Fatalf("Expected no error when reading zone, got %q", err) } fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: zone}, Names: []string{testzone}}} @@ -130,7 +131,7 @@ func TestLookupDNSSEC(t *testing.T) { rec := dnsrecorder.New(&test.ResponseWriter{}) _, err := fm.ServeDNS(ctx, rec, m) if err != nil { - t.Errorf("expected no error, got %v\n", err) + t.Errorf("Expected no error, got %v\n", err) return } |