diff options
Diffstat (limited to 'middleware/file/cname_test.go')
-rw-r--r-- | middleware/file/cname_test.go | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/middleware/file/cname_test.go b/middleware/file/cname_test.go index ff9387b29..90e6f05a9 100644 --- a/middleware/file/cname_test.go +++ b/middleware/file/cname_test.go @@ -1,7 +1,6 @@ package file import ( - "sort" "strings" "testing" @@ -34,25 +33,7 @@ func TestLookupCNAMEChain(t *testing.T) { } resp := rec.Msg - sort.Sort(test.RRSet(resp.Answer)) - sort.Sort(test.RRSet(resp.Ns)) - sort.Sort(test.RRSet(resp.Extra)) - - if !test.Header(t, tc, resp) { - t.Logf("%v\n", resp) - continue - } - - if !test.Section(t, tc, test.Answer, resp.Answer) { - t.Logf("%v\n", resp) - } - if !test.Section(t, tc, test.Ns, resp.Ns) { - t.Logf("%v\n", resp) - - } - if !test.Section(t, tc, test.Extra, resp.Extra) { - t.Logf("%v\n", resp) - } + test.SortAndCheck(t, resp, tc) } } @@ -109,25 +90,7 @@ func TestLookupCNAMEExternal(t *testing.T) { } resp := rec.Msg - sort.Sort(test.RRSet(resp.Answer)) - sort.Sort(test.RRSet(resp.Ns)) - sort.Sort(test.RRSet(resp.Extra)) - - if !test.Header(t, tc, resp) { - t.Logf("%v\n", resp) - continue - } - - if !test.Section(t, tc, test.Answer, resp.Answer) { - t.Logf("%v\n", resp) - } - if !test.Section(t, tc, test.Ns, resp.Ns) { - t.Logf("%v\n", resp) - - } - if !test.Section(t, tc, test.Extra, resp.Extra) { - t.Logf("%v\n", resp) - } + test.SortAndCheck(t, resp, tc) } } |