mirror of
https://github.com/coredns/coredns.git
synced 2025-12-19 00:25:11 -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:
@@ -45,14 +45,12 @@ func TestMetricsRefused(t *testing.T) {
|
||||
prometheus localhost:0
|
||||
}
|
||||
`
|
||||
srv, err := CoreDNSServer(corefile)
|
||||
srv, udp, _, err := CoreDNSServerAndPorts(corefile)
|
||||
if err != nil {
|
||||
t.Fatalf("Could not get CoreDNS serving instance: %s", err)
|
||||
}
|
||||
defer srv.Stop()
|
||||
|
||||
udp, _ := CoreDNSServerPorts(srv, 0)
|
||||
|
||||
m := new(dns.Msg)
|
||||
m.SetQuestion("google.com.", dns.TypeA)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user