encryption: accept testing.TB instead of *testing.T in test helpers#2159
encryption: accept testing.TB instead of *testing.T in test helpers#2159gangwgr wants to merge 1 commit intoopenshift:masterfrom
Conversation
The encryption test helper functions (TestEncryptionTypeAESCBC, NewE, etc.) currently require *testing.T, which prevents them from being used with Ginkgo's GinkgoTB() in OTE (OpenShift Tests Extension) migrations. Change the function signatures to accept testing.TB (the interface that both *testing.T and GinkgoTBWrapper satisfy) so consumers can call these helpers from both standard Go tests and Ginkgo specs. Functions that use t.Run() (TestEncryptionTurnOnAndOff, TestEncryptionProvidersMigration) are left as *testing.T since Run() is not part of the testing.TB interface. This is backward compatible: existing callers passing *testing.T continue to work without changes. Made-with: Cursor
|
Skipping CI for Draft Pull Request. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe changes replace concrete Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ardaguclu, gangwgr 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 |
|
@gangwgr: 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. |
|
could you open a pr in kas-o to ensure that the tests still work ? |
|
@p0lyn0mial it is working fine our case are passing only monitor cases are failing |
The encryption test helper functions (TestEncryptionTypeAESCBC, NewE, etc.) currently require *testing.T, which prevents them from being used with Ginkgo's GinkgoTB() in OTE (OpenShift Tests Extension) migrations.
Change the function signatures to accept testing.TB (the interface that both *testing.T and GinkgoTBWrapper satisfy) so consumers can call these helpers from both standard Go tests and Ginkgo specs.
Functions that use t.Run() (TestEncryptionTurnOnAndOff, TestEncryptionProvidersMigration) are left as *testing.T since Run() is not part of the testing.TB interface.
This is backward compatible: existing callers passing *testing.T continue to work without changes.