mirror of
https://github.com/coredns/coredns.git
synced 2025-10-29 01:04:15 -04:00
Middleware/Kubernetes: Add RR check to K8s integration tests (#884)
This commit is contained in:
committed by
Chris O'Haver
parent
f901b0cefa
commit
5e9991556e
@@ -235,19 +235,8 @@ func runServeDNSTests(ctx context.Context, t *testing.T, dnsTestCases map[string
|
||||
}
|
||||
|
||||
// Before sorting, make sure that CNAMES do not appear after their target records
|
||||
for i, c := range resp.Answer {
|
||||
if c.Header().Rrtype != dns.TypeCNAME {
|
||||
continue
|
||||
}
|
||||
for _, a := range resp.Answer[:i] {
|
||||
if a.Header().Name != c.(*dns.CNAME).Target {
|
||||
continue
|
||||
}
|
||||
t.Errorf("%v: CNAME found after target record\n", testname)
|
||||
t.Logf("%v Received:\n %v\n", testname, resp)
|
||||
test.CNAMEOrder(t, resp)
|
||||
|
||||
}
|
||||
}
|
||||
test.SortAndCheck(t, resp, tc)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user