diff options
author | 2017-08-16 15:30:58 +0100 | |
---|---|---|
committer | 2017-08-16 15:30:58 +0100 | |
commit | 7f46df6d274eff51569b57b382480301caa1dff6 (patch) | |
tree | 4a6062700acc0bd110ef622b64f055a235042294 /middleware/autopath/autopath_test.go | |
parent | 65b56248f0f4a43fe71435c4d801b94c3f168f65 (diff) | |
download | coredns-7f46df6d274eff51569b57b382480301caa1dff6.tar.gz coredns-7f46df6d274eff51569b57b382480301caa1dff6.tar.zst coredns-7f46df6d274eff51569b57b382480301caa1dff6.zip |
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.
Diffstat (limited to 'middleware/autopath/autopath_test.go')
-rw-r--r-- | middleware/autopath/autopath_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/middleware/autopath/autopath_test.go b/middleware/autopath/autopath_test.go index 719389446..ca1290e26 100644 --- a/middleware/autopath/autopath_test.go +++ b/middleware/autopath/autopath_test.go @@ -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) { |