mirror of
https://github.com/coredns/coredns.git
synced 2025-10-29 09:14:17 -04: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:
@@ -13,24 +13,21 @@ func TestProxyToChaosServer(t *testing.T) {
|
||||
chaos CoreDNS-001 miek@miek.nl
|
||||
}
|
||||
`
|
||||
chaos, err := CoreDNSServer(corefile)
|
||||
chaos, udpChaos, _, err := CoreDNSServerAndPorts(corefile)
|
||||
if err != nil {
|
||||
t.Fatalf("Could not get CoreDNS serving instance: %s", err)
|
||||
}
|
||||
|
||||
udpChaos, _ := CoreDNSServerPorts(chaos, 0)
|
||||
defer chaos.Stop()
|
||||
|
||||
corefileProxy := `.:0 {
|
||||
proxy . ` + udpChaos + `
|
||||
}
|
||||
`
|
||||
proxy, err := CoreDNSServer(corefileProxy)
|
||||
proxy, udp, _, err := CoreDNSServerAndPorts(corefileProxy)
|
||||
if err != nil {
|
||||
t.Fatalf("Could not get CoreDNS serving instance")
|
||||
}
|
||||
|
||||
udp, _ := CoreDNSServerPorts(proxy, 0)
|
||||
defer proxy.Stop()
|
||||
|
||||
chaosTest(t, udpChaos)
|
||||
|
||||
Reference in New Issue
Block a user