Skip to content

Conversation

@wangke19
Copy link
Contributor

@wangke19 wangke19 commented Dec 23, 2025

Summary

Update minimal OTE framework infrastructure

Changes

  • Refactor cmd/oauth-apiserver-tests-ext/main.go to use proper error handling pattern
  • Functions now return errors instead of calling klog.Fatal directly

Why This Approach?

Following the OpenShift pattern established by service-ca-operator:

  1. PR CNTRLPLANE-2260:cmd/oauth-apiserver-tests-ext: Update OTE framework integration #162 (this PR): Infrastructure only - minimal changes to prepare for OTE
  2. PR [WIP]CNTRLPLANE-2260:test/e2e: migrate tokenreviews test to OTE framework #163: Test migration - adds actual tests, Ginkgo dependencies, and test registration

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.

wangke19 added a commit to wangke19/oauth-apiserver that referenced this pull request Dec 23, 2025
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
@wangke19 wangke19 changed the title cmd/oauth-apiserver-tests-ext: add OTE framework integration cmd/oauth-apiserver-tests-ext: Update OTE framework integration Dec 23, 2025
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.
@wangke19 wangke19 force-pushed the ote-migrate-tokenreviews branch from c4e8899 to a7c3a54 Compare December 23, 2025 12:11
@wangke19 wangke19 changed the title cmd/oauth-apiserver-tests-ext: Update OTE framework integration CNTRLPLANE-2260:cmd/oauth-apiserver-tests-ext: Update OTE framework integration Dec 23, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 23, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Dec 23, 2025

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

Details

In response to this:

Summary

Add minimal OTE framework infrastructure without test dependencies.

Changes

  • Refactor cmd/oauth-apiserver-tests-ext/main.go to use proper error handling pattern
  • Functions now return errors instead of calling klog.Fatal directly
  • Add comment noting test imports will be added in subsequent PRs

Why This Approach?

Following the OpenShift pattern established by service-ca-operator:

  1. PR CNTRLPLANE-2260:cmd/oauth-apiserver-tests-ext: Update OTE framework integration #162 (this PR): Infrastructure only - minimal changes to prepare for OTE
  2. PR [WIP]CNTRLPLANE-2260:test/e2e: migrate tokenreviews test to OTE framework #163: Test migration - adds actual tests, Ginkgo dependencies, and test registration

This separation makes reviews easier and follows the established pattern.

Files Changed

  • cmd/oauth-apiserver-tests-ext/main.go (minimal error handling improvements)

Commits

Single commit: cmd: add OTE infrastructure

Next Step

After this merges, PR #163 will add the actual test migration with Ginkgo dependencies.

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
Contributor Author

/retest

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Dec 23, 2025

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

Details

In response to this:

Summary

Add minimal OTE framework infrastructure without test dependencies.

Changes

  • Refactor cmd/oauth-apiserver-tests-ext/main.go to use proper error handling pattern
  • Functions now return errors instead of calling klog.Fatal directly

Why This Approach?

Following the OpenShift pattern established by service-ca-operator:

  1. PR CNTRLPLANE-2260:cmd/oauth-apiserver-tests-ext: Update OTE framework integration #162 (this PR): Infrastructure only - minimal changes to prepare for OTE
  2. PR [WIP]CNTRLPLANE-2260:test/e2e: migrate tokenreviews test to OTE framework #163: Test migration - adds actual tests, Ginkgo dependencies, and test registration

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.

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-robot
Copy link
Contributor

openshift-ci-robot commented Dec 23, 2025

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

Details

In response to this:

Summary

Update minimal OTE framework infrastructure

Changes

  • Refactor cmd/oauth-apiserver-tests-ext/main.go to use proper error handling pattern
  • Functions now return errors instead of calling klog.Fatal directly

Why This Approach?

Following the OpenShift pattern established by service-ca-operator:

  1. PR CNTRLPLANE-2260:cmd/oauth-apiserver-tests-ext: Update OTE framework integration #162 (this PR): Infrastructure only - minimal changes to prepare for OTE
  2. PR [WIP]CNTRLPLANE-2260:test/e2e: migrate tokenreviews test to OTE framework #163: Test migration - adds actual tests, Ginkgo dependencies, and test registration

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.

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.

@p0lyn0mial
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 23, 2025
@openshift-ci
Copy link

openshift-ci bot commented Dec 23, 2025

[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

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 23, 2025
@wangke19
Copy link
Contributor Author

/retest

@wangke19
Copy link
Contributor Author

/test okd-scos-images

@wangke19
Copy link
Contributor Author

/verified by CI tests

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Dec 25, 2025
@openshift-ci-robot
Copy link
Contributor

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

Details

In response to this:

/verified by CI tests

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-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 593a846 and 2 for PR HEAD a7c3a54 in total

@wangke19
Copy link
Contributor Author

/test okd-scos-images

@openshift-ci
Copy link

openshift-ci bot commented Dec 25, 2025

@wangke19: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-images a7c3a54 link true /test okd-scos-images

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.

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