mirror of
https://github.com/coredns/coredns.git
synced 2025-11-28 06:34:08 -05:00
Move *proxy* to external (#2651)
* Move *proxy* to external move the proxy plugin into coredns/proxy and remove it as a default plugin. Link the proxy to deprecated in plugin.cfg coredns/proxy doesn't compile because of the vendoring :( Signed-off-by: Miek Gieben <miek@miek.nl> * Add github.com/coredns/proxy Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
@@ -26,9 +26,9 @@ func TestLookupCache(t *testing.T) {
|
||||
}
|
||||
defer i.Stop()
|
||||
|
||||
// Start caching proxy CoreDNS that we want to test.
|
||||
// Start caching forward CoreDNS that we want to test.
|
||||
corefile = `example.org:0 {
|
||||
proxy . ` + udp + `
|
||||
forward . ` + udp + `
|
||||
cache 10
|
||||
}
|
||||
`
|
||||
|
||||
@@ -47,7 +47,7 @@ func TestLookupAutoPathErratic(t *testing.T) {
|
||||
corefile := `.:0 {
|
||||
erratic
|
||||
autopath @erratic
|
||||
proxy . ` + proxyPath + `
|
||||
forward . ` + proxyPath + `
|
||||
debug
|
||||
}
|
||||
`
|
||||
@@ -92,7 +92,7 @@ func TestAutoPathErraticNotLoaded(t *testing.T) {
|
||||
setupProxyTargetCoreDNS(t, func(proxyPath string) {
|
||||
corefile := `.:0 {
|
||||
autopath @erratic
|
||||
proxy . ` + proxyPath + `
|
||||
forward . ` + proxyPath + `
|
||||
debug
|
||||
}
|
||||
`
|
||||
|
||||
@@ -48,7 +48,7 @@ func TestEtcdStubAndProxyLookup(t *testing.T) {
|
||||
upstream
|
||||
fallthrough
|
||||
}
|
||||
proxy . 8.8.8.8:53
|
||||
forward . 8.8.8.8:53
|
||||
}`
|
||||
|
||||
ex, udp, _, err := CoreDNSServerAndPorts(corefile)
|
||||
|
||||
@@ -54,7 +54,7 @@ func TestZoneExternalCNAMELookupWithProxy(t *testing.T) {
|
||||
file ` + name + ` example.org {
|
||||
upstream
|
||||
}
|
||||
proxy . 8.8.8.8 8.8.4.4
|
||||
forward . 8.8.8.8 8.8.4.4
|
||||
}
|
||||
`
|
||||
i, udp, _, err := CoreDNSServerAndPorts(corefile)
|
||||
|
||||
@@ -23,7 +23,7 @@ func TestMetricsServer(t *testing.T) {
|
||||
}
|
||||
|
||||
example.com:0 {
|
||||
proxy . 8.8.4.4:53
|
||||
forward . 8.8.4.4:53
|
||||
prometheus localhost:0
|
||||
}
|
||||
`
|
||||
@@ -38,7 +38,7 @@ func TestMetricsRefused(t *testing.T) {
|
||||
metricName := "coredns_dns_response_rcode_count_total"
|
||||
|
||||
corefile := `example.org:0 {
|
||||
proxy . 8.8.8.8:53
|
||||
forward . 8.8.8.8:53
|
||||
prometheus localhost:0
|
||||
}
|
||||
`
|
||||
|
||||
@@ -46,7 +46,7 @@ func TestProxyThreeWay(t *testing.T) {
|
||||
|
||||
// Proxying CoreDNS.
|
||||
corefileProxy := `example.org:0 {
|
||||
proxy . ` + addr1 + " " + addr2 + ` {
|
||||
forward . ` + addr1 + " " + addr2 + ` {
|
||||
max_fails 1
|
||||
}
|
||||
}`
|
||||
|
||||
@@ -21,7 +21,7 @@ func TestProxyToChaosServer(t *testing.T) {
|
||||
defer chaos.Stop()
|
||||
|
||||
corefileProxy := `.:0 {
|
||||
proxy . ` + udpChaos + `
|
||||
forward . ` + udpChaos + `
|
||||
}
|
||||
`
|
||||
proxy, udp, _, err := CoreDNSServerAndPorts(corefileProxy)
|
||||
|
||||
Reference in New Issue
Block a user