aboutsummaryrefslogtreecommitdiff
path: root/test/cache_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/cache_test.go')
-rw-r--r--test/cache_test.go14
1 files changed, 2 insertions, 12 deletions
diff --git a/test/cache_test.go b/test/cache_test.go
index 43ef29efb..bb5017a24 100644
--- a/test/cache_test.go
+++ b/test/cache_test.go
@@ -26,15 +26,10 @@ func TestLookupCache(t *testing.T) {
file ` + name + `
}
`
- i, err := CoreDNSServer(corefile)
+ i, udp, _, err := CoreDNSServerAndPorts(corefile)
if err != nil {
t.Fatalf("Could not get CoreDNS serving instance: %s", err)
}
-
- udp, _ := CoreDNSServerPorts(i, 0)
- if udp == "" {
- t.Fatalf("Could not get UDP listening port")
- }
defer i.Stop()
// Start caching proxy CoreDNS that we want to test.
@@ -43,15 +38,10 @@ func TestLookupCache(t *testing.T) {
cache
}
`
- i, err = CoreDNSServer(corefile)
+ i, udp, _, err = CoreDNSServerAndPorts(corefile)
if err != nil {
t.Fatalf("Could not get CoreDNS serving instance: %s", err)
}
-
- udp, _ = CoreDNSServerPorts(i, 0)
- if udp == "" {
- t.Fatalf("Could not get UDP listening port")
- }
defer i.Stop()
log.SetOutput(ioutil.Discard)