CNTRLPLANE-2589: test/library/encryption: Accept testing.TB for OTE compatibility#2335
CNTRLPLANE-2589: test/library/encryption: Accept testing.TB for OTE compatibility#2335ropatil010 wants to merge 1 commit into
Conversation
Change TestPerfEncryption and runTestEncryption to accept testing.TB interface instead of *testing.T concrete type. This enables these functions to be used with both standard Go tests and Ginkgo/OTE framework tests. The testing.TB interface is implemented by both *testing.T and *testing.B, as well as Ginkgo's GinkgoTB. This change is 100% backwards compatible - all existing callers passing *testing.T will continue to work. This eliminates the need for downstream operators to duplicate these functions when migrating to the OpenShift Tests Extension (OTE) framework. Currently, operators must copy ~400+ lines of code from library-go just to change *testing.T to testing.TB. Benefits: - Enables OTE framework migration across OpenShift operators - Reduces code duplication in downstream repos - Maintains full backwards compatibility - No behavior changes, only signature widening Related: openshift/cluster-authentication-operator#926 Co-Authored-By: Rohit Patil <ropatil@redhat.com>
|
@ropatil010: This pull request references CNTRLPLANE-2589 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 epic to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
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. |
Walkthrough
ChangesEncryption performance test helpers
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 14 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@ropatil010: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/assign @p0lyn0mial @bertinatto |
|
/lgtm You'll need someone from OWNERS to approve, but this lgtm. *T implements TB. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ropatil010, stbenjam The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/assign @deads2k |
Change TestPerfEncryption and runTestEncryption to accept testing.TB interface instead of *testing.T concrete type. This enables these functions to be used with both standard Go tests and Ginkgo/OTE framework tests.
The testing.TB interface is implemented by both *testing.T and *testing.B, as well as Ginkgo's GinkgoTB. This change is 100% backwards compatible - all existing callers passing *testing.T will continue to work.
This eliminates the need for downstream operators to duplicate these functions when migrating to the OpenShift Tests Extension (OTE) framework. Currently, operators must copy ~400+ lines of code from library-go just to change *testing.T to testing.TB.
Benefits:
Related: openshift/cluster-authentication-operator#926
Discussion: https://redhat-internal.slack.com/archives/C07RDCVEYJG/p1782475409270789
For PR: openshift/cluster-authentication-operator#859 the changes are already present in this repo.
Summary by CodeRabbit