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:
Miek Gieben 2017-08-24 11:35:14 +01:00 committed by GitHub
parent ea53f8c219
commit f901b0cefa
24 changed files with 39 additions and 143 deletions

View file

@ -25,15 +25,10 @@ func TestLookupWildcard(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()
log.SetOutput(ioutil.Discard)