diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-13 14:23:32 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-13 14:23:32 -0600 |
| commit | 9ba4e538c4aa362cecfc16d15ae220a1a8bf93f2 (patch) | |
| tree | 71c73388966221bdbab415d57a88abeb9431f405 /test/integration | |
| parent | 294ab5fc60b2a9550b78a452fd40d489f90485d6 (diff) | |
refactor: loop through each of the loopback addresses
Diffstat (limited to 'test/integration')
| -rw-r--r-- | test/integration/container.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/integration/container.go b/test/integration/container.go index 8f6f219..badb640 100644 --- a/test/integration/container.go +++ b/test/integration/container.go @@ -16,10 +16,9 @@ import ( ) 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) + for _, loopback := range []string{"0.0.0.0", "127.0.0.1", "[::]", "localhost"} { + issuer = strings.Replace(issuer, loopback, testcontainers.HostInternal, 1) + } u, err := url.Parse(issuer) require.NoError(t, err) |
