Skip to content

AGENT-1517: move helpers in iri e2e main test - #6159

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
andfasano:fix-iri-e2e-helpers
Jun 11, 2026
Merged

AGENT-1517: move helpers in iri e2e main test#6159
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
andfasano:fix-iri-e2e-helpers

Conversation

@andfasano

@andfasano andfasano commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

- What I did
Moved test helpers in a common place to allow running both IRI standard and deletion tests.

Required by openshift/release#79305

Summary by CodeRabbit

  • Tests

    • Added e2e test gating to skip IRI tests on non-bare-metal clusters and when running in CI environments.
  • Refactor

    • Reorganized and consolidated test helpers across files for clearer test structure and maintenance.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@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 9, 2026
@openshift-ci-robot

openshift-ci-robot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@andfasano: This pull request references AGENT-1517 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 story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

- What I did
Moved test helpers in a common place to allow running both IRI standard and deletion tests.

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.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: f23726ff-33b4-48a2-90f5-54db11a33270

📥 Commits

Reviewing files that changed from the base of the PR and between aa5c423 and 2f47b96.

📒 Files selected for processing (2)
  • test/e2e-iri/iri_test.go
  • test/e2e-iri/main_test.go
💤 Files with no reviewable changes (1)
  • test/e2e-iri/iri_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/e2e-iri/main_test.go

Walkthrough

Test helpers skipIfNoBaremetal and skipIfOpenShiftCI are moved from iri_test.go to main_test.go; iri_test.go drops the duplicate helper implementations and the now-unused os and configv1 imports.

Changes

Test Helper Consolidation

Layer / File(s) Summary
Add consolidated helpers to main_test.go
test/e2e-iri/main_test.go
Import testify/require and add skipIfNoBaremetal (queries Infrastructure platform type, asserts lookup with require.NoError, skips unless platform is bare metal) and skipIfOpenShiftCI (skips when OPENSHIFT_CI or CI env vars are set).
Remove duplicate helpers from iri_test.go
test/e2e-iri/iri_test.go
Remove local skipIfNoBaremetal and skipIfOpenShiftCI implementations and delete unused os and configv1 imports; existing tests now rely on the shared helpers.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested labels

lgtm, verified

Suggested reviewers

  • bfournie
🚥 Pre-merge checks | ✅ 12 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Single Node Openshift (Sno) Test Compatibility ⚠️ Warning Tests assume multi-node clusters: TestIRIController_VerifyIRIRegistryOnAllTheMasterNodes_NoCert iterates over master nodes; TestMachineConfigNodesStatus lists all nodes without SNO protection. Add [Skipped:SingleReplicaTopology] label to tests or guard with exutil.IsSingleNode()/configv1.SingleReplicaTopologyMode check to skip on SNO.
Test Structure And Quality ❓ Inconclusive Check specifies Ginkgo test quality requirements, but the code is standard Go testing (func TestName(t *testing.T)), not Ginkgo tests. The check instructions are misaligned with code structure. Clarify if check applies to standard Go tests. If so, adapt criteria: use helper functions instead of BeforeEach/AfterEach, assess func patterns instead of It blocks.
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: moving helper functions from one test file to a common location (main_test.go) in the IRI e2e test suite.
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 All test names in the PR use static, descriptive strings with no dynamic information. The PR only moves helper functions without modifying test declarations.
Microshift Test Compatibility ✅ Passed This PR only moves existing helper functions to main_test.go; no new Ginkgo test declarations (It, Describe, Context, When) are added. The check applies only to new tests, making this PR out of scope.
Topology-Aware Scheduling Compatibility ✅ Passed PR modifies only test files (test/e2e-iri/) with helper functions for test gating. No deployment manifests, operator code, or controllers were modified; no scheduling constraints introduced.
Ote Binary Stdout Contract ✅ Passed TestMain function writes to os.Stderr only. Helper functions are test-scoped with t.Skip() calls. No stdout contract violations detected in the new code.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests are added in this PR. The PR only refactors helper functions by moving them from iri_test.go to main_test.go. The custom check is only applicable when new tests are introduced.
No-Weak-Crypto ✅ Passed PR only moves test helper functions with no cryptographic operations; no weak crypto algorithms, custom implementations, or secret comparisons are introduced.
Container-Privileges ✅ Passed PR contains only Go test file modifications; no container/K8s manifests present to check for privileged container configurations.
No-Sensitive-Data-In-Logs ✅ Passed No sensitive data patterns found in test helpers. Code only logs generic Kubernetes API errors that are unlikely to expose passwords, tokens, or PII.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@andfasano

Copy link
Copy Markdown
Contributor Author

/test ?

@openshift-ci
openshift-ci Bot requested review from bfournie and zaneb June 9, 2026 11:47
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 9, 2026
@andfasano

Copy link
Copy Markdown
Contributor Author

/test e2e-agent-compact-ipv4-iso-no-registry

@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: 1

🤖 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-iri/main_test.go`:
- Line 50: The test fails to compile because skipIfNoBaremetal references
configv1.BareMetalPlatformType but configv1 is not imported; update the imports
for test/e2e-iri/main_test.go to include the configv1 package and then use it in
the existing check (skipIfNoBaremetal) that reads
infra.Status.PlatformStatus.Type against configv1.BareMetalPlatformType so the
type is resolved during build.
🪄 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: 2007f616-1f78-4fdc-abab-322d8f82f0d9

📥 Commits

Reviewing files that changed from the base of the PR and between 1e2bb8b and aa5c423.

📒 Files selected for processing (2)
  • test/e2e-iri/iri_test.go
  • test/e2e-iri/main_test.go
💤 Files with no reviewable changes (1)
  • test/e2e-iri/iri_test.go

Comment thread test/e2e-iri/main_test.go
@andfasano

Copy link
Copy Markdown
Contributor Author

/retest-required

@andfasano
andfasano force-pushed the fix-iri-e2e-helpers branch from aa5c423 to 2f47b96 Compare June 10, 2026 06:54
@andfasano

Copy link
Copy Markdown
Contributor Author

/retest

@andfasano

Copy link
Copy Markdown
Contributor Author

/test e2e-agent-compact-ipv4-iso-no-registry

@pawanpinjarkar

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 10, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-aws-ovn
/test e2e-aws-ovn-upgrade
/test e2e-gcp-op-ocl-part1
/test e2e-gcp-op-ocl-part2
/test e2e-gcp-op-part1
/test e2e-gcp-op-part2
/test e2e-gcp-op-single-node
/test e2e-hypershift

@openshift-ci

openshift-ci Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andfasano, pawanpinjarkar

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

@andfasano

Copy link
Copy Markdown
Contributor Author

/verified @by andfasano

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@andfasano: /verified by <reason> requires at least one verification method to be identified (it can be a comma delimited list). It can specify a test name or a GitHub @username (an engineer that performed the pre-merge verification). See https://docs.ci.openshift.org/docs/architecture/jira/#premerge-verification for more information.

Details

In response to this:

/verified @by andfasano

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.

@andfasano

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-ovn

1 similar comment
@andfasano

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-ovn

@andfasano

Copy link
Copy Markdown
Contributor Author

/verified by @andfasano

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jun 11, 2026
@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@andfasano: This PR has been marked as verified by @andfasano.

Details

In response to this:

/verified by @andfasano

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.

@andfasano

Copy link
Copy Markdown
Contributor Author

/test unit

@openshift-ci

openshift-ci Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

@openshift-merge-bot
openshift-merge-bot Bot merged commit 6fdcc18 into openshift:main Jun 11, 2026
18 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.

3 participants