diff options
Diffstat (limited to 'test/tests.go')
-rw-r--r-- | test/tests.go | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/test/tests.go b/test/tests.go index d38bf955f..0f9d12bae 100644 --- a/test/tests.go +++ b/test/tests.go @@ -1,12 +1,7 @@ package test import ( - "testing" - "time" - - "github.com/miekg/coredns/core" "github.com/miekg/coredns/middleware" - "github.com/miekg/coredns/server" "github.com/miekg/dns" ) @@ -25,16 +20,3 @@ func Exchange(m *dns.Msg, server, net string) (*dns.Msg, error) { c.Net = net return middleware.Exchange(c, m, server) } - -// Server returns a test server and the tcp and udp listeners addresses. -func Server(t *testing.T, corefile string) (*server.Server, string, string, error) { - srv, err := core.TestServer(t, corefile) - if err != nil { - return nil, "", "", err - } - go srv.ListenAndServe() - - time.Sleep(1 * time.Second) // yeah... I regret nothing - tcp, udp := srv.LocalAddr() - return srv, tcp.String(), udp.String(), nil -} |