aboutsummaryrefslogtreecommitdiffstats
path: root/dns/proxy_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'dns/proxy_test.go')
-rw-r--r--dns/proxy_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/dns/proxy_test.go b/dns/proxy_test.go
index 003430d..85d41c9 100644
--- a/dns/proxy_test.go
+++ b/dns/proxy_test.go
@@ -144,6 +144,7 @@ func TestProxy(t *testing.T) {
}
p := testProxy(t)
p.Handler = h
+ defer p.Close()
m := dns.Msg{}
m.Id = dns.Id()
@@ -161,6 +162,7 @@ func TestProxyWithResolvers(t *testing.T) {
p.resolvers = []string{"resolver1"}
client := make(testClient)
p.client = client
+ defer p.Close()
// First and only resolver responds succesfully
reply := ReplyA("host1", net.ParseIP("192.0.2.1"))
@@ -196,6 +198,7 @@ func TestProxyWithCache(t *testing.T) {
p.resolvers = []string{"resolver1"}
client := make(testClient)
p.client = client
+ defer p.Close()
reply := ReplyA("host1", net.ParseIP("192.0.2.1"))
m := dns.Msg{}
@@ -218,6 +221,7 @@ func TestProxyWithLogging(t *testing.T) {
if err != nil {
t.Fatal(err)
}
+ defer p.Close()
badHost := "badhost1."
goodHost := "goodhost1."
p.resolvers = []string{"resolver1"}