Skip to content

CNTRLPLANE-3174: Add unit tests for CPO controller packages#8184

Merged
openshift-merge-bot[bot] merged 3 commits intoopenshift:mainfrom
bryan-cox:improve-ut-coverage
Apr 10, 2026
Merged

CNTRLPLANE-3174: Add unit tests for CPO controller packages#8184
openshift-merge-bot[bot] merged 3 commits intoopenshift:mainfrom
bryan-cox:improve-ut-coverage

Conversation

@bryan-cox
Copy link
Copy Markdown
Member

@bryan-cox bryan-cox commented Apr 8, 2026

What this PR does / why we need it:

Adds behavior-driven unit tests for control-plane-operator controller packages that previously had zero test coverage, and updates codecov.yml to exclude files with no executable code.

Commit 1: codecov exclusions

  • Excludes mock files (**/*_mock.go, **/*mock*.go) from coverage
  • Excludes 18 struct/constant-only files across the repo (no executable code)

Commit 2: Top-level CPO controller tests — 8 files

Package File Tests What's covered
imageprovider imageprovider_test.go 12 GetImage, ImageExist, NewFromImages, GetMissingImages, ComponentImages
cloud config_test.go 5 ProviderConfigKey for AWS/Azure/OpenStack/unknown/empty
cloud/aws providerconfig_test.go 2 AWSKMSCredsSecret name and namespace
cvo reconcile_test.go 11 ResourcesToRemove for IBMCloud/PowerVS vs default platforms
common manifests_test.go 7 PullSecret, DefaultServiceAccount, KubeadminPasswordSecret, volume factory functions
oapi service_test.go 10 ReconcileOpenShiftAPIService, ReconcileOAuthAPIService, ReconcileOLMPackageServerService
mcs reconcile_test.go 8 masterConfigPool, workerConfigPool factory functions
csi/kubevirt kubevirt_test.go 24 getStorageDriverType, storage class reconcilers, daemonset image lookup, CSI driver, volume snapshot classes, RBAC bindings

Commit 3: v2 CPO framework controller tests — 11 files

Package File Tests What's covered
v2/kas/kms aws_test.go 15 NewAWSKMSProvider, GenerateKMSEncryptionConfig, GenerateKMSPodConfig
v2/storage envreplace_test.go 17 setVersions, replaceEnvVars, setOperatorImageReferences (data plane vs control plane image routing)
v2/configoperator deployment_test.go 5 isExternalInfraKubevirt nil-safe credential checks
v2/cvo deployment_test.go 13 preparePayloadScript (manifest filtering, oauth, feature sets), resourcesToRemove
v2/cvo component_test.go 7 isManagementClusterMetricsAccessEnabled (RHOBS/ROSA detection)
v2/etcd etcd_test.go 13 buildEtcdInitContainer, buildEtcdDefragControllerContainer, isManagedETCD, defragControllerPredicate
v2/snapshotcontroller component_test.go 5 isStorageAndCSIManaged platform predicate
v2/clusterpolicy config_test.go 4 adaptConfig TLS/cipher/feature gate configuration
v2/router/util util_test.go 6 UseHCPRouter platform and endpoint access logic
v2/endpoint_resolver component_test.go 4 predicate annotation-based monitoring toggle
v2/ingressoperator component_test.go 6 isIngressCapabilityEnabled capability check

Total: 170 new test cases across 19 files

Testing approach

All tests generated using the behavior-driven-testing Claude Code skill:

  • Gherkin-style test names ("When ..., it should ...")
  • gomega assertions with NewWithT(t)
  • Table-driven tests with t.Parallel() at both levels
  • Fake clients and mock providers for dependency injection
  • Pure function testing where possible

How to verify

make test
make lint

Ref: CNTRLPLANE-3174

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Added many unit tests across hosted control plane areas: cloud providers, KMS/encryption, CSI/KubeVirt, CVO, image/provider logic, manifests/services, ETCD, ingress/router utilities, snapshots, storage, and v2 controllers.
  • Chores

    • Updated coverage rules to exclude generated mock files and select configuration-only source files.

@openshift-ci-robot
Copy link
Copy Markdown

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 8, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

📝 Walkthrough

Walkthrough

This pull request adds many unit tests across the control-plane-operator repository (provider config helpers, manifest constructors, CSI/KubeVirt reconciliation, CVO payloads and removal lists, imageprovider, MCS machine config pools, OpenShift API services, clusterpolicy config adaptation, and multiple v2 components including etcd, ingress, router, snapshotcontroller, endpoint resolver, kms, and storage env replacement). It also updates codecov.yml to exclude generated mock Go files (**/*_mock.go, **/*mock*.go) and a list of specific Go source files that contain only types/structs/constants from coverage.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 8, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@bryan-cox bryan-cox force-pushed the improve-ut-coverage branch from 9368643 to 9351417 Compare April 8, 2026 16:08
@openshift-ci openshift-ci bot added area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/platform/aws PR/issue for AWS (AWSPlatform) platform labels Apr 8, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 8, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox

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

The pull request process is described 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

@openshift-ci openshift-ci bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. area/platform/kubevirt PR/issue for KubeVirt (KubevirtPlatform) platform and removed do-not-merge/needs-area labels Apr 8, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.91%. Comparing base (f0fae9e) to head (de76040).
⚠️ Report is 34 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8184      +/-   ##
==========================================
+ Coverage   32.73%   33.91%   +1.17%     
==========================================
  Files         767      767              
  Lines       92686    93161     +475     
==========================================
+ Hits        30342    31591    +1249     
+ Misses      59761    58940     -821     
- Partials     2583     2630      +47     

see 42 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Exclude mock files and files with no executable code from codecov:
- Mock files: **/*_mock.go, **/*mock*.go
- 18 struct/constant-only files across the repo

Ref: CNTRLPLANE-3174

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bryan-cox bryan-cox force-pushed the improve-ut-coverage branch from abfdc37 to ce1e299 Compare April 8, 2026 16:52
@bryan-cox bryan-cox changed the title test: Add unit tests for CPO controller packages CNTRLPLANE-3174: Add unit tests for CPO controller packages Apr 8, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 8, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 8, 2026

@bryan-cox: This pull request references CNTRLPLANE-3174 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 task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Adds behavior-driven unit tests for control-plane-operator controller packages that previously had zero test coverage, and updates codecov.yml to exclude files with no executable code.

Commit 1: codecov exclusions

  • Excludes mock files (**/*_mock.go, **/*mock*.go) from coverage
  • Excludes 18 struct/constant-only files across the repo (no executable code)

Commit 2: Top-level CPO controller tests — 8 files

Package File Tests What's covered
imageprovider imageprovider_test.go 12 GetImage, ImageExist, NewFromImages, GetMissingImages, ComponentImages
cloud config_test.go 5 ProviderConfigKey for AWS/Azure/OpenStack/unknown/empty
cloud/aws providerconfig_test.go 2 AWSKMSCredsSecret name and namespace
cvo reconcile_test.go 11 ResourcesToRemove for IBMCloud/PowerVS vs default platforms
common manifests_test.go 7 PullSecret, DefaultServiceAccount, KubeadminPasswordSecret, volume factory functions
oapi service_test.go 10 ReconcileOpenShiftAPIService, ReconcileOAuthAPIService, ReconcileOLMPackageServerService
mcs reconcile_test.go 8 masterConfigPool, workerConfigPool factory functions
csi/kubevirt kubevirt_test.go 24 getStorageDriverType, storage class reconcilers, daemonset image lookup, CSI driver, volume snapshot classes, RBAC bindings

Commit 3: v2 CPO framework controller tests — 11 files

Package File Tests What's covered
v2/kas/kms aws_test.go 15 NewAWSKMSProvider, GenerateKMSEncryptionConfig, GenerateKMSPodConfig
v2/storage envreplace_test.go 17 setVersions, replaceEnvVars, setOperatorImageReferences (data plane vs control plane image routing)
v2/configoperator deployment_test.go 5 isExternalInfraKubevirt nil-safe credential checks
v2/cvo deployment_test.go 13 preparePayloadScript (manifest filtering, oauth, feature sets), resourcesToRemove
v2/cvo component_test.go 7 isManagementClusterMetricsAccessEnabled (RHOBS/ROSA detection)
v2/etcd etcd_test.go 13 buildEtcdInitContainer, buildEtcdDefragControllerContainer, isManagedETCD, defragControllerPredicate
v2/snapshotcontroller component_test.go 5 isStorageAndCSIManaged platform predicate
v2/clusterpolicy config_test.go 4 adaptConfig TLS/cipher/feature gate configuration
v2/router/util util_test.go 6 UseHCPRouter platform and endpoint access logic
v2/endpoint_resolver component_test.go 4 predicate annotation-based monitoring toggle
v2/ingressoperator component_test.go 6 isIngressCapabilityEnabled capability check

Total: 170 new test cases across 19 files

Testing approach

All tests generated using the behavior-driven-testing Claude Code skill:

  • Gherkin-style test names ("When ..., it should ...")
  • gomega assertions with NewWithT(t)
  • Table-driven tests with t.Parallel() at both levels
  • Fake clients and mock providers for dependency injection
  • Pure function testing where possible

How to verify

make test
make lint

Ref: CNTRLPLANE-3174

🤖 Generated with Claude Code

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.

@bryan-cox bryan-cox marked this pull request as ready for review April 9, 2026 13:15
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 9, 2026
@openshift-ci openshift-ci bot requested review from cblecker and enxebre April 9, 2026 13:15
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 9, 2026

@bryan-cox: This pull request references CNTRLPLANE-3174 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 task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Adds behavior-driven unit tests for control-plane-operator controller packages that previously had zero test coverage, and updates codecov.yml to exclude files with no executable code.

Commit 1: codecov exclusions

  • Excludes mock files (**/*_mock.go, **/*mock*.go) from coverage
  • Excludes 18 struct/constant-only files across the repo (no executable code)

Commit 2: Top-level CPO controller tests — 8 files

Package File Tests What's covered
imageprovider imageprovider_test.go 12 GetImage, ImageExist, NewFromImages, GetMissingImages, ComponentImages
cloud config_test.go 5 ProviderConfigKey for AWS/Azure/OpenStack/unknown/empty
cloud/aws providerconfig_test.go 2 AWSKMSCredsSecret name and namespace
cvo reconcile_test.go 11 ResourcesToRemove for IBMCloud/PowerVS vs default platforms
common manifests_test.go 7 PullSecret, DefaultServiceAccount, KubeadminPasswordSecret, volume factory functions
oapi service_test.go 10 ReconcileOpenShiftAPIService, ReconcileOAuthAPIService, ReconcileOLMPackageServerService
mcs reconcile_test.go 8 masterConfigPool, workerConfigPool factory functions
csi/kubevirt kubevirt_test.go 24 getStorageDriverType, storage class reconcilers, daemonset image lookup, CSI driver, volume snapshot classes, RBAC bindings

Commit 3: v2 CPO framework controller tests — 11 files

Package File Tests What's covered
v2/kas/kms aws_test.go 15 NewAWSKMSProvider, GenerateKMSEncryptionConfig, GenerateKMSPodConfig
v2/storage envreplace_test.go 17 setVersions, replaceEnvVars, setOperatorImageReferences (data plane vs control plane image routing)
v2/configoperator deployment_test.go 5 isExternalInfraKubevirt nil-safe credential checks
v2/cvo deployment_test.go 13 preparePayloadScript (manifest filtering, oauth, feature sets), resourcesToRemove
v2/cvo component_test.go 7 isManagementClusterMetricsAccessEnabled (RHOBS/ROSA detection)
v2/etcd etcd_test.go 13 buildEtcdInitContainer, buildEtcdDefragControllerContainer, isManagedETCD, defragControllerPredicate
v2/snapshotcontroller component_test.go 5 isStorageAndCSIManaged platform predicate
v2/clusterpolicy config_test.go 4 adaptConfig TLS/cipher/feature gate configuration
v2/router/util util_test.go 6 UseHCPRouter platform and endpoint access logic
v2/endpoint_resolver component_test.go 4 predicate annotation-based monitoring toggle
v2/ingressoperator component_test.go 6 isIngressCapabilityEnabled capability check

Total: 170 new test cases across 19 files

Testing approach

All tests generated using the behavior-driven-testing Claude Code skill:

  • Gherkin-style test names ("When ..., it should ...")
  • gomega assertions with NewWithT(t)
  • Table-driven tests with t.Parallel() at both levels
  • Fake clients and mock providers for dependency injection
  • Pure function testing where possible

How to verify

make test
make lint

Ref: CNTRLPLANE-3174

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Tests

  • Added comprehensive unit test coverage across control plane operator components, including AWS KMS encryption, KubeVirt CSI, cluster version operator, ETCD management, and network routing utilities.

  • Expanded test coverage for cloud provider configuration, image providers, storage operations, and configuration management.

  • Chores

  • Updated code coverage configuration to exclude generated mock files and configuration-only modules.

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
control-plane-operator/controllers/hostedcontrolplane/v2/router/util/util_test.go (1)

14-16: Avoid parallel execution in tests that share env-sensitive behavior.

UseHCPRouter is influenced by MANAGED_SERVICE (Line 120), so keeping TestUseHCPRouter parallel (Line 15, Line 73) makes this file more brittle to future case additions and refactors.

♻️ Suggested change
 func TestUseHCPRouter(t *testing.T) {
-	t.Parallel()
-
 	tests := []struct {
 		name     string
 		hcp      *hyperv1.HostedControlPlane
 		expected bool
 	}{
@@
 	for _, tc := range tests {
 		t.Run(tc.name, func(t *testing.T) {
-			t.Parallel()
 			g := NewWithT(t)
 			g.Expect(UseHCPRouter(tc.hcp)).To(Equal(tc.expected))
 		})
 	}
 }

As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."

Also applies to: 72-74, 118-123

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@control-plane-operator/controllers/hostedcontrolplane/v2/router/util/util_test.go`
around lines 14 - 16, TestUseHCPRouter should not run in parallel because
UseHCPRouter's behavior depends on the MANAGED_SERVICE environment variable;
remove the t.Parallel() call (or otherwise disable parallelization) from
TestUseHCPRouter so the test runs serially and cannot race with other
env-sensitive tests, and also remove or avoid t.Parallel() in any other tests in
this file that exercise UseHCPRouter or read MANAGED_SERVICE (e.g., the tests
around lines referenced) to ensure deterministic environment-dependent behavior.
control-plane-operator/controllers/hostedcontrolplane/cvo/reconcile_test.go (1)

18-22: Replace string-switched assertions with per-case validators.

Dispatching assertions by tc.name is fragile; a renamed case can silently skip validation. You already have a validate field—use it to keep assertions strongly bound to each case.

♻️ Suggested structure
 tests := []struct {
 	name     string
 	platform hyperv1.PlatformType
-	validate func(g Gomega, resources []interface{ GetName() string })
+	validate func(g Gomega, resources []client.Object)
 }{
 	{
 		name:     "When platform is IBMCloud, it should return 4 resources",
 		platform: hyperv1.IBMCloudPlatform,
+		validate: func(g Gomega, resources []client.Object) {
+			g.Expect(resources).To(HaveLen(4))
+		},
 	},
 	// ...other cases with inline validate funcs...
 }

 for _, tc := range tests {
 	t.Run(tc.name, func(t *testing.T) {
 		t.Parallel()
 		g := NewWithT(t)
 		resources := ResourcesToRemove(tc.platform)
-		switch tc.name {
-		// ...
-		}
+		tc.validate(g, resources)
 	})
 }

As per coding guidelines, "Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."

Also applies to: 76-172

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@control-plane-operator/controllers/hostedcontrolplane/cvo/reconcile_test.go`
around lines 18 - 22, The table-driven test currently dispatches assertions by
switching on tc.name which is brittle; instead, use the existing validate field
per test case: populate each test case's validate func (signature validate
func(g Gomega, resources []interface{ GetName() string })) with the assertions
specific to that case, then in the test loop call tc.validate(g, resources)
rather than branching on tc.name; update all cases (including those covered in
lines ~76-172) to assign concrete validators and remove the switch-on-name logic
so each case's assertions are strongly bound to the test case definition.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@control-plane-operator/controllers/hostedcontrolplane/cvo/reconcile_test.go`:
- Around line 18-22: The table-driven test currently dispatches assertions by
switching on tc.name which is brittle; instead, use the existing validate field
per test case: populate each test case's validate func (signature validate
func(g Gomega, resources []interface{ GetName() string })) with the assertions
specific to that case, then in the test loop call tc.validate(g, resources)
rather than branching on tc.name; update all cases (including those covered in
lines ~76-172) to assign concrete validators and remove the switch-on-name logic
so each case's assertions are strongly bound to the test case definition.

In
`@control-plane-operator/controllers/hostedcontrolplane/v2/router/util/util_test.go`:
- Around line 14-16: TestUseHCPRouter should not run in parallel because
UseHCPRouter's behavior depends on the MANAGED_SERVICE environment variable;
remove the t.Parallel() call (or otherwise disable parallelization) from
TestUseHCPRouter so the test runs serially and cannot race with other
env-sensitive tests, and also remove or avoid t.Parallel() in any other tests in
this file that exercise UseHCPRouter or read MANAGED_SERVICE (e.g., the tests
around lines referenced) to ensure deterministic environment-dependent behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 01d04e67-31e0-44d7-acb2-a3f900a650e8

📥 Commits

Reviewing files that changed from the base of the PR and between c674483 and ce1e299.

📒 Files selected for processing (20)
  • codecov.yml
  • control-plane-operator/controllers/hostedcontrolplane/cloud/aws/providerconfig_test.go
  • control-plane-operator/controllers/hostedcontrolplane/cloud/config_test.go
  • control-plane-operator/controllers/hostedcontrolplane/common/manifests_test.go
  • control-plane-operator/controllers/hostedcontrolplane/csi/kubevirt/kubevirt_test.go
  • control-plane-operator/controllers/hostedcontrolplane/cvo/reconcile_test.go
  • control-plane-operator/controllers/hostedcontrolplane/imageprovider/imageprovider_test.go
  • control-plane-operator/controllers/hostedcontrolplane/mcs/reconcile_test.go
  • control-plane-operator/controllers/hostedcontrolplane/oapi/service_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/clusterpolicy/config_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/configoperator/deployment_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/cvo/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/cvo/deployment_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/endpoint_resolver/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/etcd/etcd_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/ingressoperator/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/kms/aws_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/router/util/util_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/snapshotcontroller/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/storage/envreplace_test.go

@bryan-cox
Copy link
Copy Markdown
Member Author

/verified by ut

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Apr 9, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@bryan-cox: This PR has been marked as verified by ut.

Details

In response to this:

/verified by ut

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.

@enxebre
Copy link
Copy Markdown
Member

enxebre commented Apr 10, 2026

/lgtm

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws

@enxebre
Copy link
Copy Markdown
Member

enxebre commented Apr 10, 2026

/hold
this switch case for naming pattern is pretty fragile https://github.com/openshift/hypershift/pull/8184/changes#diff-bdfac7e57c90bec9f4bb4ab82f791390201cc0f986c3058127ceea65d08d4808R24, let's have a validate func field for testCase or similar

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 10, 2026
Add behavior-driven unit tests for top-level control-plane-operator
controller packages:
- imageprovider: GetImage, ImageExist, NewFromImages, GetMissingImages,
  ComponentImages
- cloud: ProviderConfigKey for AWS/Azure/OpenStack/unknown/empty
- cloud/aws: AWSKMSCredsSecret name and namespace
- cvo: ResourcesToRemove for IBMCloud/PowerVS vs default platforms
- common: PullSecret, DefaultServiceAccount, KubeadminPasswordSecret,
  volume factory functions
- oapi: ReconcileOpenShiftAPIService, ReconcileOAuthAPIService,
  ReconcileOLMPackageServerService
- mcs: masterConfigPool, workerConfigPool factory functions
- csi/kubevirt: getStorageDriverType, storage class reconcilers,
  daemonset image lookup, CSI driver, volume snapshot classes, RBAC

All tests use Gherkin-style naming, gomega assertions, table-driven
patterns, and parallel execution.

Ref: CNTRLPLANE-3174

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bryan-cox bryan-cox force-pushed the improve-ut-coverage branch from ce1e299 to 508c853 Compare April 10, 2026 10:26
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Apr 10, 2026
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 10, 2026
@bryan-cox
Copy link
Copy Markdown
Member Author

Good catch — replaced the switch tc.name pattern with a validate func(g Gomega, resources []client.Object) field on each test case. Each case now carries its own inline validation logic, so renaming a test case can't silently break assertions.

Updated in the latest push.

@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 10, 2026

@bryan-cox: This pull request references CNTRLPLANE-3174 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 task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Adds behavior-driven unit tests for control-plane-operator controller packages that previously had zero test coverage, and updates codecov.yml to exclude files with no executable code.

Commit 1: codecov exclusions

  • Excludes mock files (**/*_mock.go, **/*mock*.go) from coverage
  • Excludes 18 struct/constant-only files across the repo (no executable code)

Commit 2: Top-level CPO controller tests — 8 files

Package File Tests What's covered
imageprovider imageprovider_test.go 12 GetImage, ImageExist, NewFromImages, GetMissingImages, ComponentImages
cloud config_test.go 5 ProviderConfigKey for AWS/Azure/OpenStack/unknown/empty
cloud/aws providerconfig_test.go 2 AWSKMSCredsSecret name and namespace
cvo reconcile_test.go 11 ResourcesToRemove for IBMCloud/PowerVS vs default platforms
common manifests_test.go 7 PullSecret, DefaultServiceAccount, KubeadminPasswordSecret, volume factory functions
oapi service_test.go 10 ReconcileOpenShiftAPIService, ReconcileOAuthAPIService, ReconcileOLMPackageServerService
mcs reconcile_test.go 8 masterConfigPool, workerConfigPool factory functions
csi/kubevirt kubevirt_test.go 24 getStorageDriverType, storage class reconcilers, daemonset image lookup, CSI driver, volume snapshot classes, RBAC bindings

Commit 3: v2 CPO framework controller tests — 11 files

Package File Tests What's covered
v2/kas/kms aws_test.go 15 NewAWSKMSProvider, GenerateKMSEncryptionConfig, GenerateKMSPodConfig
v2/storage envreplace_test.go 17 setVersions, replaceEnvVars, setOperatorImageReferences (data plane vs control plane image routing)
v2/configoperator deployment_test.go 5 isExternalInfraKubevirt nil-safe credential checks
v2/cvo deployment_test.go 13 preparePayloadScript (manifest filtering, oauth, feature sets), resourcesToRemove
v2/cvo component_test.go 7 isManagementClusterMetricsAccessEnabled (RHOBS/ROSA detection)
v2/etcd etcd_test.go 13 buildEtcdInitContainer, buildEtcdDefragControllerContainer, isManagedETCD, defragControllerPredicate
v2/snapshotcontroller component_test.go 5 isStorageAndCSIManaged platform predicate
v2/clusterpolicy config_test.go 4 adaptConfig TLS/cipher/feature gate configuration
v2/router/util util_test.go 6 UseHCPRouter platform and endpoint access logic
v2/endpoint_resolver component_test.go 4 predicate annotation-based monitoring toggle
v2/ingressoperator component_test.go 6 isIngressCapabilityEnabled capability check

Total: 170 new test cases across 19 files

Testing approach

All tests generated using the behavior-driven-testing Claude Code skill:

  • Gherkin-style test names ("When ..., it should ...")
  • gomega assertions with NewWithT(t)
  • Table-driven tests with t.Parallel() at both levels
  • Fake clients and mock providers for dependency injection
  • Pure function testing where possible

How to verify

make test
make lint

Ref: CNTRLPLANE-3174

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

  • Added extensive unit tests across hosted control plane components: cloud providers, KMS/encryption, CSI/KubeVirt, CVO, image/provider logic, manifests and service reconciliation, ETCD, ingress/router utilities, snapshots, storage, and various v2 controllers.

  • Chores

  • Updated coverage configuration to ignore generated mock files and select configuration-only source files.

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
control-plane-operator/controllers/hostedcontrolplane/v2/storage/envreplace_test.go (1)

61-63: Rebind tc in parallel subtests for clarity and portability.

Lines 61, 134, and 254 use the pattern for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { t.Parallel(). While this is safe with Go 1.25.3 (the repository's version), explicitly rebinding tc at the loop level clarifies intent and protects against future go.mod edits.

Suggested patch
 	for _, tc := range testCases {
+		tc := tc
 		t.Run(tc.name, func(t *testing.T) {
 			t.Parallel()

Also applies to: 134–136, 254–256

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@control-plane-operator/controllers/hostedcontrolplane/v2/storage/envreplace_test.go`
around lines 61 - 63, The loop variable tc in the table-driven tests over
testCases should be explicitly rebound to avoid capture issues in the parallel
subtests; inside each loop before calling t.Run (where the closure calls
t.Parallel()), add a short rebind like tc := tc so the closure captures the
loop-local copy. Update each occurrence that follows the pattern for _, tc :=
range testCases { t.Run(tc.name, func(t *testing.T) { t.Parallel() ... }) —
specifically the blocks referencing testCases and t.Run — to include the rebind
immediately prior to t.Run.
control-plane-operator/controllers/hostedcontrolplane/v2/cvo/deployment_test.go (1)

194-199: Consider using namespace-qualified resource keys in assertions.

extractResourceNames loses namespace/kind, which can make tests pass incorrectly if duplicate names are introduced later. Prefer keys like namespace/name (and optionally kind) for stronger assertions.

As per coding guidelines, "**: -Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@control-plane-operator/controllers/hostedcontrolplane/v2/cvo/deployment_test.go`
around lines 194 - 199, The helper extractResourceNames currently returns only
object names which can collide across namespaces; change extractResourceNames to
produce namespace-qualified keys (e.g., obj.GetNamespace()+"/"+obj.GetName())
and update any assertions that consume it to compare against "namespace/name"
strings (optionally include kind if tests need stronger uniqueness). Locate and
modify the extractResourceNames function and the tests that call it to assert
the new namespace-qualified keys instead of plain names.
control-plane-operator/controllers/hostedcontrolplane/v2/router/util/util_test.go (1)

14-16: Optional: explicitly set MANAGED_SERVICE env var in TestUseHCPRouter for clarity

While the suggested fix is good practice for self-contained tests, the claimed risk of nondeterminism is overstated. Go's test runner executes top-level test functions sequentially—only subtests marked with t.Parallel() run concurrently with other subtests from the same parent. TestUseHCPRouter and TestUseHCPRouterAroHCP do not interleave. Additionally, TestUseHCPRouterAroHCP intentionally avoids parallelism (as documented in lines 80–82) and scopes t.Setenv() to individual subtests, preventing env var leakage.

The suggestion to explicitly set MANAGED_SERVICE in TestUseHCPRouter remains valid for clarity and test isolation, but it is not required to fix an actual correctness issue.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@control-plane-operator/controllers/hostedcontrolplane/v2/router/util/util_test.go`
around lines 14 - 16, The test TestUseHCPRouter should explicitly set the
MANAGED_SERVICE environment variable to a deterministic value to make the test
self-contained and clear: inside TestUseHCPRouter, call
t.Setenv("MANAGED_SERVICE", "<appropriate-value>") (using the same sentinel
value convention as other tests) before invoking the code under test; this
mirrors the scoping used in TestUseHCPRouterAroHCP and prevents any ambiguity
about environment assumptions when locating the logic tied to TestUseHCPRouter.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@control-plane-operator/controllers/hostedcontrolplane/v2/cvo/component_test.go`:
- Around line 124-126: The test currently only calls
t.Setenv(rhobsmonitoring.EnvironmentVariable, tc.rhobsEnvValue) when
tc.rhobsEnvValue != "", which lets ambient process env leak into cases expecting
an unset value; change the test so every subtest unconditionally calls
t.Setenv(rhobsmonitoring.EnvironmentVariable, tc.rhobsEnvValue) (so an empty
string will clear the variable for that subtest) — update the code around the
rhobsmonitoring.EnvironmentVariable usage in the component_test.go test helper
where tc.rhobsEnvValue is handled.

---

Nitpick comments:
In
`@control-plane-operator/controllers/hostedcontrolplane/v2/cvo/deployment_test.go`:
- Around line 194-199: The helper extractResourceNames currently returns only
object names which can collide across namespaces; change extractResourceNames to
produce namespace-qualified keys (e.g., obj.GetNamespace()+"/"+obj.GetName())
and update any assertions that consume it to compare against "namespace/name"
strings (optionally include kind if tests need stronger uniqueness). Locate and
modify the extractResourceNames function and the tests that call it to assert
the new namespace-qualified keys instead of plain names.

In
`@control-plane-operator/controllers/hostedcontrolplane/v2/router/util/util_test.go`:
- Around line 14-16: The test TestUseHCPRouter should explicitly set the
MANAGED_SERVICE environment variable to a deterministic value to make the test
self-contained and clear: inside TestUseHCPRouter, call
t.Setenv("MANAGED_SERVICE", "<appropriate-value>") (using the same sentinel
value convention as other tests) before invoking the code under test; this
mirrors the scoping used in TestUseHCPRouterAroHCP and prevents any ambiguity
about environment assumptions when locating the logic tied to TestUseHCPRouter.

In
`@control-plane-operator/controllers/hostedcontrolplane/v2/storage/envreplace_test.go`:
- Around line 61-63: The loop variable tc in the table-driven tests over
testCases should be explicitly rebound to avoid capture issues in the parallel
subtests; inside each loop before calling t.Run (where the closure calls
t.Parallel()), add a short rebind like tc := tc so the closure captures the
loop-local copy. Update each occurrence that follows the pattern for _, tc :=
range testCases { t.Run(tc.name, func(t *testing.T) { t.Parallel() ... }) —
specifically the blocks referencing testCases and t.Run — to include the rebind
immediately prior to t.Run.
🪄 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 YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: c59c7c35-bc25-4914-bb37-bce50adfe947

📥 Commits

Reviewing files that changed from the base of the PR and between ce1e299 and 508c853.

📒 Files selected for processing (19)
  • control-plane-operator/controllers/hostedcontrolplane/cloud/aws/providerconfig_test.go
  • control-plane-operator/controllers/hostedcontrolplane/cloud/config_test.go
  • control-plane-operator/controllers/hostedcontrolplane/common/manifests_test.go
  • control-plane-operator/controllers/hostedcontrolplane/csi/kubevirt/kubevirt_test.go
  • control-plane-operator/controllers/hostedcontrolplane/cvo/reconcile_test.go
  • control-plane-operator/controllers/hostedcontrolplane/imageprovider/imageprovider_test.go
  • control-plane-operator/controllers/hostedcontrolplane/mcs/reconcile_test.go
  • control-plane-operator/controllers/hostedcontrolplane/oapi/service_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/clusterpolicy/config_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/configoperator/deployment_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/cvo/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/cvo/deployment_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/endpoint_resolver/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/etcd/etcd_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/ingressoperator/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/kms/aws_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/router/util/util_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/snapshotcontroller/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/storage/envreplace_test.go
✅ Files skipped from review due to trivial changes (8)
  • control-plane-operator/controllers/hostedcontrolplane/imageprovider/imageprovider_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/configoperator/deployment_test.go
  • control-plane-operator/controllers/hostedcontrolplane/common/manifests_test.go
  • control-plane-operator/controllers/hostedcontrolplane/oapi/service_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/clusterpolicy/config_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/kms/aws_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/etcd/etcd_test.go
  • control-plane-operator/controllers/hostedcontrolplane/csi/kubevirt/kubevirt_test.go
🚧 Files skipped from review as they are similar to previous changes (6)
  • control-plane-operator/controllers/hostedcontrolplane/cloud/aws/providerconfig_test.go
  • control-plane-operator/controllers/hostedcontrolplane/cloud/config_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/snapshotcontroller/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/ingressoperator/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/endpoint_resolver/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/cvo/reconcile_test.go

Comment thread control-plane-operator/controllers/hostedcontrolplane/v2/cvo/component_test.go Outdated
Add behavior-driven unit tests for v2 control-plane-operator
controller packages using the CPO component framework:
- v2/kas/kms: NewAWSKMSProvider, GenerateKMSEncryptionConfig,
  GenerateKMSPodConfig
- v2/storage: setVersions, replaceEnvVars, setOperatorImageReferences
  (data plane vs control plane image routing)
- v2/configoperator: isExternalInfraKubevirt credential checks
- v2/cvo: preparePayloadScript, resourcesToRemove,
  isManagementClusterMetricsAccessEnabled (RHOBS/ROSA detection)
- v2/etcd: buildEtcdInitContainer, buildEtcdDefragControllerContainer,
  isManagedETCD, defragControllerPredicate
- v2/snapshotcontroller: isStorageAndCSIManaged platform predicate
- v2/clusterpolicy: adaptConfig TLS/cipher/feature gate configuration
- v2/router/util: UseHCPRouter platform and endpoint access logic
- v2/endpoint_resolver: predicate annotation-based monitoring toggle
- v2/ingressoperator: isIngressCapabilityEnabled capability check

All tests use Gherkin-style naming, gomega assertions, table-driven
patterns, and parallel execution where compatible.

Ref: CNTRLPLANE-3174

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bryan-cox bryan-cox force-pushed the improve-ut-coverage branch from 508c853 to de76040 Compare April 10, 2026 10:33
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Apr 10, 2026

@bryan-cox: This pull request references CNTRLPLANE-3174 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 task to target the "4.22.0" version, but no target version was set.

Details

In response to this:

What this PR does / why we need it:

Adds behavior-driven unit tests for control-plane-operator controller packages that previously had zero test coverage, and updates codecov.yml to exclude files with no executable code.

Commit 1: codecov exclusions

  • Excludes mock files (**/*_mock.go, **/*mock*.go) from coverage
  • Excludes 18 struct/constant-only files across the repo (no executable code)

Commit 2: Top-level CPO controller tests — 8 files

Package File Tests What's covered
imageprovider imageprovider_test.go 12 GetImage, ImageExist, NewFromImages, GetMissingImages, ComponentImages
cloud config_test.go 5 ProviderConfigKey for AWS/Azure/OpenStack/unknown/empty
cloud/aws providerconfig_test.go 2 AWSKMSCredsSecret name and namespace
cvo reconcile_test.go 11 ResourcesToRemove for IBMCloud/PowerVS vs default platforms
common manifests_test.go 7 PullSecret, DefaultServiceAccount, KubeadminPasswordSecret, volume factory functions
oapi service_test.go 10 ReconcileOpenShiftAPIService, ReconcileOAuthAPIService, ReconcileOLMPackageServerService
mcs reconcile_test.go 8 masterConfigPool, workerConfigPool factory functions
csi/kubevirt kubevirt_test.go 24 getStorageDriverType, storage class reconcilers, daemonset image lookup, CSI driver, volume snapshot classes, RBAC bindings

Commit 3: v2 CPO framework controller tests — 11 files

Package File Tests What's covered
v2/kas/kms aws_test.go 15 NewAWSKMSProvider, GenerateKMSEncryptionConfig, GenerateKMSPodConfig
v2/storage envreplace_test.go 17 setVersions, replaceEnvVars, setOperatorImageReferences (data plane vs control plane image routing)
v2/configoperator deployment_test.go 5 isExternalInfraKubevirt nil-safe credential checks
v2/cvo deployment_test.go 13 preparePayloadScript (manifest filtering, oauth, feature sets), resourcesToRemove
v2/cvo component_test.go 7 isManagementClusterMetricsAccessEnabled (RHOBS/ROSA detection)
v2/etcd etcd_test.go 13 buildEtcdInitContainer, buildEtcdDefragControllerContainer, isManagedETCD, defragControllerPredicate
v2/snapshotcontroller component_test.go 5 isStorageAndCSIManaged platform predicate
v2/clusterpolicy config_test.go 4 adaptConfig TLS/cipher/feature gate configuration
v2/router/util util_test.go 6 UseHCPRouter platform and endpoint access logic
v2/endpoint_resolver component_test.go 4 predicate annotation-based monitoring toggle
v2/ingressoperator component_test.go 6 isIngressCapabilityEnabled capability check

Total: 170 new test cases across 19 files

Testing approach

All tests generated using the behavior-driven-testing Claude Code skill:

  • Gherkin-style test names ("When ..., it should ...")
  • gomega assertions with NewWithT(t)
  • Table-driven tests with t.Parallel() at both levels
  • Fake clients and mock providers for dependency injection
  • Pure function testing where possible

How to verify

make test
make lint

Ref: CNTRLPLANE-3174

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

  • Added many unit tests across hosted control plane areas: cloud providers, KMS/encryption, CSI/KubeVirt, CVO, image/provider logic, manifests/services, ETCD, ingress/router utilities, snapshots, storage, and v2 controllers.

  • Chores

  • Updated coverage rules to exclude generated mock files and select configuration-only source files.

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
control-plane-operator/controllers/hostedcontrolplane/v2/cvo/deployment_test.go (1)

31-33: Tighten the negative matcher to the removal command

Line 32 currently asserts the filename is absent anywhere in the script, which is broader than the behavior under test. Matching the full rm -f ... command (like Line 41) will reduce false failures from unrelated occurrences of the filename.

Suggested patch
-				g.Expect(script).NotTo(ContainSubstring("0000_50_console-operator_01-oauth.yaml"))
+				g.Expect(script).NotTo(ContainSubstring("rm -f /var/payload/release-manifests/0000_50_console-operator_01-oauth.yaml"))

As per coding guidelines, Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@control-plane-operator/controllers/hostedcontrolplane/v2/cvo/deployment_test.go`
around lines 31 - 33, The test's assertions lambda currently checks only that
"0000_50_console-operator_01-oauth.yaml" is absent, which is too broad; update
the negative matcher inside the assertions func (the anonymous assertions
function that takes g Gomega and script string) to assert the full removal
command is absent instead (e.g., match the exact "rm -f
0000_50_console-operator_01-oauth.yaml" string used elsewhere in the diff) so
the test only fails if the actual rm command is present and not for unrelated
occurrences of the filename.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@control-plane-operator/controllers/hostedcontrolplane/v2/cvo/deployment_test.go`:
- Around line 31-33: The test's assertions lambda currently checks only that
"0000_50_console-operator_01-oauth.yaml" is absent, which is too broad; update
the negative matcher inside the assertions func (the anonymous assertions
function that takes g Gomega and script string) to assert the full removal
command is absent instead (e.g., match the exact "rm -f
0000_50_console-operator_01-oauth.yaml" string used elsewhere in the diff) so
the test only fails if the actual rm command is present and not for unrelated
occurrences of the filename.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 253aedb2-2cfe-4353-a39b-0b24955d852b

📥 Commits

Reviewing files that changed from the base of the PR and between 508c853 and de76040.

📒 Files selected for processing (11)
  • control-plane-operator/controllers/hostedcontrolplane/v2/clusterpolicy/config_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/configoperator/deployment_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/cvo/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/cvo/deployment_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/endpoint_resolver/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/etcd/etcd_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/ingressoperator/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/kms/aws_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/router/util/util_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/snapshotcontroller/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/storage/envreplace_test.go
✅ Files skipped from review due to trivial changes (3)
  • control-plane-operator/controllers/hostedcontrolplane/v2/cvo/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/router/util/util_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/kas/kms/aws_test.go
🚧 Files skipped from review as they are similar to previous changes (4)
  • control-plane-operator/controllers/hostedcontrolplane/v2/snapshotcontroller/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/endpoint_resolver/component_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/configoperator/deployment_test.go
  • control-plane-operator/controllers/hostedcontrolplane/v2/ingressoperator/component_test.go

@enxebre
Copy link
Copy Markdown
Member

enxebre commented Apr 10, 2026

/lgtm

@bryan-cox
Copy link
Copy Markdown
Member Author

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 10, 2026
@enxebre
Copy link
Copy Markdown
Member

enxebre commented Apr 10, 2026

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 10, 2026
@openshift-merge-bot
Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aks
/test e2e-aws
/test e2e-aws-upgrade-hypershift-operator
/test e2e-azure-self-managed
/test e2e-kubevirt-aws-ovn-reduced
/test e2e-v2-aws

@bryan-cox
Copy link
Copy Markdown
Member Author

/verified ut

@openshift-ci-robot
Copy link
Copy Markdown

@bryan-cox: The /verified command must be used with one of the following actions: by, later, remove, or bypass. See https://docs.ci.openshift.org/docs/architecture/jira/#premerge-verification for more information.

Details

In response to this:

/verified ut

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.

@bryan-cox
Copy link
Copy Markdown
Member Author

/verified by ut

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Apr 10, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@bryan-cox: This PR has been marked as verified by ut.

Details

In response to this:

/verified by ut

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.

@cwbotbot
Copy link
Copy Markdown

cwbotbot commented Apr 10, 2026

Test Results

e2e-aks

e2e-aws

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD 08b7a93 and 2 for PR HEAD de76040 in total

@openshift-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD eb064c3 and 1 for PR HEAD de76040 in total

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Apr 10, 2026

@bryan-cox: all tests passed!

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.

@openshift-merge-bot openshift-merge-bot bot merged commit f8e70c5 into openshift:main Apr 10, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/platform/aws PR/issue for AWS (AWSPlatform) platform area/platform/kubevirt PR/issue for KubeVirt (KubevirtPlatform) platform jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants