aboutsummaryrefslogtreecommitdiff
path: root/plugin/forward/proxy_test.go
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2018-07-09 15:14:55 +0100
committerGravatar GitHub <noreply@github.com> 2018-07-09 15:14:55 +0100
commita536833546261fe52ba45e662f5973cbff73da36 (patch)
treed6084ddef1536683f5a9641c61424cee1f87f219 /plugin/forward/proxy_test.go
parent4083852b70d4681752af8ad9a1840150fd52c071 (diff)
downloadcoredns-a536833546261fe52ba45e662f5973cbff73da36.tar.gz
coredns-a536833546261fe52ba45e662f5973cbff73da36.tar.zst
coredns-a536833546261fe52ba45e662f5973cbff73da36.zip
plugin/forward: add HealthChecker interface (#1950)
* plugin/forward: add HealthChecker interface Make the HealthChecker interface and morph the current DNS health checker into that interface. Remove all whole bunch of method on Forward that didn't make sense. This is done in preparation of adding a DoH client to forward - which requires a completely different healthcheck implementation (and more, but lets start here) Signed-off-by: Miek Gieben <miek@miek.nl> * Use protocol Signed-off-by: Miek Gieben <miek@miek.nl> * Dial doesnt need to be method an Forward either Signed-off-by: Miek Gieben <miek@miek.nl> * Address comments Address various comments on the PR. Signed-off-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin/forward/proxy_test.go')
-rw-r--r--plugin/forward/proxy_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/forward/proxy_test.go b/plugin/forward/proxy_test.go
index d68d1def2..d7af25aa0 100644
--- a/plugin/forward/proxy_test.go
+++ b/plugin/forward/proxy_test.go
@@ -26,7 +26,7 @@ func TestProxyClose(t *testing.T) {
ctx := context.TODO()
for i := 0; i < 100; i++ {
- p := NewProxy(s.Addr, nil)
+ p := NewProxy(s.Addr, DNS)
p.start(hcInterval)
go func() { p.Connect(ctx, state, options{}) }()
@@ -95,7 +95,7 @@ func TestProxyTLSFail(t *testing.T) {
}
func TestProtocolSelection(t *testing.T) {
- p := NewProxy("bad_address", nil)
+ p := NewProxy("bad_address", DNS)
stateUDP := request.Request{W: &test.ResponseWriter{}, Req: new(dns.Msg)}
stateTCP := request.Request{W: &test.ResponseWriter{TCP: true}, Req: new(dns.Msg)}