mirror of
https://github.com/coredns/coredns.git
synced 2025-12-07 02:45:11 -05:00
plugin/health: Poll localhost by default (#5934)
defaulting to localhost makes things explicit in CoreDNS code, and will give us valid URIs in the logs Signed-off-by: W. Trevor King <wking@tremily.us>
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
@@ -22,6 +23,13 @@ func Test_health_overloaded_cancellation(t *testing.T) {
|
||||
stop: cancel,
|
||||
}
|
||||
|
||||
var err error
|
||||
h.healthURI, err = url.Parse(ts.URL)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
h.healthURI.Path = "/health"
|
||||
|
||||
stopped := make(chan struct{})
|
||||
go func() {
|
||||
h.overloaded(ctx)
|
||||
|
||||
Reference in New Issue
Block a user