Skip to content

Embed nodepool listing test cases into nodepool_update_nodes.go#4872

Draft
aklymenk wants to merge 1 commit intomainfrom
e2e/nodepool-listing
Draft

Embed nodepool listing test cases into nodepool_update_nodes.go#4872
aklymenk wants to merge 1 commit intomainfrom
e2e/nodepool-listing

Conversation

@aklymenk
Copy link
Copy Markdown
Collaborator

@aklymenk aklymenk commented Apr 14, 2026

ARO-21295

What

Adds node pool listing validations into the existing nodepool_update_nodes E2E test. The listing is verified at four points in the test:

  1. By resource group before the cluster is created - expect 0 node pools
  2. By cluster after the cluster is created with 0 node pools - expect 0 node pools
  3. By cluster and by resource group after all 3 node pools are created - expect all 3 listed
  4. By cluster and by resource group after all node pools are updated - expect all 3 still listed

Why

Node pool listing was identified as a use case that needs E2E test coverage (listing by cluster and by resource group). Instead of creating a dedicated test that deploys a new cluster solely for listing, the validations are embedded into the existing nodepool_update_nodes test which already creates a cluster and 3 node pools. This avoids adding cluster and nodepool creation time to the test suite.

Subscription-level listing is intentionally excluded, following the precedent set in #4520: the subscription-level list fans out across all regions and can fail due to availability issues in unrelated regions, and the underlying code path is identical to the resource-group-level list.

Testing

The change itself is the test. The listing helpers use NodePoolsClient.NewListByParentPager (by cluster) and HcpOpenShiftClustersClient.NewListByResourceGroupPager + NewListByParentPager (by resource group), both from the HCP SDK, so the AroRpApiCompatible label is preserved.

@openshift-ci openshift-ci bot requested review from bennerv and deads2k April 14, 2026 13:01
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 14, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: aklymenk
Once this PR has been reviewed and has the lgtm label, please assign venkateshsredhat 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

@aklymenk aklymenk changed the title embeded nodepool listing test cases into nodepool_update_nodes.go Embed nodepool listing test cases into nodepool_update_nodes.go Apr 14, 2026
Expect(err).NotTo(HaveOccurred())
}

verifyNodePoolListByCluster := func(ctx context.Context, rgName, clusterName string, expectedNodePoolNames []string) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would it make sense to turn this function into a verifier?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I didn't think we could potentially reuse it in some other E2E tests. Do you think we may want to be able to do it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think it makes sense to add this one to verifiers as well as the RG based one below.

Expect(listedNodePoolNames).To(ConsistOf(expectedNodePoolNames), "expected %v node pools listed by cluster %s, got %v", expectedNodePoolNames, clusterName, listedNodePoolNames)
}

verifyNodePoolListByRG := func(ctx context.Context, rgName string, expectedNodePoolNames []string) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please add this as a verifier as well.

@aklymenk aklymenk marked this pull request as draft April 15, 2026 14:13
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Apr 16, 2026

@aklymenk: 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/cspr 10f9a0e link true /test cspr
ci/prow/images-push 10f9a0e link true /test images-push

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

openshift-ci bot commented Apr 16, 2026

PR needs rebase.

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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants