mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 00:04:15 -04:00
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:
@@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/coredns/coredns/plugin"
|
||||
"github.com/coredns/coredns/plugin/pkg/dnsrecorder"
|
||||
"github.com/coredns/coredns/plugin/pkg/dnstest"
|
||||
"github.com/coredns/coredns/plugin/test"
|
||||
|
||||
"github.com/miekg/dns"
|
||||
@@ -59,7 +59,7 @@ func TestChaos(t *testing.T) {
|
||||
req.Question[0].Qclass = dns.ClassCHAOS
|
||||
em.Next = tc.next
|
||||
|
||||
rec := dnsrecorder.New(&test.ResponseWriter{})
|
||||
rec := dnstest.NewRecorder(&test.ResponseWriter{})
|
||||
code, err := em.ServeDNS(ctx, rec, req)
|
||||
|
||||
if err != tc.expectedErr {
|
||||
|
||||
Reference in New Issue
Block a user