Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-63683

Unit test is failing on golang v1.24.8+ and v1.25.2+

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • 4.21.0
    • oc
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Proposed
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              aguclu@redhat.com Arda Guclu
              nunnatsa Nahshon Unna Tsameret
              None
              None
              Ying Zhou Ying Zhou
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: