diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-13 14:12:40 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-13 14:12:40 -0600 |
| commit | e73e2542b26916eba89f62132efd1bd151f88c9b (patch) | |
| tree | 22db70cdf4474222bd92c6a5f05b0dc06689f052 /test | |
| parent | 6949f277ea9cef8a117ab504befb592d0b138a1f (diff) | |
test: replace loopback addresses with testcontainer internal host
Diffstat (limited to 'test')
| -rw-r--r-- | test/integration/container.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/integration/container.go b/test/integration/container.go index a991333..8f6f219 100644 --- a/test/integration/container.go +++ b/test/integration/container.go @@ -15,8 +15,11 @@ import ( "github.com/xlgmokha/x/pkg/env" ) -func normalizeIssuer(t *testing.T, originalIssuer string) (string, int) { - issuer := strings.Replace(originalIssuer, "127.0.0.1", testcontainers.HostInternal, 1) +func normalizeIssuer(t *testing.T, issuer string) (string, int) { + issuer = strings.Replace(issuer, "0.0.0.0", testcontainers.HostInternal, 1) + issuer = strings.Replace(issuer, "[::]", testcontainers.HostInternal, 1) + issuer = strings.Replace(issuer, "127.0.0.1", testcontainers.HostInternal, 1) + issuer = strings.Replace(issuer, "localhost", testcontainers.HostInternal, 1) u, err := url.Parse(issuer) require.NoError(t, err) |
