-
Notifications
You must be signed in to change notification settings - Fork 41
[WIP]CNTRLPLANE-2260:test/e2e: migrate tokenreviews test to OTE framework #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wangke19 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 |
This commit introduces the OpenShift Tests Extension (OTE) framework infrastructure for the OAuth API Server tests. Changes: - Refactor cmd/oauth-apiserver-tests-ext/main.go to use proper error handling pattern with error returns instead of direct exits - Add prepareOperatorTestsRegistry with OTE extension configuration The error handling pattern now follows Go best practices by returning errors from functions and handling them in the caller, making the code more testable and maintainable. Note: Test package imports and oteginkgo.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() will be added in subsequent PRs when actual tests are migrated to the OTE framework.
807dc5a to
0a198b1
Compare
|
@wangke19: This pull request references CNTRLPLANE-2260 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. 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. |
0a198b1 to
044a5c7
Compare
|
@wangke19: This pull request references CNTRLPLANE-2260 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. 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. |
This commit adds the OpenShift Tests Extension (OTE) Ginkgo test wrapper for the tokenreviews test, including: - test/e2e/e2e.go: Ginkgo wrapper for the token review test - cmd/oauth-apiserver-tests-ext/main.go: Updated OTE registry configuration with AddSuite for component/serial tests - cmd/oauth-apiserver-tests-ext/dependencymagnet.go: Import registration for Ginkgo tests The test is tagged with [sig-auth] and [apigroup:oauth.openshift.io] to ensure proper test organization and execution within the OTE framework.
This commit adds the required dependencies for the OTE test framework: - Ginkgo v2.24.0 (via OpenShift fork) - Gomega v1.36.2 - OpenShift Tests Extension packages All dependencies are vendored to ensure reproducible builds.
044a5c7 to
8c4d1ed
Compare
|
@wangke19: This pull request references CNTRLPLANE-2260 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. 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. |
|
@wangke19: This pull request references CNTRLPLANE-2260 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. 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. |
|
@wangke19: This pull request references CNTRLPLANE-2260 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. 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. |
|
@wangke19: This pull request references CNTRLPLANE-2260 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. 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. |
|
@wangke19: This pull request references CNTRLPLANE-2260 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. 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. |
|
/retest |
|
@wangke19: 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. |
Summary
Migrate the
tokenreviewse2e test to OpenShift Tests Extension (OTE) framework while keeping the original test unchanged.This PR contains exactly 2 commits following the required structure:
Commit Structure
Commit 1: Infrastructure code changes only
Commit:
test/e2e: add OTE test wrapper for tokenreviewsChanges:
test/e2e/e2e.gowith Ginkgo test wrappercmd/oauth-apiserver-tests-ext/dependencymagnet.goto register test importscmd/oauth-apiserver-tests-ext/main.gowith OTE registry configurationprepareOperatorTestsRegistry()with detailed documentationextension.AddSuite()for component/serial testsoteginkgo.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()to build test specsextension.AddSpecs(specs)to register test specsFiles changed: 3 files
cmd/oauth-apiserver-tests-ext/main.go(modified)cmd/oauth-apiserver-tests-ext/dependencymagnet.go(new)test/e2e/e2e.go(new)Commit 2: Dependency updates
Commit:
go.mod, vendor: add Ginkgo and OTE dependenciesChanges:
github.com/onsi/ginkgo/v2 v2.24.0to go.mod (with replace directive to OpenShift fork)go.sumwith checksumsFiles changed: 259 files
go.mod(modified)go.sum(modified)vendor/(257 new files)Test Structure
Implementation Details
dependencymagnet.go
e2e.go
testTokenReviewsGinkgo()testing.TBinterface for dual compatibility*testing.Twhen calling existing helper functionstokenreviews.gomain.go updates
AddSuiteconfiguration for component/serial test suiteopenshift/oauth-apiserver/component/serial[Component]and[Serial]tagsUnchanged Files
test/e2e/tokenreviews.go- Original test remains completely unchangedOTE Discovery
After merging, the OTE binary will discover this test as:
Verification Commands
Pattern Reference
testing.TBinterface for compatibilitydependencymagnet.gofileDependencies
Related