Skip to content

Conversation

@ming1013
Copy link

@ming1013 ming1013 commented Dec 15, 2025

Tested by:

$ tests-extension/router list | grep -F '"name": "[sig-' |wc -l
7742

Part of automated migration OTE tool log:

Migration Complete! 🎉

I've successfully migrated your router component to the OpenShift Tests
Extension (OTE) framework. Here's what was done:

What Was Created

A new tests-extension/ directory in your router repository containing:

  • 23 test files from openshift-tests-private/test/extended/router/
  • 74 testdata files from
    openshift-tests-private/test/extended/testdata/router/
  • Complete OTE integration with:
    • cmd/main.go - Extension entry point
    • go.mod - Properly configured with all dependencies
    • Makefile and bindata.mk - Build automation
    • test/testdata/fixtures.go - Testdata helper functions

Key Features

  • 223 router component tests discovered (out of 7,742 total including k8s
    tests)
  • Platform filters automatically applied based on test labels
  • Testdata embedded using go-bindata
  • Build verified and working

Critical Fix Applied

I discovered and fixed a Ginkgo version incompatibility issue by adding the
OpenShift Ginkgo fork replace directive:
github.com/onsi/ginkgo/v2 => github.com/openshift/onsi-ginkgo/v2
v2.6.1-0.20241205171354-8006f302fd12

Quick Start

cd tests-extension

Build the extension
make build

List all tests
./router list

Run tests
./router run

The complete migration summary with all details, troubleshooting tips, and
customization options is provided above. You're ready to integrate this into
your CI/CD pipeline!

Directory structure:

/home/minl/router/ # Working directory
└── tests-extension/ # Isolated test extension directory
├── cmd/
│ └── main.go # OTE entry point
├── test/
│ ├── e2e/ # Test files
│ │ └── *.go (23 files)
│ └── testdata/ # Testdata files
│ ├── bindata.go # Generated
│ └── fixtures.go # Wrapper functions
├── go.mod # Single module
├── go.sum
├── Makefile # Build targets
└── bindata.mk # Bindata generation

@ming1013
Copy link
Author

Need more testing
/hold

@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 Dec 15, 2025
@openshift-ci openshift-ci bot requested review from ironcladlou and rikatz December 15, 2025 08:18
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 15, 2025

[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 rikatz 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

@ming1013
Copy link
Author

# Build extension binary
.PHONY: build
build: bindata
go build -o router ./cmd

Choose a reason for hiding this comment

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

we'd better to put the compiled binary file to ./bin/router-test

Copy link
Author

Choose a reason for hiding this comment

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

I'm working on fixing this in single mode, but I have question about the compiled binary file in multi-mode, where we put it when there is no bin directory in target repo? Shall we create a bin directory or not?

Choose a reason for hiding this comment

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

I think it's not a problem, we can create bin dir under root dir, the user can modify the make file if they want

go build -o router ./cmd

# Run tests
.PHONY: test

Choose a reason for hiding this comment

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

Is this target useful, I don't think we have Golang test under this dir


# Clean generated files
.PHONY: clean
clean: clean-bindata

Choose a reason for hiding this comment

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

the target dependency looks incorrect, here we only need to clean up all the binaries. bindata cleanup should be invoked in bindata target before compiling test templates

@rioliu-rh
Copy link

rioliu-rh commented Dec 15, 2025

the changes in root Makefile is missed, i.e. compile router test extension in a builder stage, compress it with gzip and copy it to router image

@ming1013 ming1013 changed the title Add OpenShift Tests Extension (OTE) integration by using the automated migration OTE tool [OCPERT-210] Add OpenShift Tests Extension (OTE) integration by using the automated migration OTE tool Dec 15, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 15, 2025

@ming1013: The following tests 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/e2e-aws-serial-1of2 117f5fb link true /test e2e-aws-serial-1of2
ci/prow/e2e-agnostic 117f5fb link true /test e2e-agnostic
ci/prow/e2e-aws-serial-2of2 117f5fb link true /test e2e-aws-serial-2of2
ci/prow/e2e-upgrade 117f5fb link true /test e2e-upgrade
ci/prow/verify 117f5fb 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.

2 participants