Skip to content

CNTRLPLANE-3034:test/e2e: migrate crd-ca-bundle-injection to OTE serial suite#334

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
wangke19:ote-migrate-crd-ca-bundle-injection
Mar 20, 2026
Merged

CNTRLPLANE-3034:test/e2e: migrate crd-ca-bundle-injection to OTE serial suite#334
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
wangke19:ote-migrate-crd-ca-bundle-injection

Conversation

@wangke19
Copy link
Copy Markdown
Contributor

@wangke19 wangke19 commented Mar 19, 2026

Summary

Migrates the crd-ca-bundle-injection test case to the OTE dual-mode framework, following the same pattern established in #332.

  • Adds testCRDCABundleInjection(testing.TB) and pollForCRDTB to e2e.go with [Operator][Serial] Ginkgo marker
  • Replaces the ~85-line inline body in e2e_test.go with a delegating call + NOTE comment
  • Removes now-dead pollForCRD helper and unused apiext/apiextclient imports from e2e_test.go
  • Wraps the corrupt-and-update step in retry.RetryOnConflict with a fresh Get to avoid 409 conflicts from concurrent reconciliation

No [Disruptive] label needed — no CA rotation is triggered.

Relates to CNTRLPLANE-3000

Add testCRDCABundleInjection(testing.TB) and pollForCRDTB to e2e.go
so the test runs under both the standard `go test` runner and the OTE
Ginkgo suite via [Operator][Serial].

In e2e_test.go, replace the inline test body with a call to the shared
function and remove the now-dead pollForCRD helper and its unused
apiext/apiextclient imports.

The update call is wrapped in retry.RetryOnConflict with a fresh Get
inside the closure to avoid 409 conflicts from concurrent reconciliation.

Relates to CNTRLPLANE-3000
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 19, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4e300b9f-aaac-4e86-91b4-ba609c0ba4d5

📥 Commits

Reviewing files that changed from the base of the PR and between 0a69686 and 55ab9ca.

📒 Files selected for processing (2)
  • test/e2e/e2e.go
  • test/e2e/e2e_test.go

Walkthrough

Added a new CRD CA bundle injection test context to test/e2e/e2e.go with helper functions pollForCRDTB and testCRDCABundleInjection that create a CRD with webhook conversion, verify CA bundle injection, mutate it, and confirm restoration. Refactored the corresponding test in test/e2e/e2e_test.go to use the new test helper instead of inline logic.

Changes

Cohort / File(s) Summary
New CRD CA Bundle Injection Test
test/e2e/e2e.go
Added testCRDCABundleInjection function that creates a webhook-conversion CRD, verifies CA bundle injection via pollForCRDTB polling helper, mutates the bundle to an invalid value, and confirms it is restored to the expected signing CA bundle. Added required CRD client imports for apiextensions types and clientsets.
Test Refactoring
test/e2e/e2e_test.go
Removed inline CRD client construction, helper polling code, and related imports. Updated the crd-ca-bundle-injection subtest to call testCRDCABundleInjection(t) instead of implementing logic directly.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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

@openshift-ci openshift-ci Bot requested review from bertinatto and p0lyn0mial March 19, 2026 16:34
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 19, 2026
@wangke19 wangke19 changed the title test/e2e: migrate crd-ca-bundle-injection to OTE serial suite CNTRLPLANE-3033:test/e2e: migrate crd-ca-bundle-injection to OTE serial suite Mar 19, 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 Mar 19, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Mar 19, 2026

@wangke19: This pull request references CNTRLPLANE-3033 which is a valid jira issue.

Details

In response to this:

Summary

Migrates the crd-ca-bundle-injection test case to the OTE dual-mode framework, following the same pattern established in #332.

  • Adds testCRDCABundleInjection(testing.TB) and pollForCRDTB to e2e.go with [Operator][Serial] Ginkgo marker
  • Replaces the ~85-line inline body in e2e_test.go with a delegating call + NOTE comment
  • Removes now-dead pollForCRD helper and unused apiext/apiextclient imports from e2e_test.go
  • Wraps the corrupt-and-update step in retry.RetryOnConflict with a fresh Get to avoid 409 conflicts from concurrent reconciliation

No [Disruptive] label needed — no CA rotation is triggered.

Relates to CNTRLPLANE-3000

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.

@wangke19
Copy link
Copy Markdown
Contributor Author

/verified by CI

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

@wangke19: This PR has been marked as verified by CI.

Details

In response to this:

/verified by CI

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.

@wangke19 wangke19 changed the title CNTRLPLANE-3033:test/e2e: migrate crd-ca-bundle-injection to OTE serial suite CNTRLPLANE-3034:test/e2e: migrate crd-ca-bundle-injection to OTE serial suite Mar 19, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Mar 19, 2026

@wangke19: This pull request references CNTRLPLANE-3034 which is a valid jira issue.

Details

In response to this:

Summary

Migrates the crd-ca-bundle-injection test case to the OTE dual-mode framework, following the same pattern established in #332.

  • Adds testCRDCABundleInjection(testing.TB) and pollForCRDTB to e2e.go with [Operator][Serial] Ginkgo marker
  • Replaces the ~85-line inline body in e2e_test.go with a delegating call + NOTE comment
  • Removes now-dead pollForCRD helper and unused apiext/apiextclient imports from e2e_test.go
  • Wraps the corrupt-and-update step in retry.RetryOnConflict with a fresh Get to avoid 409 conflicts from concurrent reconciliation

No [Disruptive] label needed — no CA rotation is triggered.

Relates to CNTRLPLANE-3000

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.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Mar 19, 2026

@wangke19: 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.

@zhouying7780
Copy link
Copy Markdown

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 20, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Mar 20, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wangke19, zhouying7780

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

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. 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.

3 participants