Skip to content

CNTRLPLANE-2260: cmd: wire up OTE ginkgo suite for tokenreviews#163

Merged
openshift-merge-bot[bot] merged 2 commits intoopenshift:masterfrom
wangke19:ote-migrate-tokenreviews-test
Mar 23, 2026
Merged

CNTRLPLANE-2260: cmd: wire up OTE ginkgo suite for tokenreviews#163
openshift-merge-bot[bot] merged 2 commits intoopenshift:masterfrom
wangke19:ote-migrate-tokenreviews-test

Conversation

@wangke19
Copy link
Copy Markdown
Contributor

@wangke19 wangke19 commented Dec 23, 2025

Summary

Wire up the OTE ginkgo suite in prepareOperatorTestsRegistry() so the binary
can discover and run tests via BuildExtensionTestSpecsFromOpenShiftGinkgoSuite().

⚠️ Depends on #162. Must be merged before #182.

Commits

Commit 1: Infrastructure code only

cmd: wire up OTE ginkgo suite for tokenreviews

  • cmd/oauth-apiserver-tests-ext/main.go: add AddSuite configuration and
    call BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()

Commit 2: Dependencies

go.mod, vendor: add Ginkgo and OTE dependencies

  • Promote github.com/onsi/ginkgo/v2 from indirect to direct dependency
  • Add github.com/go-task/slim-sprig/v3 (indirect)
  • Vendor all new packages: ginkgo, gomega, openshift-tests-extension/pkg/ginkgo,
    golang.org/x/{net/html, text/encoding, tools/cover, tools/go/ast/inspector}

Related

@wangke19 wangke19 force-pushed the ote-migrate-tokenreviews-test branch from 807dc5a to 0a198b1 Compare December 23, 2025 13:16
@wangke19 wangke19 changed the title test/e2e: migrate tokenreviews test to OTE framework [WIP]test/e2e: migrate tokenreviews test to OTE framework Dec 23, 2025
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 23, 2025
@wangke19 wangke19 changed the title [WIP]test/e2e: migrate tokenreviews test to OTE framework [WIP]CNTRLPLANE-2260:test/e2e: migrate tokenreviews test to OTE framework Dec 23, 2025
@openshift-ci-robot
Copy link
Copy Markdown
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

Migrate the tokenreviews e2e test to OpenShift Tests Extension (OTE) framework while keeping the original test unchanged.

⚠️ IMPORTANT: This PR depends on #162 and should be merged after it.

Changes

New Files

  • test/e2e/oauth_token.go: Ginkgo wrapper for OTE framework
  • Contains testTokenReviewsGinkgo() function that delegates to original test helpers
  • Uses testing.TB interface for compatibility
  • Type asserts to *testing.T when calling existing helper functions
  • Properly structured with var _ = g.Describe() pattern for OTE discovery

Modified Files

  • cmd/oauth-apiserver-tests-ext/main.go:

  • Import test package: _ "github.com/openshift/oauth-apiserver/test/e2e"

  • Import OTE ginkgo: oteginkgo "github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo"

  • Call oteginkgo.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() to register tests

  • Use extension.AddSpecs(testSpecs) to add test specs to extension

  • go.mod:

  • Add github.com/onsi/ginkgo/v2 v2.24.0 (with replace directive to OpenShift fork)

  • Dependencies vendored

Unchanged Files

  • test/e2e/tokenreviews.go: ✅ Original test remains completely unchanged

Test Structure

var _ = g.Describe("[sig-auth] OAuth", func() {
   g.It("should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]", func(ctx context.Context) {
       testTokenReviewsGinkgo(g.GinkgoTB())
   })
})

OTE Discovery

After merging, the OTE binary will discover this test as:

[sig-auth] OAuth should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]

Verification Commands

# Build OTE binary
make build

# List discovered tests
./oauth-apiserver-tests-ext list

# Run the test
./oauth-apiserver-tests-ext run-suite <suite-path> -c 1

Migration Pattern

  • Follows OpenShift OTE migration best practices
  • Uses testing.TB interface for dual compatibility
  • No modifications to original test files
  • Type assertion used for compatibility with existing *testing.T helpers

Files Changed

  • test/e2e/oauth_token.go (new, 87 lines)
  • cmd/oauth-apiserver-tests-ext/main.go (modified)
  • go.mod (modified)
  • vendor/ (259 new files for Ginkgo and dependencies)

Commits

Single commit on top of PR #162:

  • test/e2e: migrate tokenreviews test to OTE framework

Dependencies

Related

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 openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 23, 2025
@wangke19 wangke19 force-pushed the ote-migrate-tokenreviews-test branch from 0a198b1 to 044a5c7 Compare December 23, 2025 13:45
@openshift-ci-robot
Copy link
Copy Markdown
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

Migrate the tokenreviews e2e test to OpenShift Tests Extension (OTE) framework while keeping the original test unchanged.

⚠️ IMPORTANT: This PR depends on #162 and should be merged after it.

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 tokenreviews

Changes:

  • Add test/e2e/oauth_token.go with Ginkgo test wrapper
  • Update cmd/oauth-apiserver-tests-ext/main.go to register Ginkgo tests
  • Import test package: _ "github.com/openshift/oauth-apiserver/test/e2e"
  • Import OTE ginkgo: oteginkgo "github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo"
  • Call oteginkgo.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()
  • Use extension.AddSpecs(testSpecs) to add test specs

Files changed: 2 files

  • cmd/oauth-apiserver-tests-ext/main.go (modified)
  • test/e2e/oauth_token.go (new)

Commit 2: Dependency updates

Commit: go.mod, vendor: add Ginkgo and OTE dependencies

Changes:

  • Add github.com/onsi/ginkgo/v2 v2.24.0 to go.mod (with replace directive to OpenShift fork)
  • Update go.sum with checksums
  • Vendor all dependencies (257 new files)

Files changed: 259 files

  • go.mod (modified)
  • go.sum (modified)
  • vendor/ (257 new files)

Test Structure

var _ = g.Describe("[sig-auth] OAuth", func() {
   g.It("should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]", func(ctx context.Context) {
       testTokenReviewsGinkgo(g.GinkgoTB())
   })
})

Implementation Details

oauth_token.go

  • Ginkgo wrapper that calls testTokenReviewsGinkgo()
  • Uses testing.TB interface for dual compatibility
  • Type asserts to *testing.T when calling existing helper functions
  • Reuses all existing test logic from tokenreviews.go

main.go updates

  • Imports test package to trigger Ginkgo test registration
  • Calls oteginkgo.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() to build test specs
  • Adds specs to extension using extension.AddSpecs(testSpecs)

Unchanged Files

  • test/e2e/tokenreviews.go - Original test remains completely unchanged

OTE Discovery

After merging, the OTE binary will discover this test as:

[sig-auth] OAuth should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]

Verification Commands

# Build OTE binary
make build

# Verify dependencies
make verify-deps

# List discovered tests
./oauth-apiserver-tests-ext list

# Run the test
./oauth-apiserver-tests-ext run-suite <suite-path> -c 1

Pattern Reference

  • Follows OpenShift OTE migration best practices
  • Two-commit structure: infrastructure first, dependencies second
  • No modifications to original test files
  • Uses testing.TB interface for compatibility

Dependencies

Related

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 wangke19 force-pushed the ote-migrate-tokenreviews-test branch from 044a5c7 to 8c4d1ed Compare December 26, 2025 03:32
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Dec 26, 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

Migrate the `tokenreviews` e2e test to OpenShift Tests Extension (OTE) framework while keeping the original test unchanged.

⚠️ IMPORTANT: This PR depends on #162 and should be merged after it.

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 tokenreviews`

Changes:

  • Add `test/e2e/e2e.go` with Ginkgo test wrapper
  • Add `cmd/oauth-apiserver-tests-ext/dependencymagnet.go` to register test imports
  • Update `cmd/oauth-apiserver-tests-ext/main.go` with OTE registry configuration
  • Add `prepareOperatorTestsRegistry()` with detailed documentation
  • Configure test suite with `extension.AddSuite()` for component/serial tests
  • Call `oteginkgo.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()` to build test specs
  • Use `extension.AddSpecs(specs)` to register test specs

Files 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 dependencies`

Changes:

  • Add `github.com/onsi/ginkgo/v2 v2.24.0` to go.mod (with replace directive to OpenShift fork)
  • Update `go.sum` with checksums
  • Vendor all dependencies (257 new files)

Files changed: 259 files

  • `go.mod` (modified)
  • `go.sum` (modified)
  • `vendor/` (257 new files)

Test Structure

```go
var _ = g.Describe("[sig-auth] OAuth", func() {
g.It("should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]", func(ctx context.Context) {
testTokenReviewsGinkgo(g.GinkgoTB())
})
})
```

Implementation Details

dependencymagnet.go

  • Imports test packages to register Ginkgo tests
  • Ensures tests are included in the build
  • Follows the pattern from other OpenShift operators

e2e.go

  • Ginkgo wrapper that calls `testTokenReviewsGinkgo()`
  • Uses `testing.TB` interface for dual compatibility
  • Type asserts to `*testing.T` when calling existing helper functions
  • Reuses all existing test logic from `tokenreviews.go`

main.go updates

  • Added `AddSuite` configuration for component/serial test suite
  • Suite name: `openshift/oauth-apiserver/component/serial`
  • Qualifiers: `[Component]` and `[Serial]` tags
  • Parallelism: 1 (serial execution)

Unchanged Files

  • ✅ `test/e2e/tokenreviews.go` - Original test remains completely unchanged

OTE Discovery

After merging, the OTE binary will discover this test as:
```
[sig-auth] OAuth should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]
```

Verification Commands

```bash

Build OTE binary

make build

Verify dependencies

make verify-deps

List discovered tests

./oauth-apiserver-tests-ext list

Run the test

./oauth-apiserver-tests-ext run-suite -c 1
```

Pattern Reference

  • Follows OpenShift OTE migration best practices
  • Two-commit structure: infrastructure first, dependencies second
  • No modifications to original test files
  • Uses `testing.TB` interface for compatibility
  • Separates test imports into `dependencymagnet.go` file

Dependencies

Related

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
Copy Markdown
Contributor

openshift-ci-robot commented Dec 26, 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

Migrate the `tokenreviews` e2e test to OpenShift Tests Extension (OTE) framework while keeping the original test unchanged.

⚠️ IMPORTANT: This PR depends on #162 and should be merged after it.

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 tokenreviews`

Changes:

  • Add `test/e2e/e2e.go` with Ginkgo test wrapper
  • Add `cmd/oauth-apiserver-tests-ext/dependencymagnet.go` to register test imports
  • Update `cmd/oauth-apiserver-tests-ext/main.go` with OTE registry configuration
  • Add `prepareOperatorTestsRegistry()` with detailed documentation
  • Configure test suite with `extension.AddSuite()` for component/serial tests
  • Call `oteginkgo.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()` to build test specs
  • Use `extension.AddSpecs(specs)` to register test specs

Files 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 dependencies`

Changes:

  • Add `github.com/onsi/ginkgo/v2 v2.24.0` to go.mod (with replace directive to OpenShift fork)
  • Update `go.sum` with checksums
  • Vendor all dependencies (257 new files)

Files changed: 259 files

  • `go.mod` (modified)
  • `go.sum` (modified)
  • `vendor/` (257 new files)

Test Structure

var _ = g.Describe("[sig-auth] OAuth", func() {
   g.It("should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]", func(ctx context.Context) {
       testTokenReviewsGinkgo(g.GinkgoTB())
   })
})

Implementation Details

dependencymagnet.go

  • Imports test packages to register Ginkgo tests
  • Ensures tests are included in the build
  • Follows the pattern from other OpenShift operators

e2e.go

  • Ginkgo wrapper that calls `testTokenReviewsGinkgo()`
  • Uses `testing.TB` interface for dual compatibility
  • Type asserts to `*testing.T` when calling existing helper functions
  • Reuses all existing test logic from `tokenreviews.go`

main.go updates

  • Added `AddSuite` configuration for component/serial test suite
  • Suite name: `openshift/oauth-apiserver/component/serial`
  • Qualifiers: `[Component]` and `[Serial]` tags
  • Parallelism: 1 (serial execution)

Unchanged Files

  • ✅ `test/e2e/tokenreviews.go` - Original test remains completely unchanged

OTE Discovery

After merging, the OTE binary will discover this test as:
```
[sig-auth] OAuth should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]
```

Verification Commands

```bash

Build OTE binary

make build

Verify dependencies

make verify-deps

List discovered tests

./oauth-apiserver-tests-ext list

Run the test

./oauth-apiserver-tests-ext run-suite -c 1
```

Pattern Reference

  • Follows OpenShift OTE migration best practices
  • Two-commit structure: infrastructure first, dependencies second
  • No modifications to original test files
  • Uses `testing.TB` interface for compatibility
  • Separates test imports into `dependencymagnet.go` file

Dependencies

Related

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
Copy Markdown
Contributor

openshift-ci-robot commented Dec 26, 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

Migrate the `tokenreviews` e2e test to OpenShift Tests Extension (OTE) framework while keeping the original test unchanged.

⚠️ IMPORTANT: This PR depends on #162 and should be merged after it.

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 tokenreviews`

Changes:

  • Add `test/e2e/e2e.go` with Ginkgo test wrapper
  • Add `cmd/oauth-apiserver-tests-ext/dependencymagnet.go` to register test imports
  • Update `cmd/oauth-apiserver-tests-ext/main.go` with OTE registry configuration
  • Add `prepareOperatorTestsRegistry()` with detailed documentation
  • Configure test suite with `extension.AddSuite()` for component/serial tests
  • Call `oteginkgo.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite()` to build test specs
  • Use `extension.AddSpecs(specs)` to register test specs

Files 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 dependencies`

Changes:

  • Add `github.com/onsi/ginkgo/v2 v2.24.0` to go.mod (with replace directive to OpenShift fork)
  • Update `go.sum` with checksums
  • Vendor all dependencies (257 new files)

Files changed: 259 files

  • `go.mod` (modified)
  • `go.sum` (modified)
  • `vendor/` (257 new files)

Test Structure

var _ = g.Describe("[sig-auth] OAuth", func() {
   g.It("should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]", func(ctx context.Context) {
       testTokenReviewsGinkgo(g.GinkgoTB())
   })
})

Implementation Details

dependencymagnet.go

  • Imports test packages to register Ginkgo tests
  • Ensures tests are included in the build
  • Follows the pattern from other OpenShift operators

e2e.go

  • Ginkgo wrapper that calls `testTokenReviewsGinkgo()`
  • Uses `testing.TB` interface for dual compatibility
  • Type asserts to `*testing.T` when calling existing helper functions
  • Reuses all existing test logic from `tokenreviews.go`

main.go updates

  • Added `AddSuite` configuration for component/serial test suite
  • Suite name: `openshift/oauth-apiserver/component/serial`
  • Qualifiers: `[Component]` and `[Serial]` tags
  • Parallelism: 1 (serial execution)

Unchanged Files

  • ✅ `test/e2e/tokenreviews.go` - Original test remains completely unchanged

OTE Discovery

After merging, the OTE binary will discover this test as:

[sig-auth] OAuth should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]

Verification Commands

# Build OTE binary
make build

# Verify dependencies
make verify-deps

# List discovered tests
./oauth-apiserver-tests-ext list

# Run the test
./oauth-apiserver-tests-ext run-suite <suite-path> -c 1

Pattern Reference

  • Follows OpenShift OTE migration best practices
  • Two-commit structure: infrastructure first, dependencies second
  • No modifications to original test files
  • Uses `testing.TB` interface for compatibility
  • Separates test imports into `dependencymagnet.go` file

Dependencies

Related

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
Copy Markdown
Contributor

openshift-ci-robot commented Dec 26, 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

Migrate the tokenreviews e2e test to OpenShift Tests Extension (OTE) framework while keeping the original test unchanged.

⚠️ IMPORTANT: This PR depends on #162 and should be merged after it.

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 tokenreviews

Changes:

  • Add test/e2e/e2e.go with Ginkgo test wrapper
  • Add cmd/oauth-apiserver-tests-ext/dependencymagnet.go to register test imports
  • Update cmd/oauth-apiserver-tests-ext/main.go with OTE registry configuration
  • Add prepareOperatorTestsRegistry() with detailed documentation
  • Configure test suite with extension.AddSuite() for component/serial tests
  • Call oteginkgo.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() to build test specs
  • Use extension.AddSpecs(specs) to register test specs

Files 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 dependencies

Changes:

  • Add github.com/onsi/ginkgo/v2 v2.24.0 to go.mod (with replace directive to OpenShift fork)
  • Update go.sum with checksums
  • Vendor all dependencies (257 new files)

Files changed: 259 files

  • go.mod (modified)
  • go.sum (modified)
  • vendor/ (257 new files)

Test Structure

var _ = g.Describe("[sig-auth] OAuth", func() {
   g.It("should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]", func(ctx context.Context) {
       testTokenReviewsGinkgo(g.GinkgoTB())
   })
})

Implementation Details

dependencymagnet.go

  • Imports test packages to register Ginkgo tests
  • Ensures tests are included in the build
  • Follows the pattern from other OpenShift operators

e2e.go

  • Ginkgo wrapper that calls testTokenReviewsGinkgo()
  • Uses testing.TB interface for dual compatibility
  • Type asserts to *testing.T when calling existing helper functions
  • Reuses all existing test logic from tokenreviews.go

main.go updates

  • Added AddSuite configuration for component/serial test suite
  • Suite name: openshift/oauth-apiserver/component/serial
  • Qualifiers: [Component] and [Serial] tags
  • Parallelism: 1 (serial execution)

Unchanged Files

  • test/e2e/tokenreviews.go - Original test remains completely unchanged

OTE Discovery

After merging, the OTE binary will discover this test as:

[sig-auth] OAuth should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]

Verification Commands

# Build OTE binary
make build

# Verify dependencies
make verify-deps

# List discovered tests
./oauth-apiserver-tests-ext list

# Run the test
./oauth-apiserver-tests-ext run-suite <suite-path> -c 1

Pattern Reference

  • Follows OpenShift OTE migration best practices
  • Two-commit structure: infrastructure first, dependencies second
  • No modifications to original test files
  • Uses testing.TB interface for compatibility
  • Separates test imports into dependencymagnet.go file

Dependencies

Related

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
Copy Markdown
Contributor

openshift-ci-robot commented Dec 26, 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

Migrate the tokenreviews e2e test to OpenShift Tests Extension (OTE) framework while keeping the original test unchanged.

⚠️ IMPORTANT: This PR depends on #162 and should be merged after it.

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 tokenreviews

Changes:

  • Add test/e2e/e2e.go with Ginkgo test wrapper
  • Add cmd/oauth-apiserver-tests-ext/dependencymagnet.go to register test imports
  • Update cmd/oauth-apiserver-tests-ext/main.go with OTE registry configuration
  • Add prepareOperatorTestsRegistry() with detailed documentation
  • Configure test suite with extension.AddSuite() for component/serial tests
  • Call oteginkgo.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite() to build test specs
  • Use extension.AddSpecs(specs) to register test specs

Files 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 dependencies

Changes:

  • Add github.com/onsi/ginkgo/v2 v2.24.0 to go.mod (with replace directive to OpenShift fork)
  • Update go.sum with checksums
  • Vendor all dependencies (257 new files)

Files changed: 259 files

  • go.mod (modified)
  • go.sum (modified)
  • vendor/ (257 new files)

Test Structure

var _ = g.Describe("[sig-auth] OAuth", func() {
   g.It("should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]", func(ctx context.Context) {
       testTokenReviewsGinkgo(g.GinkgoTB())
   })
})

Implementation Details

dependencymagnet.go

  • Imports test packages to register Ginkgo tests
  • Ensures tests are included in the build
  • Follows the pattern from other OpenShift operators

e2e.go

  • Ginkgo wrapper that calls testTokenReviewsGinkgo()
  • Uses testing.TB interface for dual compatibility
  • Type asserts to *testing.T when calling existing helper functions
  • Reuses all existing test logic from tokenreviews.go

main.go updates

  • Added AddSuite configuration for component/serial test suite
  • Suite name: openshift/oauth-apiserver/component/serial
  • Qualifiers: [Component] and [Serial] tags
  • Parallelism: 1 (serial execution)

Unchanged Files

  • test/e2e/tokenreviews.go - Original test remains completely unchanged

OTE Discovery

After merging, the OTE binary will discover this test as:

[sig-auth] OAuth should successfully review valid and invalid tokens [apigroup:oauth.openshift.io]

Verification Commands

# Build OTE binary
make build

# Verify dependencies
make verify-deps

# List discovered tests
./oauth-apiserver-tests-ext list

# Run the test
./oauth-apiserver-tests-ext run-suite <suite-path> -c 1

Pattern Reference

  • Follows OpenShift OTE migration best practices
  • Two-commit structure: infrastructure first, dependencies second
  • No modifications to original test files
  • Uses testing.TB interface for compatibility
  • Separates test imports into dependencymagnet.go file

Dependencies

Related

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

/retest

@wangke19 wangke19 force-pushed the ote-migrate-tokenreviews-test branch from 8c4d1ed to 24fcf89 Compare March 23, 2026 04:15
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 24ccff1f-1bac-4f28-9799-692a7f87d0bc

📥 Commits

Reviewing files that changed from the base of the PR and between d622679 and c9f4abb.

⛔ Files ignored due to path filters (256)
  • vendor/github.com/go-task/slim-sprig/v3/.editorconfig is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/.gitattributes is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/.gitignore is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/CHANGELOG.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/LICENSE.txt is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/Taskfile.yml is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/crypto.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/date.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/defaults.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/dict.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/doc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/functions.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/list.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/network.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/numeric.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/reflect.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/regex.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/strings.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/go-task/slim-sprig/v3/url.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/.gitignore is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/CHANGELOG.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/CONTRIBUTING.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/LICENSE is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/Makefile is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/OWNERS is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/RELEASING.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/config/deprecated.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/core_dsl.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/core_dsl_patch.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/decorator_dsl.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/deprecated_dsl.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/formatter/colorable_windows.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/formatter/formatter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/build/build_command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/abort.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/command/program.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/boostrap_templates.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/bootstrap_command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_templates.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generators_common.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/compile.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/gocovmerge.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/profiles_and_reports.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/run.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/test_suite.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/utils.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/internal/verify_version.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/labels/labels_command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/main.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/import.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/outline_command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/run/run_command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/unfocus/unfocus_command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/delta.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/delta_tracker.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/dependencies.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hash.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/package_hashes.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/suite.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo/watch/watch_command.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo_cli_dependencies.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/ginkgo_t_dsl.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/counter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/failer.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/focus.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/global/init.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/group.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/interrupt_handler.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/sigquit_swallower_unix.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/interrupt_handler/sigquit_swallower_windows.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/node.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/ordering.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_unix.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_wasm.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/client_server.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/http_server.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_client.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/server_handler.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/progress_report.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/progress_report_bsd.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/progress_report_unix.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/progress_report_wasm.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/progress_report_win.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/progress_reporter_manager.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/report_entry.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/spec.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/spec_context.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/spec_patch.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/suite.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/suite_patch.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/testingtproxy/testing_t_proxy.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/tree.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/internal/writer.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/default_reporter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/deprecated_reporter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/json_report.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/junit_report.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/reporter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporters/teamcity_report.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/reporting_dsl.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/table_dsl.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/code_location.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/config.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/deprecated_types.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/deprecation_support.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/enum_support.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/errors.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/file_filter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/flags.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/label_filter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/report_entry.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/types.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/types_patch.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/ginkgo/v2/types/version.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/.gitignore is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/CHANGELOG.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/CONTRIBUTING.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/LICENSE is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/README.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/RELEASING.md is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/format/format.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/gomega_dsl.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/assertion.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/async_assertion.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/duration_bundle.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/gomega.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/gutil/post_ioutil.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/gutil/using_ioutil.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/polling_signal_error.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/internal/vetoptdesc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/and.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/attributes_slice.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_a_directory.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_comparable_to_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_element_of_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_false_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_identical_to.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_key_of_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_true_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/consist_of.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/contain_element_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/contain_elements_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/equal_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_each_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_exact_elements.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_existing_field_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_field.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_http_body_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_http_header_with_value_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_http_status_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_key_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_len_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/have_value.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/internal/miter/type_support_iter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/internal/miter/type_support_noiter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/match_error_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/match_json_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/not.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/or.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/panic_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/receive_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/satisfy_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/semi_structured_data_support.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/succeed_matcher.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/support/goraph/edge/edge.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/type_support.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/matchers/with_transform.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/onsi/gomega/types/types.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo/logging.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo/parallel.go is excluded by !vendor/**, !**/vendor/**
  • vendor/github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo/util.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/atom/atom.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/atom/table.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/charset/charset.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/const.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/doc.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/doctype.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/entity.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/escape.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/foreign.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/iter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/node.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/parse.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/render.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/net/html/token.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/charmap/charmap.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/charmap/tables.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/encoding.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/htmlindex/htmlindex.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/htmlindex/map.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/htmlindex/tables.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/internal/identifier/identifier.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/internal/identifier/mib.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/internal/internal.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/japanese/all.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/japanese/eucjp.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/japanese/iso2022jp.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/japanese/shiftjis.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/japanese/tables.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/korean/euckr.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/korean/tables.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/simplifiedchinese/all.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/simplifiedchinese/tables.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/traditionalchinese/big5.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/traditionalchinese/tables.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/unicode/override.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/encoding/unicode/unicode.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/internal/utf8internal/utf8internal.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/runes/cond.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/text/runes/runes.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/cover/profile.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/edge/edge.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/inspector/cursor.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/inspector/inspector.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/inspector/iter.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/inspector/typeof.go is excluded by !vendor/**, !**/vendor/**
  • vendor/golang.org/x/tools/go/ast/inspector/walk.go is excluded by !vendor/**, !**/vendor/**
  • vendor/modules.txt is excluded by !vendor/**, !**/vendor/**
📒 Files selected for processing (1)
  • go.mod
✅ Files skipped from review due to trivial changes (1)
  • go.mod

Walkthrough

The PR activates OTE test registration in the oauth-apiserver extension: imports the OTE ginkgo helper, registers two serial suites (one disruptive) with specific qualifiers, builds specs from the OpenShift Ginkgo suite, adds them to the extension, and updates go.mod dependencies.

Changes

Cohort / File(s) Summary
Test Extension Registration
cmd/oauth-apiserver-tests-ext/main.go
Imported github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo (aliased oteginkgo), registered two OTE suites (openshift/oauth-apiserver/component/serial and openshift/oauth-apiserver/component/serial-disruptive) with Parallelism: 1, set qualifiers to require "[Component]" and "[Serial]" and to require or exclude "[Disruptive]" per suite, marked the disruptive suite with ClusterStabilityDisruptive, built specs via oteginkgo.BuildExtensionTestSpecsFromOpenShiftGinkgoSuite(), added error wrapping on spec build failure, added specs to the extension, then registered the extension.
Dependency Management
go.mod
Added github.com/go-task/slim-sprig/v3 v3.0.0 as an indirect requirement (dependency graph update).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@wangke19 wangke19 changed the title [WIP]CNTRLPLANE-2260:test/e2e: migrate tokenreviews test to OTE framework CNTRLPLANE-2260: test/e2e: add OTE test wrapper for tokenreviews Mar 23, 2026
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 23, 2026
@wangke19 wangke19 force-pushed the ote-migrate-tokenreviews-test branch from 24fcf89 to e2d29b2 Compare March 23, 2026 05:06
@wangke19 wangke19 changed the title CNTRLPLANE-2260: test/e2e: add OTE test wrapper for tokenreviews CNTRLPLANE-2260: cmd: wire up OTE ginkgo suite for tokenreviews Mar 23, 2026
Add suite configuration and ginkgo test spec registration to
prepareOperatorTestsRegistry(). Two suites are registered:

- component/serial: non-disruptive tests with default cluster health monitoring
- component/serial-disruptive: disruptive tests with relaxed thresholds

Note: test package imports (dependencymagnet.go) are added in a subsequent PR.
@wangke19 wangke19 force-pushed the ote-migrate-tokenreviews-test branch from e2d29b2 to d622679 Compare March 23, 2026 05:32
Add the required dependencies for the OTE test framework:

- Ginkgo v2.24.0 (via OpenShift fork github.com/openshift/onsi-ginkgo/v2)
- Gomega v1.36.2
- OpenShift Tests Extension pkg/ginkgo package
- Supporting libraries: go-task/slim-sprig, golang.org/x/{net/html, text/encoding, tools/cover, tools/go/ast/inspector}

All dependencies are vendored to ensure reproducible builds.
@wangke19 wangke19 force-pushed the ote-migrate-tokenreviews-test branch from d622679 to c9f4abb Compare March 23, 2026 07:02
@gangwgr
Copy link
Copy Markdown

gangwgr commented Mar 23, 2026

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 23, 2026
@wangke19
Copy link
Copy Markdown
Contributor Author

/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Mar 23, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

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

Details

In response to this:

/verified by CI

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
Copy link
Copy Markdown

openshift-ci Bot commented Mar 23, 2026

@wangke19: all tests passed!

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.

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Mar 23, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gangwgr, sanchezl, 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 Mar 23, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit 8efd83a into openshift:master Mar 23, 2026
11 checks passed
@wangke19 wangke19 deleted the ote-migrate-tokenreviews-test branch March 24, 2026 04:22
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.

4 participants