[OCPERT-210][hold]Add OTE (OpenShift Tests Extension) migration testing for single mode#727
[OCPERT-210][hold]Add OTE (OpenShift Tests Extension) migration testing for single mode#727ming1013 wants to merge 1 commit intoopenshift:masterfrom
Conversation
…ng for single mode
|
/hold |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@ming1013: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
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
Target Repository:
Sig Filter Tags: network-edge
Files Created/Modified
Generated Code
Test Files (Fully Automated)
Statistics
Next Steps
cd /home/minl/router/tests-extension
make build
This will generate bindata and build the binary to bin/router-tests-ext
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
Run all tests
./bin/router-tests-ext run
Run specific test
./bin/router-tests-ext run "test name pattern"
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
🤖 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:
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
- Replaced compat_otp.FixturePath() → testdata.FixturePath()
- Added testdata imports
- Added [OTP] annotations to all Describe blocks
- Created separate [Level0] Describe blocks
- Removed -LEVEL0- suffixes
📊 Migration Statistics
🚀 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