-
Notifications
You must be signed in to change notification settings - Fork 41
CNTRLPLANE-2260:cmd/oauth-apiserver-tests-ext: Update OTE framework integration #162
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
Add Ginkgo wrapper for the tokenreviews test to enable OTE execution. - Add test/e2e/oauth_token.go with Ginkgo test wrapper - Use testing.TB interface for dual compatibility with standard Go tests and Ginkgo - Add helper functions with Ginkgo suffix to avoid conflicts - Use clientcmd.BuildConfigFromFlags() to avoid stdout pollution - Original test/e2e/tokenreviews.go remains unchanged The test is now discoverable by OTE framework: "[sig-auth] OAuth API Server [Serial] should successfully review tokens" Depends on: openshift#162
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.
c4e8899 to
a7c3a54
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. |
|
/retest |
|
@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. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: p0lyn0mial, wangke19 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
/test okd-scos-images |
|
/verified by CI tests |
|
@wangke19: This PR has been marked as verified by 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. |
|
/test okd-scos-images |
|
@wangke19: The following test failed, say
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
Update minimal OTE framework infrastructure
Changes
cmd/oauth-apiserver-tests-ext/main.goto use proper error handling patternklog.FataldirectlyWhy This Approach?
Following the OpenShift pattern established by service-ca-operator:
This separation makes reviews easier and follows the established pattern.
Files Changed
cmd/oauth-apiserver-tests-ext/main.go(minimal error handling improvements)Next Step
After this merges, PR #163 will add the actual test migration with Ginkgo dependencies.