Skip to content

CNTRLPLANE-2589: Migrate test/e2e-encryption-perf to OpenShift Tests Extension framework#926

Open
ropatil010 wants to merge 1 commit into
openshift:masterfrom
ropatil010:test-e2e
Open

CNTRLPLANE-2589: Migrate test/e2e-encryption-perf to OpenShift Tests Extension framework#926
ropatil010 wants to merge 1 commit into
openshift:masterfrom
ropatil010:test-e2e

Conversation

@ropatil010

@ropatil010 ropatil010 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Hi Team,

Splitting the original PR: #859 into smaller once to better debug and merge the PR's easily.

PR about:
This commit migrates the encryption performance tests to support both traditional go test and the OpenShift Tests Extension (OTE) framework, following the dual-mode pattern established in PR #859.

Changes:

  • Add encryption_perf.go with Ginkgo test registration
  • Refactor encryption_perf_test.go to call shared test function
  • Add test/library/encryption_wrappers.go for testing.TB compatibility
  • Add test/library/encryption/scenarios.go with core test implementations
  • Add test/library/encryption/perf_helpers.go for performance test utilities
  • Register encryption-perf suite in OTE main.go with ClusterStability: Disruptive

The tests now use testing.TB interface for framework compatibility and context.Background() instead of t.Context() to avoid Ginkgo panics.

Suite details:

  • Name: openshift/cluster-authentication-operator/operator-encryption-perf/serial
  • Parallelism: 1 (serial execution)
  • ClusterStability: Disruptive (triggers API server rollouts)

Test: [sig-auth] authentication operator [Encryption][Serial] TestPerfEncryptionTypeAESCBC

Summary by CodeRabbit

  • New Features

    • Added a new encryption performance test suite to broaden coverage for OAuth API server encryption scenarios.
    • Introduced a long-running performance check that measures encryption migration behavior and token creation throughput.
  • Bug Fixes

    • Improved validation to detect slow encryption migrations and fail when they exceed the expected time limit.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The AES-CBC encryption performance test logic is extracted from encryption_perf_test.go into a new Ginkgo-based encryption_perf.go file with helper functions. The _test.go file becomes a thin wrapper. The new package is registered in the external test binary as a new OTE serial disruptive suite.

Changes

Encryption perf test refactor and OTE registration

Layer / File(s) Summary
Ginkgo test implementation
test/e2e-encryption-perf/encryption_perf.go, test/e2e-encryption-perf/encryption_perf_test.go
New file adds a Ginkgo Describe/It entrypoint delegating to testPerfEncryptionTypeAESCBC, which configures a 30-minute AES-CBC scenario via library.TestPerfEncryption, asserts ≥14,000 created OAuth tokens, enforces a 10-minute migration limit, and provides createAccessTokenWrapper, reportSecret, and getPerfClients helpers. The _test.go file is reduced to a thin testing.T wrapper calling the shared helper.
OTE suite registration
cmd/cluster-authentication-operator-tests-ext/main.go
Blank import registers the e2e-encryption-perf package; a new OTE suite entry configures Parallelism: 1, ClusterStability: Disruptive, and qualifiers for [Encryption], [Serial], and Perf tests.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (3 errors, 3 warnings)

Check name Status Explanation Resolution
Ote Binary Stdout Contract ❌ Error main()’s Run calls cmd.Help(), and Cobra writes help to stdout by default, so the OTE binary can emit non-JSON stdout. Remove that help-printing path or redirect command output to stderr with SetOut/SetErr before any help/usage can run.
Container-Privileges ❌ Error Changed manifests include privileged: true in bindata/oauth-apiserver/deploy.yaml, bindata/oauth-openshift/deployment.yaml, and testdata YAMLs. Remove or justify the privileged containers in the modified manifests/testdata; if they are only fixtures, exclude them from this privilege check.
No-Sensitive-Data-In-Logs ❌ Error assertion.go logs refresh tokens/raw etcd content, and helpers.go prints config.Host/token IDs, exposing sensitive data. Redact or remove token/raw content and hostnames from logs/errors; keep only sanitized identifiers or counts.
Docstring Coverage ⚠️ Warning Docstring coverage is 79.31% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Test Structure And Quality ⚠️ Warning FAIL: The perf test creates cluster-scoped OAuthAccessTokens in DBLoaderRepeat but never deletes them, and one key assertion lacks a failure message. Add explicit cleanup for created tokens (or show library-go cleans them up) and give the GreaterOrEqual assertion a descriptive failure message.
Microshift Test Compatibility ⚠️ Warning The new Ginkgo test calls oauth.openshift.io/operator.openshift.io clients and has no [Skipped:MicroShift] or [apigroup:...] guard. Add a MicroShift skip/guard (or apigroup tags for the unavailable API groups) so the new e2e test won’t run on MicroShift.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: migrating the e2e-encryption-perf test to the OpenShift Tests Extension framework.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The new Ginkgo title is a fixed string with no dynamic values; no other test titles in the changed files use generated data or formatting.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PASS: the new Ginkgo perf test only drives API/encryption migrations and token load; no multi-node assumptions or SNO-sensitive scheduling/HA logic found.
Topology-Aware Scheduling Compatibility ✅ Passed The PR only adds test registration and e2e test code; I found no deployment manifests, controllers, node selectors, affinity, PDBs, or topology-spread constraints.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The new Ginkgo test uses only cluster-internal API clients and helpers; no hardcoded IPv4, IP-family assumptions, or public-internet calls were found.
No-Weak-Crypto ✅ Passed Touched files only add OTE registration and an AES-CBC perf test; no MD5/SHA1/DES/RC4/ECB, custom crypto, or secret/token comparisons.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/e2e-encryption-perf/encryption_perf.go`:
- Around line 56-67: The AssertDBPopulatedFunc closure is not validating the
errorStore parameter, allowing the test to pass even when DB loader workers
report failures. Add an assertion early in the AssertDBPopulatedFunc that checks
if errorStore contains any entries, and if it does, fail the test using
require.Fail or similar with a message that includes the collected errors so
loader failures are caught instead of silently ignored.

In `@test/library/encryption/scenarios.go`:
- Around line 46-57: The hardcoded 30 second timeout in the time.After() call
within the select statement can cause premature failures on slow clusters even
when the system is functioning correctly. Replace the fixed duration of 30 *
time.Second with a reference to the migration watcher's configured timeout value
to ensure the channel wait window is properly aligned with the watcher's actual
timeout configuration instead of using an arbitrary fixed duration.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1bbedebe-122c-4fce-a0aa-369d62586ef2

📥 Commits

Reviewing files that changed from the base of the PR and between 28632f2 and 9f643f2.

📒 Files selected for processing (6)
  • cmd/cluster-authentication-operator-tests-ext/main.go
  • test/e2e-encryption-perf/encryption_perf.go
  • test/e2e-encryption-perf/encryption_perf_test.go
  • test/library/encryption/perf_helpers.go
  • test/library/encryption/scenarios.go
  • test/library/encryption_wrappers.go

Comment thread test/e2e-encryption-perf/encryption_perf.go
Comment thread test/library/encryption/scenarios.go Outdated
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@ropatil010

Copy link
Copy Markdown
Contributor Author

/test e2e-agnostic-upgrade

@ropatil010 ropatil010 changed the title Migrate test/e2e-encryption-perf to OpenShift Tests Extension framework CNTRLPLANE-2589: Migrate test/e2e-encryption-perf to OpenShift Tests Extension framework Jun 19, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 19, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

@ropatil010: This pull request references CNTRLPLANE-2589 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 epic to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Hi Team,

Splitting the original PR: #859 into smaller once to better debug and merge the PR's easily.

PR about:
This commit migrates the encryption performance tests to support both traditional go test and the OpenShift Tests Extension (OTE) framework, following the dual-mode pattern established in PR #859.

Changes:

  • Add encryption_perf.go with Ginkgo test registration
  • Refactor encryption_perf_test.go to call shared test function
  • Add test/library/encryption_wrappers.go for testing.TB compatibility
  • Add test/library/encryption/scenarios.go with core test implementations
  • Add test/library/encryption/perf_helpers.go for performance test utilities
  • Register encryption-perf suite in OTE main.go with ClusterStability: Disruptive

The tests now use testing.TB interface for framework compatibility and context.Background() instead of t.Context() to avoid Ginkgo panics.

Suite details:

  • Name: openshift/cluster-authentication-operator/operator-encryption-perf/serial
  • Parallelism: 1 (serial execution)
  • ClusterStability: Disruptive (triggers API server rollouts)

Test: [sig-auth] authentication operator [Encryption][Serial] TestPerfEncryptionTypeAESCBC

Summary by CodeRabbit

Release Notes

  • Tests
  • Added a new end-to-end encryption performance test suite (AES-CBC) covering encryption configuration behavior and migration-time measurement.
  • Introduced reusable encryption scenario helpers, including enable → verify encrypted → disable → verify unencrypted cycles and encryption-type mode coverage.
  • Improved performance test infrastructure with parallel database population, migration progress watching, and token creation/count reporting.
  • Updated performance test entrypoint and added wrapper functions to standardize execution under Ginkgo-compatible testing.TB.

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.

@ropatil010

ropatil010 commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

/assign @liouk
/retest
Failure CI profiles:

  1. e2e-agnostic the failures are not related to my PR.
  2. e2e-agnostic-upgrade the failure case is consistent across other builds as well nd is not related to my PR.
    How ever i'm retriggering to double confirm.

PASS logs for migrated case

https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_cluster-authentication-operator/926/pull-ci-openshift-cluster-authentication-operator-master-e2e-aws-operator-encryption-perf-serial-ote-1of2/2067937008877047808/artifacts/e2e-aws-operator-encryption-perf-serial-ote/openshift-e2e-test/artifacts/e2e.log

passed: (14m23s) 2026-06-19T13:01:08 "[sig-auth] authentication operator [Encryption][Serial] TestPerfEncryptionTypeAESCBC"

@ropatil010

Copy link
Copy Markdown
Contributor Author

/retest

@liouk liouk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, it looks like we're copying and adapting quite a lot of functions from library-go mainly because we're changing *testing.T to testing.TB. Is there a plan to eventually update these funcs in library-go as well, so that we don't have to copy code over for this change? If we're doing a global OTE migration, this should definitely be part of it (I'd even argue that we should have started there). This way we can reduce code duplication just for plumbing needs.

Comment thread test/library/encryption/perf_helpers.go Outdated
Comment thread test/library/encryption/scenarios.go Outdated
Comment thread test/e2e-encryption-perf/encryption_perf.go Outdated
Comment thread test/library/encryption_wrappers.go Outdated
Comment thread test/e2e-encryption-perf/encryption_perf.go Outdated
@openshift-ci

openshift-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from liouk. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

ropatil010 pushed a commit to ropatil010/cluster-authentication-operator that referenced this pull request Jun 26, 2026
This commit addresses all reviewer suggestions for PR openshift#926:

1. Context Injection and Propagation:
   - Add context.Context parameter to Ginkgo tests
   - Use parent context instead of context.Background()
   - Ginkgo now injects context: g.It(..., func(ctx context.Context))
   - Standard tests use tt.Context()
   - Context flows properly: Ginkgo -> test -> library functions

2. Migration Watcher Check:
   - Remove overly-restrictive cond.Reason == "Migrating" check
   - Now matches library-go behavior (only checks Status)
   - Prevents false failures if controller uses different reason strings

3. Remove Unnecessary Wrapper File:
   - Delete test/library/encryption_wrappers.go (39 lines)
   - Update caller to use local implementation directly
   - No functionality lost - wrappers were just pass-throughs

4. Improved Assertion Pattern:
   - Replace error creation + require.NoError() with direct assertions
   - Use require.True() and require.GreaterOrEqual()
   - More readable and follows Go testing best practices
   - Remove unused errors import

5. Dual-Mode Support:
   - Both standard Go test and Ginkgo modes work correctly
   - Standard: TestPerfEncryptionTypeAESCBC(tt.Context(), tt)
   - Ginkgo: g.It(..., func(ctx context.Context))
   - Shared implementation uses testing.TB interface

Changes:
- Modified: 4 files
- Deleted: 1 file
- Net: -47 lines (simplified code)

All changes verified:
- Compiles in both test modes
- No go vet issues
- Proper context propagation
- Consistent application of patterns

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
test/library/encryption/perf_helpers.go (1)

43-47: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Use the test-process clock for the value sent on migrationStartedCh.

Line 47 sends the operator condition timestamp, but scenarios.go subtracts it from a locally captured end timestamp. If the operator/test clocks differ, the perf duration can be negative or inflated. Send a local observation timestamp here, or compute both endpoints from the same clock source.

Suggested direction
 			if cond.Type == "EncryptionMigrationControllerProgressing" &&
 				cond.Status == operatorv1.ConditionTrue &&
 				cond.LastTransitionTime.Time.After(testStartTime) {
-				t.Logf("EncryptionMigrationControllerProgressing condition observed at %v with reason %q", cond.LastTransitionTime, cond.Reason)
-				migrationStartedCh <- cond.LastTransitionTime.Time
+				observedAt := time.Now()
+				t.Logf("EncryptionMigrationControllerProgressing condition observed at %v with reason %q; local observation time %v", cond.LastTransitionTime, cond.Reason, observedAt)
+				migrationStartedCh <- observedAt
 				return true, nil
 			}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/library/encryption/perf_helpers.go` around lines 43 - 47, The timestamp
sent on migrationStartedCh in the condition-watching helper should come from the
test-process clock, not from cond.LastTransitionTime, because scenarios.go later
compares it to a locally captured end time. Update the logic around the
EncryptionMigrationControllerProgressing check so it logs the operator timestamp
for diagnostics if needed, but sends a local observation time from the test
clock on migrationStartedCh to keep both endpoints on the same clock source.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@test/library/encryption/perf_helpers.go`:
- Around line 43-47: The timestamp sent on migrationStartedCh in the
condition-watching helper should come from the test-process clock, not from
cond.LastTransitionTime, because scenarios.go later compares it to a locally
captured end time. Update the logic around the
EncryptionMigrationControllerProgressing check so it logs the operator timestamp
for diagnostics if needed, but sends a local observation time from the test
clock on migrationStartedCh to keep both endpoints on the same clock source.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: e3e9b695-94e4-499f-9a3b-dacbd0879ece

📥 Commits

Reviewing files that changed from the base of the PR and between 0832d50 and ab2109a.

📒 Files selected for processing (4)
  • test/e2e-encryption-perf/encryption_perf.go
  • test/e2e-encryption-perf/encryption_perf_test.go
  • test/library/encryption/perf_helpers.go
  • test/library/encryption/scenarios.go
🚧 Files skipped from review as they are similar to previous changes (2)
  • test/e2e-encryption-perf/encryption_perf.go
  • test/e2e-encryption-perf/encryption_perf_test.go

@ropatil010

Copy link
Copy Markdown
Contributor Author

Overall, it looks like we're copying and adapting quite a lot of functions from library-go mainly because we're changing *testing.T to testing.TB. Is there a plan to eventually update these funcs in library-go as well, so that we don't have to copy code over for this change? If we're doing a global OTE migration, this should definitely be part of it (I'd even argue that we should have started there). This way we can reduce code duplication just for plumbing needs.

Thanks for the feedback, how ever i have copied the same contents of PR: #859 in this PR without any modifications.

Initiated discussion here: https://redhat-internal.slack.com/archives/C07RDCVEYJG/p1782475409270789

openshift-merge-bot Bot pushed a commit to openshift/library-go that referenced this pull request Jun 30, 2026
Change TestPerfEncryption and runTestEncryption to accept testing.TB
interface instead of *testing.T concrete type. This enables these
functions to be used with both standard Go tests and Ginkgo/OTE
framework tests.

The testing.TB interface is implemented by both *testing.T and
*testing.B, as well as Ginkgo's GinkgoTB. This change is 100%
backwards compatible - all existing callers passing *testing.T
will continue to work.

This eliminates the need for downstream operators to duplicate
these functions when migrating to the OpenShift Tests Extension
(OTE) framework. Currently, operators must copy ~400+ lines of
code from library-go just to change *testing.T to testing.TB.

Benefits:
- Enables OTE framework migration across OpenShift operators
- Reduces code duplication in downstream repos
- Maintains full backwards compatibility
- No behavior changes, only signature widening

Related: openshift/cluster-authentication-operator#926

Co-Authored-By: Rohit Patil <ropatil@redhat.com>
ropatil010 pushed a commit to ropatil010/cluster-authentication-operator that referenced this pull request Jun 30, 2026
Migrate encryption performance tests to support both standard Go tests
and Ginkgo/OTE framework, addressing reviewer feedback to eliminate
code duplication.

Changes:
1. Add Ginkgo test wrapper for OTE compatibility
2. Refactor to use testing.TB interface for dual-mode support
3. Update library-go to v0.0.0-20260630085645 (includes testing.TB support)
4. Remove duplicated library-go functions (432 lines):
   - test/library/encryption/scenarios.go (247 lines)
   - test/library/encryption/perf_helpers.go (185 lines)
5. Use library.TestPerfEncryption directly instead of local copy
6. Update vendor dependencies from library-go update

The test now works in both modes:
- Standard Go: TestPerfEncryptionTypeAESCBC(t *testing.T)
- Ginkgo/OTE: g.It(..., func(ctx) { testPerfEncryptionTypeAESCBC(ctx, g.GinkgoTB()) })

Addresses reviewer feedback from PR openshift#926 by removing code duplication
and using library-go's testing.TB-compatible functions.

Depends-on: openshift/library-go#2335

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 30, 2026
ropatil010 pushed a commit to ropatil010/cluster-authentication-operator that referenced this pull request Jun 30, 2026
Migrate encryption performance tests to support both standard Go tests
and Ginkgo/OTE framework, addressing reviewer feedback to eliminate
code duplication.

Changes:
1. Add Ginkgo test wrapper for OTE compatibility
2. Refactor to use testing.TB interface for dual-mode support
3. Update library-go to v0.0.0-20260630085645 (includes testing.TB support)
4. Remove duplicated library-go functions (432 lines):
   - test/library/encryption/scenarios.go (247 lines)
   - test/library/encryption/perf_helpers.go (185 lines)
5. Use library.TestPerfEncryption directly instead of local copy
6. Update vendor dependencies from library-go update

The test now works in both modes:
- Standard Go: TestPerfEncryptionTypeAESCBC(t *testing.T)
- Ginkgo/OTE: g.It(..., func(ctx) { testPerfEncryptionTypeAESCBC(ctx, g.GinkgoTB()) })

Addresses reviewer feedback from PR openshift#926 by removing code duplication
and using library-go's testing.TB-compatible functions.

Depends-on: openshift/library-go#2335

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 30, 2026
ropatil010 pushed a commit to ropatil010/cluster-authentication-operator that referenced this pull request Jun 30, 2026
Migrate encryption performance tests to support both standard Go tests
and Ginkgo/OTE framework, addressing reviewer feedback to eliminate
code duplication.

Changes:
1. Add Ginkgo test wrapper for OTE compatibility
2. Refactor to use testing.TB interface for dual-mode support
3. Update library-go to v0.0.0-20260630085645 (includes testing.TB support)
4. Remove duplicated library-go functions (432 lines):
   - test/library/encryption/scenarios.go (247 lines)
   - test/library/encryption/perf_helpers.go (185 lines)
5. Use library.TestPerfEncryption directly instead of local copy
6. Update vendor dependencies from library-go update

The test now works in both modes:
- Standard Go: TestPerfEncryptionTypeAESCBC(t *testing.T)
- Ginkgo/OTE: g.It(..., func(ctx) { testPerfEncryptionTypeAESCBC(ctx, g.GinkgoTB()) })

Addresses reviewer feedback from PR openshift#926 by removing code duplication
and using library-go's testing.TB-compatible functions.

Depends-on: openshift/library-go#2335

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
ropatil010 pushed a commit to ropatil010/cluster-authentication-operator that referenced this pull request Jun 30, 2026
Migrate encryption performance tests to support both standard Go tests
and Ginkgo/OTE framework, addressing reviewer feedback to eliminate
code duplication.

Changes:
1. Add Ginkgo test wrapper for OTE compatibility
2. Refactor to use testing.TB interface for dual-mode support
3. Update library-go to v0.0.0-20260630085645 (includes testing.TB support)
4. Remove duplicated library-go functions (432 lines):
   - test/library/encryption/scenarios.go (247 lines)
   - test/library/encryption/perf_helpers.go (185 lines)
5. Use library.TestPerfEncryption directly instead of local copy
6. Update vendor dependencies from library-go update

The test now works in both modes:
- Standard Go: TestPerfEncryptionTypeAESCBC(t *testing.T)
- Ginkgo/OTE: g.It(..., func(ctx) { testPerfEncryptionTypeAESCBC(ctx, g.GinkgoTB()) })

Addresses reviewer feedback from PR openshift#926 by removing code duplication
and using library-go's testing.TB-compatible functions.

Depends-on: openshift/library-go#2335

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Migrate encryption performance tests to support both standard Go tests
and Ginkgo/OTE framework, addressing reviewer feedback to eliminate
code duplication.

Changes:
1. Add Ginkgo test wrapper for OTE compatibility
2. Refactor to use testing.TB interface for dual-mode support
3. Update library-go to v0.0.0-20260630085645 (includes testing.TB support)
4. Remove duplicated library-go functions (432 lines):
   - test/library/encryption/scenarios.go (247 lines)
   - test/library/encryption/perf_helpers.go (185 lines)
5. Use library.TestPerfEncryption directly instead of local copy
6. Update vendor dependencies from library-go update

The test now works in both modes:
- Standard Go: TestPerfEncryptionTypeAESCBC(t *testing.T)
- Ginkgo/OTE: g.It(..., func(ctx) { testPerfEncryptionTypeAESCBC(ctx, g.GinkgoTB()) })

Addresses reviewer feedback from PR openshift#926 by removing code duplication
and using library-go's testing.TB-compatible functions.

Depends-on: openshift/library-go#2335

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@ropatil010

Copy link
Copy Markdown
Contributor Author

Hi @liouk Merged the dependency PR: #2335
Updated this PR accordingly. PTAL. Notified here as well: https://redhat-internal.slack.com/archives/CC3CZCQHM/p1782816690879119?thread_ts=1781885395.465479&cid=CC3CZCQHM

@openshift-ci

openshift-ci Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants