Skip to content

Commit ab6b5a2

Browse files
authored
conformance: make backend TLS tests IPv6-safe (#4120)
otherwise we send requests to `http://[fc00/backendtlspolicy-nonexistent-ca-certificate-ref"` which is very wrong
1 parent c26512f commit ab6b5a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

conformance/utils/kubernetes/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ func GatewayAndRoutesMustBeAccepted(t *testing.T, c client.Client, timeoutConfig
344344
// If the Gateway has multiple listeners, get a portless gwAddr.
345345
// Otherwise, you get the first listener's port, which might not be the one you want.
346346
if !usePort {
347-
gwAddr, _, _ = strings.Cut(gwAddr, ":")
347+
gwAddr, _, _ = net.SplitHostPort(gwAddr)
348348
}
349349

350350
ns := gatewayv1.Namespace(gw.Namespace)

0 commit comments

Comments
 (0)