diff options
author | 2017-09-21 15:15:47 +0100 | |
---|---|---|
committer | 2017-09-21 15:15:47 +0100 | |
commit | 284061eee7bd886d684a2262f9e6a7fef201277e (patch) | |
tree | a0d47d7f164c2622a44eb31bd4c58740384c38b0 /plugin/metrics/handler.go | |
parent | 7109c6715c6b526e583212598a7c98d39a6e8063 (diff) | |
download | coredns-284061eee7bd886d684a2262f9e6a7fef201277e.tar.gz coredns-284061eee7bd886d684a2262f9e6a7fef201277e.tar.zst coredns-284061eee7bd886d684a2262f9e6a7fef201277e.zip |
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.
Diffstat (limited to 'plugin/metrics/handler.go')
-rw-r--r-- | plugin/metrics/handler.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/metrics/handler.go b/plugin/metrics/handler.go index bc9a6ec47..88bc1b634 100644 --- a/plugin/metrics/handler.go +++ b/plugin/metrics/handler.go @@ -3,7 +3,7 @@ package metrics import ( "github.com/coredns/coredns/plugin" "github.com/coredns/coredns/plugin/metrics/vars" - "github.com/coredns/coredns/plugin/pkg/dnsrecorder" + "github.com/coredns/coredns/plugin/pkg/dnstest" "github.com/coredns/coredns/plugin/pkg/rcode" "github.com/coredns/coredns/request" @@ -22,7 +22,7 @@ func (m *Metrics) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg } // Record response to get status code and size of the reply. - rw := dnsrecorder.New(w) + rw := dnstest.NewRecorder(w) status, err := plugin.NextOrFailure(m.Name(), m.Next, ctx, rw, r) vars.Report(state, zone, rcode.ToString(rw.Rcode), rw.Len, rw.Start) |