Skip to content

Commit

Permalink
[chore] update tests to bind to localhost (open-telemetry#6224)
Browse files Browse the repository at this point in the history
Update some tests to bind to localhost instead of 0.0.0.0
  • Loading branch information
Alex Boten authored Oct 3, 2022
1 parent 6fb5ef5 commit 2570445
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/confighttp/confighttp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
},
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 2570445

Please sign in to comment.