Skip to content

CCO-837: Replace deprecated golang/mock with go.uber.org/mock - #1069

Open
ericahinkleRH wants to merge 1 commit into
openshift:masterfrom
ericahinkleRH:CCO-837-standalone
Open

CCO-837: Replace deprecated golang/mock with go.uber.org/mock#1069
ericahinkleRH wants to merge 1 commit into
openshift:masterfrom
ericahinkleRH:CCO-837-standalone

Conversation

@ericahinkleRH

@ericahinkleRH ericahinkleRH commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace deprecated golang/mock with go.uber.org/mock as the maintained fork.

The golang/mock repository is no longer maintained and recommends migrating to go.uber.org/mock.

Changes

  • Updated go.mod dependency from golang/mock v1.7.0-rc.1 to go.uber.org/mock v0.6.0
  • Replaced import paths in all test files and generated mocks
  • Fixed gomock.InOrder API change (requires []any instead of []*gomock.Call)
  • Vendored new dependency

Testing

  • Unit tests pass
  • All imports updated correctly
  • No changes to production code (mocks only used in tests)

Jira

https://redhat.atlassian.net/browse/CCO-837

Notes

This PR is independent and does NOT depend on CCO-834 (K8s 1.36 upgrade).

Summary by CodeRabbit

  • Chores

    • Migrated the Go mocking library dependency to its maintained successor, updating the generated mocks and related module requirements.
  • Tests

    • Updated test suites and shared helpers to use the new mocking library types.
    • Adjusted mock handling in ordering assertions and added/updated mock expectations (including universe domain handling where applicable) to match existing behavior.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 23, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@ericahinkleRH: This pull request references CCO-837 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

Replace deprecated golang/mock with go.uber.org/mock as the maintained fork.

The golang/mock repository is no longer maintained and recommends migrating to go.uber.org/mock.

Changes

  • Updated go.mod dependency from golang/mock v1.7.0-rc.1 to go.uber.org/mock v0.6.0
  • Replaced import paths in all test files and generated mocks
  • Fixed gomock.InOrder API change (requires []any instead of []*gomock.Call)
  • Vendored new dependency

Testing

  • Unit tests pass
  • All imports updated correctly
  • No changes to production code (mocks only used in tests)

Jira

https://redhat.atlassian.net/browse/CCO-837

Notes

This PR is independent and does NOT depend on CCO-834 (K8s 1.36 upgrade).

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The module migrates from github.com/golang/mock to go.uber.org/mock, updating generated mocks and test imports. Two tests also receive compatibility changes for an additional expectation and ordered mock calls.

Changes

GoMock migration

Layer / File(s) Summary
Dependency and generated mock wiring
go.mod, pkg/{aws,azure,gcp,ibmcloud}/mock/client_generated.go
Replaces the legacy GoMock dependency with go.uber.org/mock and updates generated mock type references.
Test imports and compatibility updates
pkg/**/*_test.go
Switches test imports to Uber GoMock, adds a GetUniverseDomain() expectation, and changes one ordered-call list to []any.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: approved

Suggested reviewers: jstuever, dlom

🚥 Pre-merge checks | ✅ 14 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: migrating from deprecated golang/mock to go.uber.org/mock.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PASS: The diff only swaps gomock imports and one helper type; no It/Describe/Context/When titles were added or modified, and no dynamic test-name construction changed.
Test Structure And Quality ✅ Passed Touched files are table-driven tests/mocks, not Ginkgo; no It/BeforeEach/Eventually issues were introduced, and the only functional test edit keeps a single purpose with a clear assertion message.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only updates unit tests, mock imports, and vendored gomock, with no MicroShift-unsafe APIs or tags.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the diff only updates gomock imports/vendor code and one unit test helper type, with no multi-node assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed Only gomock dependency/import updates and a test mock helper changed; no deployment manifests, controllers, or scheduling constraints were modified.
Ote Binary Stdout Contract ✅ Passed Modified files are tests/mocks only; no main/TestMain/BeforeSuite/RunSpecs stdout writes were added, and init() blocks only set log levels.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only updates unit tests, mocks, and vendored gomock deps, with no IPv4 or external-network assumptions.
No-Weak-Crypto ✅ Passed Diff only migrates gomock imports/vendor code; no MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret/token comparisons were added.
Container-Privileges ✅ Passed PR only changes Go deps/tests/vendor; no container/K8s manifests were touched, so no privileged/host* settings to flag.
No-Sensitive-Data-In-Logs ✅ Passed Diff only swaps gomock imports and one test slice type; no logging statements or sensitive fields were added or modified.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from dlom and jstuever July 23, 2026 19:59
@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ericahinkleRH
Once this PR has been reviewed and has the lgtm label, please assign jstuever for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.21%. Comparing base (aeca790) to head (8202791).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1069   +/-   ##
=======================================
  Coverage   47.21%   47.21%           
=======================================
  Files          97       97           
  Lines       12650    12650           
=======================================
  Hits         5973     5973           
  Misses       6017     6017           
  Partials      660      660           
Files with missing lines Coverage Δ
pkg/aws/mock/client_generated.go 49.74% <ø> (ø)
pkg/azure/mock/client_generated.go 70.08% <ø> (ø)
pkg/gcp/mock/client_generated.go 83.18% <ø> (ø)
pkg/ibmcloud/mock/client_generated.go 82.35% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ericahinkleRH

Copy link
Copy Markdown
Contributor Author

/retest-required

@ericahinkleRH

Copy link
Copy Markdown
Contributor Author

/test e2e-gcp-manual-oidc

1 similar comment
@ericahinkleRH

Copy link
Copy Markdown
Contributor Author

/test e2e-gcp-manual-oidc

- Migrate from deprecated github.com/golang/mock to go.uber.org/mock
- Update go.mod dependencies
- Update toolchain to Go 1.26.5 for security fixes
- Update google.golang.org/grpc to v1.82.1 for security vulnerabilities
- Regenerate mocks using mockgen v0.5.0

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pkg/azure/actuator_test.go`:
- Line 34: Remove all explicit gomock.Controller.Finish calls from the tests
using gomock.NewController(t), including pkg/azure/actuator_test.go lines
556-557 and 682-702, pkg/cmd/provisioning/gcp/create_service_accounts_test.go
lines 190-191, and pkg/operator/secretannotator/gcp/reconciler_test.go lines
218-219; rely on the controller’s t.Cleanup registration and leave the test
setup and assertions unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8db0c8f5-dd89-4ef0-9df2-7c6f1f688a76

📥 Commits

Reviewing files that changed from the base of the PR and between 3a243dc and 8202791.

⛔ Files ignored due to path filters (11)
  • go.sum is excluded by !**/*.sum
  • vendor/github.com/golang/mock/CONTRIBUTORS is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/mock/AUTHORS is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/mock/LICENSE is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/mock/gomock/call.go is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/mock/gomock/callset.go is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/mock/gomock/controller.go is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/mock/gomock/doc.go is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/mock/gomock/matchers.go is excluded by !**/vendor/**, !vendor/**
  • vendor/go.uber.org/mock/gomock/string.go is excluded by !**/vendor/**, !vendor/**
  • vendor/modules.txt is excluded by !**/vendor/**, !vendor/**
📒 Files selected for processing (28)
  • go.mod
  • pkg/aws/actuator/actuator_test.go
  • pkg/aws/mock/client_generated.go
  • pkg/azure/actuator_test.go
  • pkg/azure/mock/client_generated.go
  • pkg/cmd/provisioning/aws/create-iam-roles_test.go
  • pkg/cmd/provisioning/aws/create_identity_provider_test.go
  • pkg/cmd/provisioning/azure/create_managed_identities_test.go
  • pkg/cmd/provisioning/azure/create_oidc_issuer_test.go
  • pkg/cmd/provisioning/gcp/create_service_accounts_test.go
  • pkg/cmd/provisioning/gcp/create_workload_identity_pool_test.go
  • pkg/cmd/provisioning/gcp/create_workload_identity_provider_test.go
  • pkg/cmd/provisioning/ibmcloud/create_service_id_test.go
  • pkg/cmd/provisioning/ibmcloud/delete_service_id_test.go
  • pkg/cmd/provisioning/ibmcloud/refresh-keys_test.go
  • pkg/gcp/mock/client_generated.go
  • pkg/ibmcloud/mock/client_generated.go
  • pkg/operator/cleanup/cleanup_controller_test.go
  • pkg/operator/credentialsrequest/credentialsrequest_controller_azure_test.go
  • pkg/operator/credentialsrequest/credentialsrequest_controller_gcp_test.go
  • pkg/operator/credentialsrequest/credentialsrequest_controller_test.go
  • pkg/operator/credentialsrequest/credentialsrequest_controller_vsphere_test.go
  • pkg/operator/credentialsrequest/status_test.go
  • pkg/operator/podidentity/podidentitywebhook_controller_test.go
  • pkg/operator/secretannotator/aws/reconciler_test.go
  • pkg/operator/secretannotator/gcp/reconciler_test.go
  • pkg/operator/secretannotator/vsphere/reconciler_test.go
  • pkg/operator/utils/gcp/utils_test.go
🚧 Files skipped from review as they are similar to previous changes (14)
  • pkg/ibmcloud/mock/client_generated.go
  • pkg/operator/podidentity/podidentitywebhook_controller_test.go
  • pkg/operator/credentialsrequest/credentialsrequest_controller_azure_test.go
  • pkg/cmd/provisioning/azure/create_oidc_issuer_test.go
  • pkg/operator/credentialsrequest/credentialsrequest_controller_vsphere_test.go
  • pkg/operator/secretannotator/aws/reconciler_test.go
  • pkg/cmd/provisioning/aws/create_identity_provider_test.go
  • pkg/cmd/provisioning/ibmcloud/refresh-keys_test.go
  • pkg/cmd/provisioning/aws/create-iam-roles_test.go
  • pkg/operator/utils/gcp/utils_test.go
  • pkg/cmd/provisioning/ibmcloud/delete_service_id_test.go
  • pkg/cmd/provisioning/gcp/create_workload_identity_pool_test.go
  • pkg/cmd/provisioning/ibmcloud/create_service_id_test.go
  • pkg/gcp/mock/client_generated.go

log "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

for f in pkg/azure/actuator_test.go pkg/cmd/provisioning/gcp/create_service_accounts_test.go pkg/operator/secretannotator/gcp/reconciler_test.go; do
  echo "===== $f ====="
  nl -ba "$f" | sed -n '1,260p'
  echo
done

Repository: openshift/cloud-credential-operator

Length of output: 252


🌐 Web query:

go.uber.org/mock gomock NewController testing.T auto cleanup Finish idempotent documentation

💡 Result:

In GoMock (including the version at go.uber.org/mock), the gomock.NewController(t) function automatically handles cleanup for you when provided with a *testing.T, starting from Go 1.14 [1][2][3]. Key details regarding this functionality: Automatic Cleanup: When you pass a *testing.T (or any type implementing the Cleanup method) to NewController, the library registers a cleanup function using t.Cleanup [1][2]. This function triggers ctrl.Finish automatically at the end of the test, removing the need to manually call defer ctrl.Finish [1][2][3]. Idempotency and Multiple Calls: The Finish method itself is not inherently idempotent [1][2]. Internally, it uses a flag (ctrl.finished) to track state [1][2]. If Finish is called more than once, it will trigger a fatal error (via T.Fatalf) to notify you of the misuse, unless it is being handled by the automatic cleanup mechanism which manages the state safely [1][2]. Best Practice: Because of the automatic cleanup provided by Go 1.14+, calling ctrl.Finish manually is now considered unnecessary and is often marked as deprecated [4]. You should rely on the automatic invocation handled by the controller via t.Cleanup to ensure test expectations are verified correctly without manual intervention [3].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
files = [
    "pkg/azure/actuator_test.go",
    "pkg/cmd/provisioning/gcp/create_service_accounts_test.go",
    "pkg/operator/secretannotator/gcp/reconciler_test.go",
]
for p in files:
    text = Path(p).read_text()
    for needle in ["NewController(", ".Finish()", "defer ctrl.Finish()", "gomock.NewController("]:
        if needle in text:
            print(f"== {p} : {needle} ==")
            for i, line in enumerate(text.splitlines(), 1):
                if needle in line:
                    print(f"{i}: {line}")
            print()
PY

Repository: openshift/cloud-credential-operator

Length of output: 1265


🌐 Web query:

go.uber.org/mock gomock NewController finish cleanup t.Cleanup documentation

💡 Result:

In Gomock, specifically when using go.uber.org/mock/gomock, you generally do not need to explicitly call ctrl.Finish() if you are using Go 1.14 or later and passing *testing.T (or any testing.TB implementation that supports Cleanup) to gomock.NewController(t) [1][2][3]. When you provide a *testing.T to NewController, the library checks if the provided reporter implements a Cleanup method [1][4]. If it does, gomock registers its internal finish method with t.Cleanup() [1]. This ensures that Finish()—which validates that all expected mock calls occurred—is automatically executed when the test completes, regardless of whether the test passes or fails (or panics) [1][2]. If you are using an older version of Go (pre-1.14) or a test reporter that does not support Cleanup, you must continue to manually call defer ctrl.Finish() to ensure your mock expectations are verified [2][5]. Key points to remember: 1. Automatic Cleanup: Only occurs if t passed to NewController supports Cleanup (added in Go 1.14) [1][2]. 2. Idempotency: ctrl.Finish() is designed to be idempotent; calling it multiple times will not cause issues, as the controller tracks whether it has already finished [1][4]. 3. Best Practice: While automatic cleanup reduces boilerplate, deferring Finish() remains a safe and compatible pattern across all versions of Go and Gomock [2][6].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== go.mod gomock dependency =="
grep -nE 'go\.uber\.org/mock|golang\.org/x' go.mod || true
echo

echo "== Go env module cache =="
go env GOMODCACHE GOPATH GOROOT | sed 's/^/  /'
echo

modcache="$(go env GOMODCACHE)"
echo "== Cached go.uber.org/mock files =="
fd -a 'controller.go' "$modcache" 2>/dev/null | rg 'go\.uber\.org/mock/.*/gomock/controller\.go$' || true

Repository: openshift/cloud-credential-operator

Length of output: 822


🌐 Web query:

site:github.com/go.uber.org/mock gomock/controller.go Finish idempotent t.Cleanup source

💡 Result:

In go.uber.org/mock/gomock, Controller.Finish() is not idempotent and should only be called once. If you pass *testing.T to NewController, it registers a t.Cleanup that calls Finish() automatically after the test and subtests complete, so you usually should not call ctrl.Finish() yourself. (pkg.go.dev)

If you want, I can also point you to the exact controller.go logic in the repo.

Citations:


🌐 Web query:

"go.uber.org/mock/gomock" Finish idempotent Cleanup source controller.go

💡 Result:

The query appears to conflate two distinct concepts in Go development: the gomock library (now maintained as go.uber.org/mock) and Kubernetes controller patterns for idempotent cleanup. 1. gomock and Controller.Finish: In the gomock library (go.uber.org/mock), the Controller.Finish method is used to verify that all expected method calls occurred [1][2]. Historically, it was not idempotent and required explicit calling [2][3]. However, since Go 1.14, if you pass a *testing.T to gomock.NewController(t), the library automatically registers a cleanup function using t.Cleanup to call Finish for you [2][3]. This removes the need for manual invocation in standard tests [3]. 2. Kubernetes Controller Idempotent Cleanup: In the context of Kubernetes controllers (e.g., source-controller.go, often built with controller-runtime), "idempotent cleanup" typically refers to the implementation of Finalizers [4][5]. When a resource is marked for deletion (DeletionTimestamp is non-zero), the controller must perform cleanup tasks (like removing external cloud resources) in an idempotent manner so that the logic can safely run multiple times without side effects [4]. Once the cleanup is confirmed successful, the finalizer is removed from the resource to allow Kubernetes to complete the deletion [4][5]. The phrase "Finish idempotent Cleanup source controller.go" likely combines a search for gomock's Finish mechanism with the common requirement to write idempotent cleanup logic within a Kubernetes source-controller.

Citations:


🌐 Web query:

go.uber.org/mock README Finish defer ctrl.Finish safe double call t.Cleanup

💡 Result:

When using go.uber.org/mock (or the original golang/mock), calling ctrl.Finish() is used to verify that all expectations set on a mock controller have been met [1][2]. For Go 1.14 and later, when you pass a *testing.T (or any testing.TB) to gomock.NewController(t), the library automatically registers a t.Cleanup() function to call ctrl.Finish() [1][3][4]. Because Finish() is designed to be safe to call multiple times, this automatic cleanup eliminates the need for an explicit defer ctrl.Finish() in your test code [1][3][4]. If you call ctrl.Finish() manually and it is also called by t.Cleanup, the implementation handles the double call safely [1][3][4]. While some earlier development efforts in uber-go/mock attempted to mark ctrl.Finish() as deprecated to encourage this automatic behavior, community feedback noted that explicit calls are still necessary for certain specific test frameworks, so the function remains available for use [5][6].

Citations:


🌐 Web query:

go.uber.org/mock v0.6.0 controller.go Finish called multiple times safe idempotent

💡 Result:

The Controller.Finish method in go.uber.org/mock v0.6.0 is not idempotent [1]. If it is called more than once, the library will trigger a failure [2][1]. Specifically, the implementation in controller.go checks the internal finished state; if Finish has already been called, it uses the testing reporter to call t.Fatalf, which aborts the test with the error message: "Controller.Finish was called more than once. It has to be called exactly once." [2] To avoid this, you should rely on the automatic cleanup provided by the library [1]. When you pass a *testing.T (or a compatible TestReporter) into gomock.NewController, the controller registers a cleanup function that automatically invokes Finish when the test and its subtests complete [3][1]. Consequently, explicit calls to Finish are unnecessary in modern Go tests [3][1].

Citations:


🌐 Web query:

site:github.com/uber-go/mock controller.go "finish" "Cleanup" "finished"

💡 Result:

The phrase "Cleanup finished" does not appear to be a standard or recognizable log message associated with controller.go in prominent Go libraries like gomock or Kubernetes controller-runtime. In the context of the uber-go/mock (gomock) library, there is a prominent function named Controller.Finish defined in controller.go [1]. This function is used in testing to verify that all expected mock calls have been satisfied [2][3]. Regarding "Cleanup": - Modern Go (since 1.14) provides t.Cleanup in the testing package, which allows tests to register cleanup functions that run automatically when the test finishes [2]. - In gomock, the Controller.Finish method was marked as deprecated because it is often unnecessary to call manually when t.Cleanup is used to automatically handle cleanup, although it remains available for specific test framework requirements [2][3]. If you are seeing a specific log message "Cleanup finished" in a file named controller.go, it is likely custom logging code within your specific project or a library not standard to common Go infrastructure, rather than a built-in message from standard Go mocking or controller libraries. You should check the source code for that string to identify which logger or function is outputting it.

Citations:


Remove the explicit Finish() calls gomock.NewController(t) already registers cleanup via t.Cleanup, so these extra finalizers can trip Controller.Finish was called more than once in these tests.

  • pkg/azure/actuator_test.go#L556-L557, pkg/azure/actuator_test.go#L682-L702
  • pkg/cmd/provisioning/gcp/create_service_accounts_test.go#L190-L191
  • pkg/operator/secretannotator/gcp/reconciler_test.go#L218-L219
📍 Affects 3 files
  • pkg/azure/actuator_test.go#L34-L34 (this comment)
  • pkg/cmd/provisioning/gcp/create_service_accounts_test.go#L12-L12
  • pkg/operator/secretannotator/gcp/reconciler_test.go#L25-L25
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pkg/azure/actuator_test.go` at line 34, Remove all explicit
gomock.Controller.Finish calls from the tests using gomock.NewController(t),
including pkg/azure/actuator_test.go lines 556-557 and 682-702,
pkg/cmd/provisioning/gcp/create_service_accounts_test.go lines 190-191, and
pkg/operator/secretannotator/gcp/reconciler_test.go lines 218-219; rely on the
controller’s t.Cleanup registration and leave the test setup and assertions
unchanged.

Source: MCP tools

@ericahinkleRH

Copy link
Copy Markdown
Contributor Author

/test security

1 similar comment
@ericahinkleRH

Copy link
Copy Markdown
Contributor Author

/test security

@ericahinkleRH

Copy link
Copy Markdown
Contributor Author

/test e2e-azure-manual-oidc

@ericahinkleRH

Copy link
Copy Markdown
Contributor Author

/test security

@openshift-ci

openshift-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@ericahinkleRH: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/security 8202791 link true /test security

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants