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:
parent
7109c6715c
commit
284061eee7
44 changed files with 223 additions and 131 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue