Middleware/Kubernetes: Add RR check to K8s integration tests (#884)

This commit is contained in:
Sandeep Rajan 2017-08-24 11:05:16 -04:00 committed by Chris O'Haver
parent f901b0cefa
commit 5e9991556e
4 changed files with 505 additions and 100 deletions

View file

@ -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)
}
}