pkg: add dnstest (#1098)

Add a full test server impl in this new package + tests. Move
dnsrecorder into this package as well and finish up the commented out
tests that were left in the old dnsrecorder package.

Update all callers and tests.
This commit is contained in:
Miek Gieben 2017-09-21 15:15:47 +01:00 committed by GitHub
parent 7109c6715c
commit 284061eee7
44 changed files with 223 additions and 131 deletions

View file

@ -3,7 +3,7 @@ package kubernetes
import (
"testing"
"github.com/coredns/coredns/plugin/pkg/dnsrecorder"
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/test"
"github.com/miekg/dns"
@ -47,7 +47,7 @@ func TestServeDNSApex(t *testing.T) {
for i, tc := range kubeApexCases {
r := tc.Msg()
w := dnsrecorder.New(&test.ResponseWriter{})
w := dnstest.NewRecorder(&test.ResponseWriter{})
_, err := k.ServeDNS(ctx, w, r)
if err != tc.Error {