aboutsummaryrefslogtreecommitdiff
path: root/plugin/pkg/proxy/health_test.go
diff options
context:
space:
mode:
authorGravatar Pat Downey <patdowney@users.noreply.github.com> 2023-07-04 15:35:55 +0100
committerGravatar GitHub <noreply@github.com> 2023-07-04 16:35:55 +0200
commitea293da1d6bb0c4f598c8790c6941d56c79c0aa3 (patch)
tree9e808cf986b72673e2b9b176624cada501cd594e /plugin/pkg/proxy/health_test.go
parent6e1263d3d9ae1deef399df23d4ae47d2c3154e03 (diff)
downloadcoredns-ea293da1d6bb0c4f598c8790c6941d56c79c0aa3.tar.gz
coredns-ea293da1d6bb0c4f598c8790c6941d56c79c0aa3.tar.zst
coredns-ea293da1d6bb0c4f598c8790c6941d56c79c0aa3.zip
Fix forward metrics for backwards compatibility (#6178)
Diffstat (limited to 'plugin/pkg/proxy/health_test.go')
-rw-r--r--plugin/pkg/proxy/health_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugin/pkg/proxy/health_test.go b/plugin/pkg/proxy/health_test.go
index c1b5270ad..8d9acfb9c 100644
--- a/plugin/pkg/proxy/health_test.go
+++ b/plugin/pkg/proxy/health_test.go
@@ -23,11 +23,11 @@ func TestHealth(t *testing.T) {
})
defer s.Close()
- hc := NewHealthChecker(transport.DNS, true, "")
+ hc := NewHealthChecker("TestHealth", transport.DNS, true, "")
hc.SetReadTimeout(10 * time.Millisecond)
hc.SetWriteTimeout(10 * time.Millisecond)
- p := NewProxy(s.Addr, transport.DNS)
+ p := NewProxy("TestHealth", s.Addr, transport.DNS)
p.readTimeout = 10 * time.Millisecond
err := hc.Check(p)
if err != nil {
@@ -53,12 +53,12 @@ func TestHealthTCP(t *testing.T) {
})
defer s.Close()
- hc := NewHealthChecker(transport.DNS, true, "")
+ hc := NewHealthChecker("TestHealthTCP", transport.DNS, true, "")
hc.SetTCPTransport()
hc.SetReadTimeout(10 * time.Millisecond)
hc.SetWriteTimeout(10 * time.Millisecond)
- p := NewProxy(s.Addr, transport.DNS)
+ p := NewProxy("TestHealthTCP", s.Addr, transport.DNS)
p.readTimeout = 10 * time.Millisecond
err := hc.Check(p)
if err != nil {
@@ -84,11 +84,11 @@ func TestHealthNoRecursion(t *testing.T) {
})
defer s.Close()
- hc := NewHealthChecker(transport.DNS, false, "")
+ hc := NewHealthChecker("TestHealthNoRecursion", transport.DNS, false, "")
hc.SetReadTimeout(10 * time.Millisecond)
hc.SetWriteTimeout(10 * time.Millisecond)
- p := NewProxy(s.Addr, transport.DNS)
+ p := NewProxy("TestHealthNoRecursion", s.Addr, transport.DNS)
p.readTimeout = 10 * time.Millisecond
err := hc.Check(p)
if err != nil {
@@ -108,11 +108,11 @@ func TestHealthTimeout(t *testing.T) {
})
defer s.Close()
- hc := NewHealthChecker(transport.DNS, false, "")
+ hc := NewHealthChecker("TestHealthTimeout", transport.DNS, false, "")
hc.SetReadTimeout(10 * time.Millisecond)
hc.SetWriteTimeout(10 * time.Millisecond)
- p := NewProxy(s.Addr, transport.DNS)
+ p := NewProxy("TestHealthTimeout", s.Addr, transport.DNS)
p.readTimeout = 10 * time.Millisecond
err := hc.Check(p)
if err == nil {
@@ -134,11 +134,11 @@ func TestHealthDomain(t *testing.T) {
})
defer s.Close()
- hc := NewHealthChecker(transport.DNS, true, hcDomain)
+ hc := NewHealthChecker("TestHealthDomain", transport.DNS, true, hcDomain)
hc.SetReadTimeout(10 * time.Millisecond)
hc.SetWriteTimeout(10 * time.Millisecond)
- p := NewProxy(s.Addr, transport.DNS)
+ p := NewProxy("TestHealthDomain", s.Addr, transport.DNS)
p.readTimeout = 10 * time.Millisecond
err := hc.Check(p)
if err != nil {