mirror of
https://github.com/coredns/coredns.git
synced 2025-11-18 01:42:17 -05:00
middleware/file: proper support for wildcard (#323)
Add support for wildcard records, while taking care of wildcard-cnames and DNSSEC. Add enough tests to check all the corner cases.
This commit is contained in:
@@ -39,7 +39,6 @@ func TestZoneSigningBlackLies(t *testing.T) {
|
||||
if nsec.NextDomain != "\\000.ww.miek.nl." {
|
||||
t.Errorf("expected %s, got %s", "\\000.ww.miek.nl.", nsec.NextDomain)
|
||||
}
|
||||
t.Logf("%+v\n", m)
|
||||
}
|
||||
|
||||
func testNxdomainMsg() *dns.Msg {
|
||||
|
||||
@@ -52,7 +52,6 @@ func TestZoneSigningDouble(t *testing.T) {
|
||||
if !section(m.Ns, 2) {
|
||||
t.Errorf("authority section should have 1 sig")
|
||||
}
|
||||
t.Logf("%+v\n", m)
|
||||
}
|
||||
|
||||
// TestSigningDifferentZone tests if a key for miek.nl and be used for example.org.
|
||||
@@ -73,11 +72,12 @@ func TestSigningDifferentZone(t *testing.T) {
|
||||
m = d.Sign(state, "example.org.", time.Now().UTC())
|
||||
if !section(m.Answer, 1) {
|
||||
t.Errorf("answer section should have 1 sig")
|
||||
t.Logf("%+v\n", m)
|
||||
}
|
||||
if !section(m.Ns, 1) {
|
||||
t.Errorf("authority section should have 1 sig")
|
||||
t.Logf("%+v\n", m)
|
||||
}
|
||||
t.Logf("%+v\n", m)
|
||||
}
|
||||
|
||||
func TestSigningCname(t *testing.T) {
|
||||
@@ -91,7 +91,6 @@ func TestSigningCname(t *testing.T) {
|
||||
if !section(m.Answer, 1) {
|
||||
t.Errorf("answer section should have 1 sig")
|
||||
}
|
||||
t.Logf("%+v\n", m)
|
||||
}
|
||||
|
||||
func TestZoneSigningDelegation(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user