aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Tom Thorogood <me+github@tomthorogood.net> 2023-11-09 06:30:32 +1030
committerGravatar GitHub <noreply@github.com> 2023-11-08 12:00:32 -0800
commitb541b4ea494333fd83cce981b478068515c5f4d8 (patch)
treee2325ee943f8f22af0a009c86300641066b17e69
parent4d287516136881ef4729f627dbabe804c6c38bd9 (diff)
downloadcoredns-b541b4ea494333fd83cce981b478068515c5f4d8.tar.gz
coredns-b541b4ea494333fd83cce981b478068515c5f4d8.tar.zst
coredns-b541b4ea494333fd83cce981b478068515c5f4d8.zip
Use the correct root domain name in the proxy plugin's TestHealthX tests (#6395)
When packing the empty domain name, miekg/dns can end up creating corrupt DNS messages. With some planned unpacking changes, this now trips an error condition and causes these tests to fail. Correct this by using the root domain explicitly as this gets correctly encoded on the wire. Signed-off-by: Tom Thorogood <me+github@tomthorogood.net>
-rw-r--r--plugin/pkg/proxy/health_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugin/pkg/proxy/health_test.go b/plugin/pkg/proxy/health_test.go
index 8d9acfb9c..bb93d7756 100644
--- a/plugin/pkg/proxy/health_test.go
+++ b/plugin/pkg/proxy/health_test.go
@@ -23,7 +23,7 @@ func TestHealth(t *testing.T) {
})
defer s.Close()
- hc := NewHealthChecker("TestHealth", transport.DNS, true, "")
+ hc := NewHealthChecker("TestHealth", transport.DNS, true, ".")
hc.SetReadTimeout(10 * time.Millisecond)
hc.SetWriteTimeout(10 * time.Millisecond)
@@ -53,7 +53,7 @@ func TestHealthTCP(t *testing.T) {
})
defer s.Close()
- hc := NewHealthChecker("TestHealthTCP", transport.DNS, true, "")
+ hc := NewHealthChecker("TestHealthTCP", transport.DNS, true, ".")
hc.SetTCPTransport()
hc.SetReadTimeout(10 * time.Millisecond)
hc.SetWriteTimeout(10 * time.Millisecond)
@@ -84,7 +84,7 @@ func TestHealthNoRecursion(t *testing.T) {
})
defer s.Close()
- hc := NewHealthChecker("TestHealthNoRecursion", transport.DNS, false, "")
+ hc := NewHealthChecker("TestHealthNoRecursion", transport.DNS, false, ".")
hc.SetReadTimeout(10 * time.Millisecond)
hc.SetWriteTimeout(10 * time.Millisecond)
@@ -108,7 +108,7 @@ func TestHealthTimeout(t *testing.T) {
})
defer s.Close()
- hc := NewHealthChecker("TestHealthTimeout", transport.DNS, false, "")
+ hc := NewHealthChecker("TestHealthTimeout", transport.DNS, false, ".")
hc.SetReadTimeout(10 * time.Millisecond)
hc.SetWriteTimeout(10 * time.Millisecond)