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

testscript.RunMain is deprecated

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      In my PR for updating dependencies, I noticed that golint was failing with a deprecated function in the integration tests:

      https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_installer/10060/pull-ci-openshift-installer-main-golint/1985679181924536320/artifacts/test/build-log.txt

      The note says:

          testscript.RunMain is deprecated: use [Main], as the only reason for returning exit codes
      was to collect full code coverage, which Go does automatically now:
      https://go.dev/blog/integration-test-coveragedeprecateddefault

      I gave a quick shot at fixing it and also asked Claude, but it was not obvious how to use Main instead of RunMain. So instead I'm putting a nolint on the PR and we can fix later.

      Version-Release number of selected component (if applicable):

          main

      How reproducible:

          

      Steps to Reproduce:

       go-lint with https://github.com/openshift/installer/pull/10060 or on main once that marges
          

      Actual results:

          

      Expected results:

          Remove the //nolint and go-fmt should pass 

      Additional info:

          

              rhn-support-pamoedom Pedro Jose Amoedo Martinez
              padillon Patrick Dillon
              None
              None
              Manoj Hans Manoj Hans
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: