Skip to content

NO-JIRA: fix: importing nutanix test to in the binary#1491

Open
abhay-nutanix wants to merge 1 commit intoopenshift:mainfrom
abhay-nutanix:nutanixTest
Open

NO-JIRA: fix: importing nutanix test to in the binary#1491
abhay-nutanix wants to merge 1 commit intoopenshift:mainfrom
abhay-nutanix:nutanixTest

Conversation

@abhay-nutanix
Copy link
Copy Markdown
Contributor

@abhay-nutanix abhay-nutanix commented Apr 20, 2026

Summary
This PR fixes the integration of Nutanix multi-subnet E2E tests into the machine-api-tests-ext binary and resolves a variable assignment issue in the test logic.

Changes Made

  1. Fixed Missing Test Import (cmd/machine-api-tests-ext/main.go)
    Added missing import for Nutanix E2E tests: _ "github.com/openshift/machine-api-operator/test/e2e/nutanix"
    This ensures that the comprehensive Nutanix multi-subnet test suite is properly included in the extended test binary
    Without this import, the tests would not be discoverable or executable via the test extension framework
  2. Corrected Variable Assignment (test/e2e/nutanix/multi-subnet.go)
    Fixed incorrect use of append() when assigning failure domains to machineNetworks
    Changed from: machineNetworks = append(machineNetworks, infra.Spec.PlatformSpec.Nutanix.FailureDomains...)
    Changed to: machineNetworks = infra.Spec.PlatformSpec.Nutanix.FailureDomains
    This prevents potential duplication of failure domains if the variable was previously initialized

Summary by CodeRabbit

  • Tests
    • Added end-to-end test support for Nutanix platform deployments
    • Fixed Nutanix multi-subnet test setup to correctly initialize network failure domain configuration

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Apr 20, 2026
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

@abhay-nutanix: This pull request explicitly references no jira issue.

Details

In response to this:

Summary
This PR fixes the integration of Nutanix multi-subnet E2E tests into the machine-api-tests-ext binary and resolves a variable assignment issue in the test logic.

Changes Made

  1. Fixed Missing Test Import (cmd/machine-api-tests-ext/main.go)
    Added missing import for Nutanix E2E tests: _ "github.com/openshift/machine-api-operator/test/e2e/nutanix"
    This ensures that the comprehensive Nutanix multi-subnet test suite is properly included in the extended test binary
    Without this import, the tests would not be discoverable or executable via the test extension framework
  2. Corrected Variable Assignment (test/e2e/nutanix/multi-subnet.go)
    Fixed incorrect use of append() when assigning failure domains to machineNetworks
    Changed from: machineNetworks = append(machineNetworks, infra.Spec.PlatformSpec.Nutanix.FailureDomains...)
    Changed to: machineNetworks = infra.Spec.PlatformSpec.Nutanix.FailureDomains
    This prevents potential duplication of failure domains if the variable was previously initialized

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

coderabbitai Bot commented Apr 20, 2026

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: Pro Plus

Run ID: 82f9c069-660f-482e-bf39-9efdbae663c0

📥 Commits

Reviewing files that changed from the base of the PR and between 498bb59 and 2cc7901.

📒 Files selected for processing (2)
  • cmd/machine-api-tests-ext/main.go
  • test/e2e/nutanix/multi-subnet.go

Walkthrough

The pull request adds a blank import for the Nutanix e2e test package to enable test initialization and refactors the machineNetworks variable assignment in the multi-subnet test to use direct assignment instead of append-based accumulation.

Changes

Cohort / File(s) Summary
Nutanix E2E Test Setup
cmd/machine-api-tests-ext/main.go
Added blank import for github.com/openshift/machine-api-operator/test/e2e/nutanix to enable test package initialization via init side effects.
Multi-Subnet Test Configuration
test/e2e/nutanix/multi-subnet.go
Refactored machineNetworks initialization to use direct assignment from infra.Spec.PlatformSpec.Nutanix.FailureDomains instead of append-based accumulation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 8 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Test Structure And Quality ⚠️ Warning The test file contains 22 instances of bare Expect(err).NotTo(HaveOccurred()) assertions without meaningful failure messages, reducing test debuggability. Add diagnostic messages to all error assertions following the pattern: Expect(err).NotTo(HaveOccurred(), "context about what operation failed") and consider adding explicit AfterEach cleanup blocks.
Microshift Test Compatibility ❓ Inconclusive Cannot verify MicroShift compatibility as Nutanix e2e test files are not accessible in the current repository context. Access the Nutanix test implementation files to verify they contain proper MicroShift protection tags or are properly skipped for MicroShift environments.
✅ Passed checks (8 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title refers to a real and important part of the changeset (importing nutanix test to the binary), which is the primary objective of the PR. However, it contains a grammatical issue ('to in' should be 'to' or 'into') and is slightly awkward phrasing that could be clearer.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Stable And Deterministic Test Names ✅ Passed All 16 test titles in the Nutanix multi-subnet test file are stable and deterministic with no dynamic content, using only static descriptive strings.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR does not add new Ginkgo e2e tests; only enables existing tests and fixes a bug in existing test code.
Topology-Aware Scheduling Compatibility ✅ Passed Pull request contains only test-code changes that do not introduce scheduling constraints or topology-dependent deployment manifests.
Ote Binary Stdout Contract ✅ Passed PR blank import triggers Ginkgo test registration at init, but test bodies execute later. klog call and variable assignment are within It blocks, explicitly excluded from OTE stdout check per instructions.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR adds a blank import to register Nutanix tests and fixes a variable assignment in multi-subnet.go. No new Ginkgo e2e tests are introduced, and existing tests contain no IPv4 hardcoding or external connectivity requirements.

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

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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.11.4)

Error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions
The command is terminated due to an error: can't load config: unsupported version of the configuration: "" See https://golangci-lint.run/docs/product/migration-guide for migration instructions


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

@openshift-ci openshift-ci Bot requested review from nrb and theobarberbany April 20, 2026 07:20
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 20, 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 joelspeed 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

@jcpowermac
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 20, 2026
@abhay-nutanix
Copy link
Copy Markdown
Contributor Author

/test e2e-aws-operator

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 20, 2026

@abhay-nutanix: 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.

@abhay-nutanix
Copy link
Copy Markdown
Contributor Author

hi @nrb @theobarberbany please review this pull request. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants