mirror of
https://github.com/coredns/coredns.git
synced 2025-12-06 10:25:10 -05:00
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
This commit is contained in:
@@ -27,15 +27,10 @@ func TestZoneExternalCNAMELookupWithoutProxy(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()
|
||||
|
||||
p := proxy.NewLookup([]string{udp})
|
||||
@@ -68,15 +63,10 @@ func TestZoneExternalCNAMELookupWithProxy(t *testing.T) {
|
||||
}
|
||||
}
|
||||
`
|
||||
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()
|
||||
|
||||
p := proxy.NewLookup([]string{udp})
|
||||
|
||||
Reference in New Issue
Block a user