diff options
Diffstat (limited to 'middleware/dnssec/handler_test.go')
-rw-r--r-- | middleware/dnssec/handler_test.go | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/middleware/dnssec/handler_test.go b/middleware/dnssec/handler_test.go index 60847d17b..19d0ef01f 100644 --- a/middleware/dnssec/handler_test.go +++ b/middleware/dnssec/handler_test.go @@ -1,7 +1,6 @@ package dnssec import ( - "sort" "strings" "testing" @@ -104,23 +103,7 @@ func TestLookupZone(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) } } @@ -147,23 +130,7 @@ func TestLookupDNSKEY(t *testing.T) { t.Errorf("Authoritative Answer should be true, got false") } - 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) } } |