mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
tests: add SortAndCheck helper (#926)
There was quite some code duplication in a lot of tests to check if an answer was considered Ok. Created a test.SortAndCheck helper function that takes care of this.
This commit is contained in:
@@ -56,6 +56,8 @@ func TestAutoPath(t *testing.T) {
|
||||
continue
|
||||
}
|
||||
|
||||
// No sorting here as we want to check if the CNAME sits *before* the
|
||||
// test of the answer.
|
||||
resp := rec.Msg
|
||||
|
||||
if !test.Header(t, tc, resp) {
|
||||
|
||||
Reference in New Issue
Block a user