Cleanup ParseHostOrFile (#2100)
Create plugin/pkg/transport that holds the transport related functions. This needed to be a new pkg to prevent cyclic import errors. This cleans up a bunch of duplicated code in core/dnsserver that also tried to parse a transport (now all done in transport.Parse). Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
2f1223c36a
commit
c349446a23
24 changed files with 182 additions and 221 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/coredns/coredns/plugin/pkg/dnstest"
|
||||
"github.com/coredns/coredns/plugin/pkg/transport"
|
||||
"github.com/coredns/coredns/plugin/test"
|
||||
"github.com/coredns/coredns/request"
|
||||
|
||||
|
@ -19,7 +20,7 @@ func TestForward(t *testing.T) {
|
|||
})
|
||||
defer s.Close()
|
||||
|
||||
p := NewProxy(s.Addr, DNS)
|
||||
p := NewProxy(s.Addr, transport.DNS)
|
||||
f := New()
|
||||
f.SetProxy(p)
|
||||
defer f.Close()
|
||||
|
@ -51,7 +52,7 @@ func TestForwardRefused(t *testing.T) {
|
|||
})
|
||||
defer s.Close()
|
||||
|
||||
p := NewProxy(s.Addr, DNS)
|
||||
p := NewProxy(s.Addr, transport.DNS)
|
||||
f := New()
|
||||
f.SetProxy(p)
|
||||
defer f.Close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue