Description of problem:
golang v1.24.8 and v1.25.2 , introducing a fix to CVE-2025-47912 (IPv4 addresses and hostnames must not appear within square brackets).
The pkg/helpers/source-to-image/git/url_test.go::TestParse test is using the [::ffff:1.2.3.4] address, that is now failing on the standard library url.Parse() function.
Steps to Reproduce:
Run the minimal reproducible unit-test
$ go test -test.run "^\QTestParse\E$" ./pkg/helpers/source-to-image/git
Actual results:
When running with golang v1.24.7:
ok github.com/openshift/oc/pkg/helpers/source-to-image/git 0.001s
When running with golang v1.24.8:
--- FAIL: TestParse (0.00s)
url_test.go:231: http://[::ffff:1.2.3.4]:443: Parse() returned err: parse "http://[::ffff:1.2.3.4]:443": invalid IPv6 host
FAIL
FAIL github.com/openshift/oc/pkg/helpers/source-to-image/git 0.001s
FAIL
Expected results:
The test shall pass.