From 257044556ba2b6aafd13fbb7e35a75315af8a070 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Mon, 3 Oct 2022 13:50:17 -0700 Subject: [PATCH] [chore] update tests to bind to localhost (#6224) Update some tests to bind to localhost instead of 0.0.0.0 --- config/confighttp/confighttp_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/confighttp/confighttp_test.go b/config/confighttp/confighttp_test.go index 72270438376..4f7877a4299 100644 --- a/config/confighttp/confighttp_test.go +++ b/config/confighttp/confighttp_test.go @@ -355,7 +355,7 @@ func TestHTTPServerSettingsError(t *testing.T) { { err: "^failed to load TLS config: failed to load CA CertPool: failed to load CA /doesnt/exist:", settings: HTTPServerSettings{ - Endpoint: "", + Endpoint: "localhost:0", TLSSetting: &configtls.TLSServerSetting{ TLSSetting: configtls.TLSSetting{ CAFile: "/doesnt/exist", @@ -366,7 +366,7 @@ func TestHTTPServerSettingsError(t *testing.T) { { err: "^failed to load TLS config: for auth via TLS, either both certificate and key must be supplied, or neither", settings: HTTPServerSettings{ - Endpoint: "", + Endpoint: "localhost:0", TLSSetting: &configtls.TLSServerSetting{ TLSSetting: configtls.TLSSetting{ CertFile: "/doesnt/exist", @@ -377,7 +377,7 @@ func TestHTTPServerSettingsError(t *testing.T) { { err: "^failed to load TLS config: failed to load client CA CertPool: failed to load CA /doesnt/exist:", settings: HTTPServerSettings{ - Endpoint: "", + Endpoint: "localhost:0", TLSSetting: &configtls.TLSServerSetting{ ClientCAFile: "/doesnt/exist", }, @@ -759,7 +759,7 @@ func verifyCorsResp(t *testing.T, url string, origin string, maxAge int, extraHe func ExampleHTTPServerSettings() { settings := HTTPServerSettings{ - Endpoint: ":443", + Endpoint: "localhost:443", } s, err := settings.ToServer( componenttest.NewNopHost(),