Skip to content

CNTRLPLANE-2532: Add OTE-compatible E2E test files#596

Merged
openshift-merge-bot[bot] merged 4 commits intoopenshift:mainfrom
ropatil010:add-otetests-tests
Jan 20, 2026
Merged

CNTRLPLANE-2532: Add OTE-compatible E2E test files#596
openshift-merge-bot[bot] merged 4 commits intoopenshift:mainfrom
ropatil010:add-otetests-tests

Conversation

@ropatil010
Copy link
Copy Markdown
Contributor

Hi Team,

Can you PTAL on this PR.
Changes:

  • Add cmd/run-once-duration-override-operator-tests-ext/dependencymagnet.go: Imports test packages to register Ginkgo tests with OTE framework

  • Add test/e2e/operator.go: Ginkgo test specs with shared test functions using testing.TB interface for dual compatibility

  • Replace test/e2e/operator_test.go: New standard Go test wrapper that calls shared functions from operator.go

  • Add test/e2e/helpers.go: Kubernetes client helpers and Init() function

Key features:

  • Uses testing.TB interface (setupOperator, testActiveDeadlineSecondsWebhook, cleanupTestNamespace)
  • Ginkgo specs use g.GinkgoTB(), standard Go tests use *testing.T

hold till the PR: #595 gets merged.
/hold
/assign @wangke19 @gangwgr @sandeepknd

@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 Jan 8, 2026
@ropatil010 ropatil010 changed the title Add OTE-compatible E2E test files following service-ca-operator pattern Add OTE-compatible E2E test files Jan 13, 2026
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2026
Add Ginkgo-based OTE (OpenShift Test Extended) framework tests alongside
the existing standard Go tests. This allows tests to run both via go test
and through the Ginkgo/OTE framework for OpenShift CI integration.

Changes:
- Refactor operator_test.go to use shared test logic
- Add operator.go with standalone test functions callable from both frameworks
- Add helpers.go with common setup and cleanup utilities
- Add dependencymagnet.go to ensure test dependencies are vendored

Co-Authored-By: Rohit Patil <ropatil@redhat.com>
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 15, 2026
@ropatil010 ropatil010 changed the title Add OTE-compatible E2E test files [CNTRLPLANE-2532]: Add OTE-compatible E2E test files Jan 15, 2026
@ropatil010
Copy link
Copy Markdown
Contributor Author

/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 15, 2026
@ropatil010
Copy link
Copy Markdown
Contributor Author

/test e2e-aws-operator

@ropatil010
Copy link
Copy Markdown
Contributor Author

/test-with openshift/release#73599

@ropatil010 ropatil010 changed the title [CNTRLPLANE-2532]: Add OTE-compatible E2E test files CNTRLPLANE-2532: Add OTE-compatible E2E test files Jan 16, 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 Jan 16, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented Jan 16, 2026

@ropatil010: This pull request references CNTRLPLANE-2532 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 "4.22.0" version, but no target version was set.

Details

In response to this:

Hi Team,

Can you PTAL on this PR.
Changes:

  • Add cmd/run-once-duration-override-operator-tests-ext/dependencymagnet.go: Imports test packages to register Ginkgo tests with OTE framework

  • Add test/e2e/operator.go: Ginkgo test specs with shared test functions using testing.TB interface for dual compatibility

  • Replace test/e2e/operator_test.go: New standard Go test wrapper that calls shared functions from operator.go

  • Add test/e2e/helpers.go: Kubernetes client helpers and Init() function

Key features:

  • Uses testing.TB interface (setupOperator, testActiveDeadlineSecondsWebhook, cleanupTestNamespace)
  • Ginkgo specs use g.GinkgoTB(), standard Go tests use *testing.T

hold till the PR: #595 gets merged.
/hold
/assign @wangke19 @gangwgr @sandeepknd

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

Fix: operator.go

With Pipeline thing,

  1. The pipeline imagestream is job-specific and exists on the build registry (e.g., registry.build05.ci.openshift.org)
  2. It requires authentication that the test pods don't have
  3. It's temporary and only available during the CI job executio

Failure logs:
https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_run-once-duration-override-operator/596/pull-ci-openshift-run-once-duration-override-operator-main-e2e-aws-operator/2011813592671719424/artifacts/e2e-aws-operator/test/build-log.txt

Reason:

oc describe pod/run-once-duration-override-operator-7fb57c885b-sp5js -n openshift-run-once-duration-override-operator
Events:
  Type     Reason          Age                    From               Message
  ----     ------          ----                   ----               -------
  Normal   Scheduled       6m44s                  default-scheduler  Successfully assigned openshift-run-once-duration-override-operator/run-once-duration-override-operator-7fb57c885b-sp5js to ip-10-0-39-150.us-east-2.compute.internal
  Normal   AddedInterface  6m44s                  multus             Add eth0 [10.131.0.23/23] from ovn-kubernetes
  Normal   Pulling         3m57s (x5 over 6m44s)  kubelet            Pulling image "registry.build05.ci.openshift.org/test-namespace/pipeline:run-once-duration-override-operator"
  Warning  Failed          3m57s (x5 over 6m44s)  kubelet            Failed to pull image "registry.build05.ci.openshift.org/test-namespace/pipeline:run-once-duration-override-operator": unable to pull image or OCI artifact: pull image err: initializing source docker://registry.build05.ci.openshift.org/test-namespace/pipeline:run-once-duration-override-operator: reading manifest run-once-duration-override-operator in registry.build05.ci.openshift.org/test-namespace/pipeline: authentication required; artifact err: get manifest: build image source: reading manifest run-once-duration-override-operator in registry.build05.ci.openshift.org/test-namespace/pipeline: authentication required
  Warning  Failed          3m57s (x5 over 6m44s)  kubelet            Error: ErrImagePull
  Normal   BackOff         94s (x21 over 6m43s)   kubelet            Back-off pulling image "registry.build05.ci.openshift.org/test-namespace/pipeline:run-once-duration-override-operator"
  Warning  Failed          94s (x21 over 6m43s)   kubelet            Error: ImagePullBackOff

Fix:
We replaced the hardcoded pipeline with the dynamically detected OCP version (4.22), and changed the registry to registry.ci.openshift.org where the actual published operator images are stored
This uses the publicly accessible, version-specific imagestream instead of the job-specific pipeline imagestream

@ropatil010
Copy link
Copy Markdown
Contributor Author

Can you PTAL when ever get a chance. Thanks in adv!
cc: @wangke19 @ardaguclu @ingvagabund

@ingvagabund
Copy link
Copy Markdown
Member

@ropatil010 is the new test still testing the image built through the CI? I.e. does the tested image contains the changes from a PR?

@ingvagabund
Copy link
Copy Markdown
Member

Fix:
We replaced the hardcoded pipeline with the dynamically detected OCP version (4.22), and changed the registry to registry.ci.openshift.org where the actual published operator images are stored
This uses the publicly accessible, version-specific imagestream instead of the job-specific pipeline imagestream

Checking the CI artifacts the following operator images is used: registry.ci.openshift.org/ocp/4.22:run-once-duration-override-operator. The e2e test was introduced to test a PR before it gets merged. This seems to remove the pre-merge check.

@ingvagabund
Copy link
Copy Markdown
Member

The mentioned e2e still needs to run over the CI job built operator image.

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jan 19, 2026

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

@ropatil010
Copy link
Copy Markdown
Contributor Author

Hi @ingvagabund. Reverted back the fix.

Used the image built through the CI job:
./cluster-scoped-resources/core/nodes/ip-10-0-9-232.us-east-2.compute.internal.yaml:297: - registry.build05.ci.openshift.org/ci-op-kxdzqsq5/pipeline:run-once-duration-override-operator

Logs:
https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/openshift_run-once-duration-override-operator/596/pull-ci-openshift-run-once-duration-override-operator-main-e2e-aws-operator/2013269295584251904/artifacts/e2e-aws-operator/test/build-log.txt

@ingvagabund
Copy link
Copy Markdown
Member

"image": "registry.build05.ci.openshift.org/ci-op-kxdzqsq5/pipeline:run-once-duration-override-operator",

Looks good now
/approve
/lgtm

@ingvagabund
Copy link
Copy Markdown
Member

/verified by ci/prow/e2e-aws-operator

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

@ingvagabund: This PR has been marked as verified by ci/prow/e2e-aws-operator.

Details

In response to this:

/verified by ci/prow/e2e-aws-operator

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 openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jan 20, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Jan 20, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ingvagabund, ropatil010

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 Jan 20, 2026
@openshift-merge-bot openshift-merge-bot Bot merged commit b9712c0 into openshift:main Jan 20, 2026
7 checks passed
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.

7 participants