From c4ba2849643b27a0b454fe83a4a87f7c46138038 Mon Sep 17 00:00:00 2001 From: Andrey Meshkov Date: Sat, 5 Jan 2019 22:24:07 +0300 Subject: [PATCH] fix tests --- dnsforward/dnsforward.go | 1 - dnsforward/dnsforward_test.go | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dnsforward/dnsforward.go b/dnsforward/dnsforward.go index 05cdf12b..4075e614 100644 --- a/dnsforward/dnsforward.go +++ b/dnsforward/dnsforward.go @@ -122,7 +122,6 @@ func (s *Server) startInternal(config *ServerConfig) error { go statsRotator() }) - // TODO: Add TCPListenAddr proxyConfig := proxy.Config{ UDPListenAddr: s.UDPListenAddr, TCPListenAddr: s.TCPListenAddr, diff --git a/dnsforward/dnsforward_test.go b/dnsforward/dnsforward_test.go index 7b0bb591..0edde88b 100644 --- a/dnsforward/dnsforward_test.go +++ b/dnsforward/dnsforward_test.go @@ -13,6 +13,7 @@ import ( func TestServer(t *testing.T) { s := Server{} s.UDPListenAddr = &net.UDPAddr{Port: 0} + s.TCPListenAddr = &net.TCPAddr{Port: 0} err := s.Start(nil) if err != nil { t.Fatalf("Failed to start server: %s", err) @@ -47,6 +48,7 @@ func TestServer(t *testing.T) { func TestInvalidRequest(t *testing.T) { s := Server{} s.UDPListenAddr = &net.UDPAddr{Port: 0} + s.TCPListenAddr = &net.TCPAddr{Port: 0} err := s.Start(nil) if err != nil { t.Fatalf("Failed to start server: %s", err)