aboutsummaryrefslogtreecommitdiff
path: root/test/proxy_http_health_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2017-08-24 11:35:14 +0100
committerGravatar GitHub <noreply@github.com> 2017-08-24 11:35:14 +0100
commitf901b0cefa1475c83e6b6dc859ef35675feb41e1 (patch)
tree93d6d067e1ffe7bb8cea40921d99b5088a12acb8 /test/proxy_http_health_test.go
parentea53f8c21973494d485677ca284116382ab5fa7d (diff)
downloadcoredns-f901b0cefa1475c83e6b6dc859ef35675feb41e1.tar.gz
coredns-f901b0cefa1475c83e6b6dc859ef35675feb41e1.tar.zst
coredns-f901b0cefa1475c83e6b6dc859ef35675feb41e1.zip
tests: CoreDNSServerAndPorts (#972)
* tests: CoreDNSServerAndPorts Copy from kubernetes.go and renamed to fit the style, adapted almost all callers. This is a mechanicl change, no testdata was changed. * typos
Diffstat (limited to 'test/proxy_http_health_test.go')
-rw-r--r--test/proxy_http_health_test.go14
1 files changed, 2 insertions, 12 deletions
diff --git a/test/proxy_http_health_test.go b/test/proxy_http_health_test.go
index b190f2b45..a331083de 100644
--- a/test/proxy_http_health_test.go
+++ b/test/proxy_http_health_test.go
@@ -51,15 +51,10 @@ func TestProxyWithHTTPCheckOK(t *testing.T) {
}
`
- authoritativeInstance, err := CoreDNSServer(authoritativeCorefile)
+ authoritativeInstance, authoritativeAddr, _, err := CoreDNSServerAndPorts(authoritativeCorefile)
if err != nil {
t.Fatalf("Could not get CoreDNS authoritative instance: %s", err)
}
-
- authoritativeAddr, _ := CoreDNSServerPorts(authoritativeInstance, 0)
- if authoritativeAddr == "" {
- t.Fatalf("Could not get CoreDNS authoritative instance UDP listening port")
- }
defer authoritativeInstance.Stop()
proxyCorefile := `example.org:0 {
@@ -70,15 +65,10 @@ func TestProxyWithHTTPCheckOK(t *testing.T) {
}
`
- proxyInstance, err := CoreDNSServer(proxyCorefile)
+ proxyInstance, proxyAddr, _, err := CoreDNSServerAndPorts(proxyCorefile)
if err != nil {
t.Fatalf("Could not get CoreDNS proxy instance: %s", err)
}
-
- proxyAddr, _ := CoreDNSServerPorts(proxyInstance, 0)
- if proxyAddr == "" {
- t.Fatalf("Could not get CoreDNS proxy instance UDP listening port")
- }
defer proxyInstance.Stop()
p := proxy.NewLookup([]string{proxyAddr})