Skip to content

[OCPERT-210][hold]Add OTE (OpenShift Tests Extension) migration testing for single mode#727

Open
ming1013 wants to merge 1 commit intoopenshift:masterfrom
ming1013:minl_ote_test_v2
Open

[OCPERT-210][hold]Add OTE (OpenShift Tests Extension) migration testing for single mode#727
ming1013 wants to merge 1 commit intoopenshift:masterfrom
ming1013:minl_ote_test_v2

Conversation

@ming1013
Copy link

@ming1013 ming1013 commented Feb 6, 2026

OTE Migration Complete! 🎉

Summary

Successfully migrated router to OpenShift Tests Extension (OTE) framework using single-module strategy.

Created Structure

/home/minl/router/ # Target repository root
├── tests-extension/ # Isolated test extension directory
│ ├── cmd/
│ │ └── main.go # OTE entry point
│ ├── bin/
│ │ └── router-tests-ext # Extension binary (created by make)
│ ├── test/
│ │ └── e2e/ # Test files
│ │ ├── go.mod # Test module go.mod
│ │ ├── go.sum
│ │ ├── *.go # 23 test files
│ │ ├── bindata.mk # Bindata generation
│ │ └── testdata/ # Testdata files
│ │ ├── fixtures.go # Wrapper functions
│ │ ├── bindata.go # Generated (not in git)
│ │ └── router/ # 74 testdata files
│ ├── go.mod # Single module
│ ├── go.sum
│ └── Makefile # Build targets
├── Makefile # Root Makefile (updated with OTE targets)
└── Dockerfile.ote # OTE binary build Dockerfile

Configuration

Extension: router
Strategy: Single-module (isolated directory)
Working Directory: /home/minl

Source Repository: git@github.com:openshift/openshift-tests-private.git

  • Local Path: /home/minl/openshift-tests-private
  • Test Subfolder: test/extended/router/
  • Testdata Subfolder: test/extended/testdata/router/

Target Repository:

  • Local Path: /home/minl/router
  • Current branch: minl_ote_test_v2

Sig Filter Tags: network-edge

Files Created/Modified

Generated Code

  • ✅ tests-extension/cmd/main.go - OTE entry point with filters and hooks
  • ✅ tests-extension/bin/router-tests-ext - Extension binary
  • ✅ tests-extension/test/e2e/testdata/fixtures.go - Testdata wrapper functions
  • ✅ tests-extension/go.mod - Go module with OTE dependencies
  • ✅ tests-extension/go.sum - Dependency checksums
  • ✅ tests-extension/Makefile - Build targets
  • ✅ tests-extension/test/e2e/bindata.mk - Bindata generation rules
  • ✅ Makefile (updated) - Added OTE targets (tests-ext-build, tests-ext-compress, etc.)
  • ✅ Dockerfile.ote - OTE binary build Dockerfile

Test Files (Fully Automated)

  • ✅ Copied 23 test files to tests-extension/test/e2e/
  • ✅ Copied 74 testdata files to tests-extension/test/e2e/testdata/router/
  • ✅ Automatically replaced compat_otp.FixturePath() → testdata.FixturePath()
  • ✅ Automatically added imports: github.com/openshift/router-tests-extension/test/e2e/testdata
  • ✅ Automatically added [OTP] annotations to all Describe blocks
  • ✅ Automatically created separate [Level0] Describe blocks for Level0 tests
  • ✅ Automatically removed -LEVEL0- suffix from test names

Statistics

  • Test files: 23 files
  • Testdata files: 74 files
  • Test filtering: Only tests with [sig-network-edge] tag are included
  • Test suites: 1 main suite (openshift/router/tests)
  • Lifecycle: All tests set to Informing (won't block CI on failure)

Next Steps

  1. Build Extension

cd /home/minl/router/tests-extension
make build

This will generate bindata and build the binary to bin/router-tests-ext

  1. Validate Tests

List all discovered tests

./bin/router-tests-ext list

Run tests in dry-run mode

./bin/router-tests-ext run --dry-run

Test platform filtering

./bin/router-tests-ext run --platform=aws --dry-run

  1. Run Tests

Run all tests

./bin/router-tests-ext run

Run specific test

./bin/router-tests-ext run "test name pattern"

  1. Commit Changes

The migration created the following files ready to commit:

cd /home/minl/router
git add tests-extension/
git add Makefile
git add Dockerfile.ote
git commit -m "Migrate router tests to OTE framework

  • Created tests-extension/ with single-module strategy
  • Migrated 23 test files with [sig-network-edge] tag
  • Migrated 74 testdata files
  • Added [OTP] annotations to all tests
  • Created separate [Level0] Describe blocks for Level0 tests
  • Updated ginkgo to latest compatible version
  • Binary built and tested successfully

🤖 Generated with Claude Code"

Important Notes

Ginkgo Version Update

The migration automatically updated ginkgo to the latest version from the v2.27.2-openshift-4.22 branch to fix API compatibility issues:

  • Old version: v2.6.1-0.20240806135314-3946b2b7b2a8
  • New version: v2.6.1-0.20251120221002-696928a6a0d7

This ensures compatibility with OTE framework APIs (ginkgo.NewWriter, TestSpec.Labels, etc.).

Test Lifecycle (Informing by Default)

All migrated tests are set to "informing" - they will run but won't block CI on failure. This is the recommended setting for newly migrated tests.

To change lifecycle settings, edit tests-extension/cmd/main.go:

// Make Level0 tests blocking, all others informing
specs.Walk(func(spec *et.ExtensionTestSpec) {
if strings.Contains(spec.Name, "[Level0]") {
spec.Lifecycle = et.LifecycleBlocking
} else {
spec.Lifecycle = et.LifecycleInforming
}
})

Resources


Migration completed successfully! All phases automated with zero manual intervention required. 🎉

● 🎉 Migration Complete!

I've successfully completed the fully automated OTE migration for your router component! Here's what was accomplished:

✅ All 7 Phases Completed Automatically

  1. User Input Collection - Gathered all configuration (single-module strategy, router extension, network-edge sig tag)
  2. Repository Setup - Configured source and target repositories
  3. Structure Creation - Created tests-extension/ directory with proper layout
  4. Code Generation - Generated all necessary files (main.go, Makefile, go.mod, fixtures.go, bindata.mk, Dockerfile.ote)
  5. Test Migration - Migrated 23 test files with automated transformations:
    - Replaced compat_otp.FixturePath() → testdata.FixturePath()
    - Added testdata imports
    - Added [OTP] annotations to all Describe blocks
    - Created separate [Level0] Describe blocks
    - Removed -LEVEL0- suffixes
  6. Dependency Resolution - Updated ginkgo to fix API compatibility issues
  7. Build Verification - Binary built and tested successfully ✅

📊 Migration Statistics

  • 23 test files migrated with [sig-network-edge] tag
  • 74 testdata files copied to testdata/router/
  • All validations passed (OTP tags, Level0 annotations, imports)
  • Binary executes correctly - ready for testing

🚀 Quick Start

cd /home/minl/router/tests-extension

Build (already done, but you can rebuild)

make build

List tests

./bin/router-tests-ext list

Run tests

./bin/router-tests-ext run

📝 Ready to Commit

All files are ready to commit on branch minl_ote_test_v2. The migration created a complete, working OTE extension with zero manual intervention required!

Tested by:

$ ./tests-extension/bin/router-tests-ext list | grep "sig-"
"name": "[sig-network-edge][OTP] Network_Edge Component_ALBO Author:hongli-ROSA-OSD_CCS-ConnectedOnly-Medium-51191-Provision ALB by creating an ingress [Serial]",
"name": "[sig-network-edge][OTP][Level0] Network_Edge Component_ALBO Author:hongli-ROSA-OSD_CCS-ConnectedOnly-High-51189-Install aws-load-balancer-operator and controller [Serial]",

$ ./tests-extension/bin/router-tests-ext list | grep "sig-" | wc -l
293

$ ./tests-extension/bin/router-tests-ext run-test "[sig-network-edge][OTP][Level0] Network_Edge Component_Router Author:shudili-High-55367-Default HAProxy maxconn value to 50000 for OCP 4.12 and later"
I0207 00:42:45.429728 1541858 test_context.go:567] The --provider flag is not set. Continuing as if --provider=skeleton had been used.
Running Suite: - /home/minl/router

Random Seed: 1770396165 - will randomize all specs

Will run 1 of 1 specs

[sig-network-edge][OTP][Level0] Network_Edge Component_Router Author:shudili-High-55367-Default HAProxy maxconn value to 50000 for OCP 4.12 and later
/home/minl/router/tests-extension/test/e2e/tuning.go:634
STEP: Creating a kubernetes client @ 02/07/26 00:42:45.794
I0207 00:42:52.125010 1541858 client.go:293] configPath is now "/tmp/configfile337121405"
I0207 00:42:52.125096 1541858 client.go:368] The user is now "e2e-test-router-tunning-s644s-user"
I0207 00:42:52.125129 1541858 client.go:370] Creating project "e2e-test-router-tunning-s644s"
I0207 00:42:52.532307 1541858 client.go:378] Waiting on permissions in project "e2e-test-router-tunning-s644s" ...
I0207 00:42:54.132280 1541858 client.go:407] DeploymentConfig capability is enabled, adding 'deployer' SA to the list of default SAs
I0207 00:42:54.540977 1541858 client.go:422] Waiting for ServiceAccount "default" to be provisioned...
I0207 00:42:55.336383 1541858 client.go:422] Waiting for ServiceAccount "builder" to be provisioned...
I0207 00:42:56.215032 1541858 client.go:422] Waiting for ServiceAccount "deployer" to be provisioned...
I0207 00:42:57.034649 1541858 client.go:432] Waiting for RoleBinding "system:image-pullers" to be provisioned...
I0207 00:42:57.817101 1541858 client.go:432] Waiting for RoleBinding "system:image-builders" to be provisioned...
I0207 00:42:58.570205 1541858 client.go:432] Waiting for RoleBinding "system:deployers" to be provisioned...
I0207 00:43:01.196669 1541858 client.go:469] Project "e2e-test-router-tunning-s644s" has been fully provisioned.
STEP: Create an custom ingresscontroller for testing ROUTER_MAX_CONNECTIONS 02/07/26 00:43:01.207
STEP: Create an custom ingresscontroller for testing ROUTER_MAX_CONNECTIONS @ 02/07/26 00:43:01.207
I0207 00:43:02.647680 1541858 util.go:205] the base domain of the cluster: minl02061.qe.devcluster.openshift.com
I0207 00:43:04.271468 1541858 util.go:252] Linux worker node details are:
NAME STATUS ROLES AGE VERSION
ip-10-0-15-109.us-east-2.compute.internal Ready worker 3h13m v1.33.6
ip-10-0-34-119.us-east-2.compute.internal Ready worker 3h19m v1.33.6
ip-10-0-93-134.us-east-2.compute.internal Ready worker 3h20m v1.33.6
I0207 00:43:04.271661 1541858 util.go:253] Available linux worker node count is: 3
I0207 00:43:15.242405 1541858 util.go:287] the file of resource is /tmp/e2e-test-router-tunning-s644s-zlryuky2-temp-resource.json
ingresscontroller.operator.openshift.io/ocp55367 created
I0207 00:43:18.393371 1541858 util.go:369] Get the deployment generation is: 1
I0207 00:43:18.393495 1541858 util.go:371] The router deployment generation is updated to 1
STEP: Check default value of ROUTER_MAX_CONNECTIONS env in a route pod, which shouldn't appear in it 02/07/26 00:43:18.393
STEP: Check default value of ROUTER_MAX_CONNECTIONS env in a route pod, which shouldn't appear in it @ 02/07/26 00:43:18.393
I0207 00:43:21.386417 1541858 util.go:352] the new ReplicaSet labels is pod-template-hash=688cc8b468
I0207 00:43:28.239452 1541858 util.go:382] the Ready status of pod is True
I0207 00:43:29.879271 1541858 util.go:332] the one pod with label pod-template-hash=688cc8b468 is router-ocp55367-688cc8b468-vlvqf
I0207 00:43:35.306903 1541858 client.go:1094] Error running oc --kubeconfig=/home/minl/openshift/auth/kubeconfig/kubeconfig exec -n openshift-ingress router-ocp55367-688cc8b468-vlvqf -- bash -c /usr/bin/env | grep ROUTER_MAX_CONNECTIONS:
StdOut>
command terminated with exit code 1
StdErr>
command terminated with exit code 1

STEP: Check maxconn in haproxy.config which should be 50000 02/07/26 00:43:35.307
STEP: Check maxconn in haproxy.config which should be 50000 @ 02/07/26 00:43:35.307
I0207 00:43:35.307497 1541858 util.go:619] Polling and search haproxy config file
I0207 00:43:45.896412 1541858 util.go:769] The block configuration in haproxy that matching "maxconn" is:
maxconn 50000

I0207 00:43:45.896470 1541858 util.go:624] Found the given string maxconn 50000 in haproxy.config
I0207 00:43:45.896494 1541858 util.go:627] All the given strings are found in haproxy.config
I0207 00:43:45.896526 1541858 util.go:639] The part of haproxy.config that matching "maxconn" is:
maxconn 50000

STEP: Patch tuningOptions/maxConnections with null to the ingress-controller 02/07/26 00:43:45.896
STEP: Patch tuningOptions/maxConnections with null to the ingress-controller @ 02/07/26 00:43:45.896
I0207 00:43:47.469195 1541858 util.go:554] the output filtered by jsonpath is: 1
ingresscontroller.operator.openshift.io/ocp55367 patched
I0207 00:43:51.467884 1541858 util.go:554] the output filtered by jsonpath is: 1
STEP: Check ROUTER_MAX_CONNECTIONS env in a route pod which shouldn't appear in it by default 02/07/26 00:43:51.468
STEP: Check ROUTER_MAX_CONNECTIONS env in a route pod which shouldn't appear in it by default @ 02/07/26 00:43:51.468
I0207 00:43:53.079141 1541858 util.go:587] the result of router pod name: router-ocp55367-688cc8b468-vlvqf
I0207 00:43:58.658508 1541858 client.go:1094] Error running oc --kubeconfig=/home/minl/openshift/auth/kubeconfig/kubeconfig exec -n openshift-ingress router-ocp55367-688cc8b468-vlvqf -- bash -c /usr/bin/env | grep ROUTER_MAX_CONNECTIONS:
StdOut>
command terminated with exit code 1
StdErr>
command terminated with exit code 1

STEP: Check maxconn in haproxy.config which should be 50000 02/07/26 00:43:58.659
STEP: Check maxconn in haproxy.config which should be 50000 @ 02/07/26 00:43:58.659
I0207 00:43:58.659245 1541858 util.go:619] Polling and search haproxy config file
I0207 00:44:09.099181 1541858 util.go:769] The block configuration in haproxy that matching "maxconn" is:
maxconn 50000

I0207 00:44:09.099245 1541858 util.go:624] Found the given string maxconn 50000 in haproxy.config
I0207 00:44:09.099266 1541858 util.go:627] All the given strings are found in haproxy.config
I0207 00:44:09.099296 1541858 util.go:639] The part of haproxy.config that matching "maxconn" is:
maxconn 50000

STEP: Patch tuningOptions/maxConnections 50000 to the ingress-controller 02/07/26 00:44:09.099
STEP: Patch tuningOptions/maxConnections 50000 to the ingress-controller @ 02/07/26 00:44:09.099
ingresscontroller.operator.openshift.io/ocp55367 patched
I0207 00:44:12.473999 1541858 util.go:369] Get the deployment generation is: 2
I0207 00:44:12.474067 1541858 util.go:371] The router deployment generation is updated to 2
STEP: Check ROUTER_MAX_CONNECTIONS env in a route pod which should be 500000 02/07/26 00:44:12.474
STEP: Check ROUTER_MAX_CONNECTIONS env in a route pod which should be 500000 @ 02/07/26 00:44:12.474
I0207 00:44:15.375652 1541858 util.go:352] the new ReplicaSet labels is pod-template-hash=c5746c8b
I0207 00:44:21.945776 1541858 util.go:382] the Ready status of pod is True
I0207 00:44:23.539027 1541858 util.go:332] the one pod with label pod-template-hash=c5746c8b is router-ocp55367-c5746c8b-x95vl
I0207 00:44:28.656970 1541858 util.go:606] the matched Env are:
ROUTER_MAX_CONNECTIONS=500000
STEP: Check maxconn in haproxy.config which should be 50000 02/07/26 00:44:28.657
STEP: Check maxconn in haproxy.config which should be 50000 @ 02/07/26 00:44:28.657
I0207 00:44:28.657134 1541858 util.go:619] Polling and search haproxy config file
I0207 00:44:39.073322 1541858 util.go:769] The block configuration in haproxy that matching "maxconn" is:
maxconn 500000

I0207 00:44:39.073383 1541858 util.go:624] Found the given string maxconn 50000 in haproxy.config
I0207 00:44:39.073407 1541858 util.go:627] All the given strings are found in haproxy.config
I0207 00:44:39.073435 1541858 util.go:639] The part of haproxy.config that matching "maxconn" is:
maxconn 500000

ingresscontroller.operator.openshift.io "ocp55367" deleted
I0207 00:45:29.574672 1541858 client.go:689] Deleted {user.openshift.io/v1, Resource=users e2e-test-router-tunning-s644s-user}, err:
I0207 00:45:29.926420 1541858 client.go:689] Deleted {oauth.openshift.io/v1, Resource=oauthclients e2e-client-e2e-test-router-tunning-s644s}, err:
I0207 00:45:30.291253 1541858 client.go:689] Deleted {oauth.openshift.io/v1, Resource=oauthaccesstokens sha256~pY5X05IRqP6A-U88Dt4h36UtemgX7ekJwCDkqcp-CF0}, err:
STEP: Destroying namespace "e2e-test-router-tunning-s644s" for this suite. @ 02/07/26 00:45:30.291
• [164.846 seconds]

Ran 1 of 1 Specs in 164.846 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped

@ming1013
Copy link
Author

ming1013 commented Feb 6, 2026

/hold

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 6, 2026

[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 assign bentito for approval. 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

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 6, 2026
@ming1013
Copy link
Author

ming1013 commented Feb 6, 2026

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 6, 2026

@ming1013: 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/verify 781fa49 link true /test verify

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

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant