From 70edb3f7a5f7db13e9c7d0aa198a06b5ae472aec Mon Sep 17 00:00:00 2001 From: Wil Simpson Date: Wed, 13 Mar 2024 19:14:57 -0400 Subject: [PATCH] Replace localhost with 127.0.0.1 --- coverage.out | 8 ++++---- test/db/docker.go | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/coverage.out b/coverage.out index e69ac07..56c32af 100644 --- a/coverage.out +++ b/coverage.out @@ -47,7 +47,7 @@ github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:45.9,45.23 1 12 github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:45.23,47.4 1 6 github.com/ShatteredRealms/go-backend/pkg/helpers/config.go:49.3,49.54 1 12 github.com/ShatteredRealms/go-backend/pkg/helpers/conversions.go:3.48,5.28 2 1 -github.com/ShatteredRealms/go-backend/pkg/helpers/conversions.go:5.28,7.3 1 42 +github.com/ShatteredRealms/go-backend/pkg/helpers/conversions.go:5.28,7.3 1 63 github.com/ShatteredRealms/go-backend/pkg/helpers/conversions.go:9.2,9.13 1 1 github.com/ShatteredRealms/go-backend/pkg/helpers/errors.go:8.63,9.16 1 4 github.com/ShatteredRealms/go-backend/pkg/helpers/errors.go:9.16,11.3 1 0 @@ -94,9 +94,9 @@ github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:144.2,144.18 1 2 github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:144.18,146.3 1 1 github.com/ShatteredRealms/go-backend/pkg/helpers/srv.go:148.2,148.28 1 1 github.com/ShatteredRealms/go-backend/pkg/helpers/uuid.go:9.59,11.39 2 3 -github.com/ShatteredRealms/go-backend/pkg/helpers/uuid.go:11.39,13.17 2 15 +github.com/ShatteredRealms/go-backend/pkg/helpers/uuid.go:11.39,13.17 2 48 github.com/ShatteredRealms/go-backend/pkg/helpers/uuid.go:13.17,15.4 1 2 -github.com/ShatteredRealms/go-backend/pkg/helpers/uuid.go:16.3,16.17 1 13 +github.com/ShatteredRealms/go-backend/pkg/helpers/uuid.go:16.3,16.17 1 46 github.com/ShatteredRealms/go-backend/pkg/helpers/uuid.go:19.2,19.17 1 1 github.com/ShatteredRealms/go-backend/pkg/model/character.go:49.38,50.43 1 10 github.com/ShatteredRealms/go-backend/pkg/model/character.go:50.43,52.3 1 1 @@ -334,7 +334,7 @@ github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:22.24,24.3 1 0 github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:25.2,25.27 1 1 github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:25.27,27.3 1 0 github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:28.2,30.27 2 1 -github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:30.27,33.3 2 2 +github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:30.27,33.3 2 1 github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:34.2,34.16 1 1 github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:34.16,36.3 1 0 github.com/ShatteredRealms/go-backend/pkg/repository/kafka.go:38.2,39.16 2 1 diff --git a/test/db/docker.go b/test/db/docker.go index cb94671..5423a31 100644 --- a/test/db/docker.go +++ b/test/db/docker.go @@ -7,6 +7,7 @@ import ( "os" "path/filepath" "strconv" + "strings" "time" "github.com/ShatteredRealms/go-backend/pkg/log" @@ -60,7 +61,7 @@ func SetupKeycloakWithDocker() (func(), string) { chk(keycloakResource.Close()) } - host := fmt.Sprintf("http://%s", keycloakResource.GetHostPort("8080/tcp")) + host := strings.ReplaceAll("http://"+keycloakResource.GetHostPort("8080/tcp"), "localhost", "127.0.0.1") chk(Retry(func() error { _, err := http.Get(host)