Embed nodepool listing test cases into nodepool_update_nodes.go#4872
Embed nodepool listing test cases into nodepool_update_nodes.go#4872
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aklymenk The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| Expect(err).NotTo(HaveOccurred()) | ||
| } | ||
|
|
||
| verifyNodePoolListByCluster := func(ctx context.Context, rgName, clusterName string, expectedNodePoolNames []string) { |
There was a problem hiding this comment.
Would it make sense to turn this function into a verifier?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Please add this as a verifier as well.
|
@aklymenk: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
PR needs rebase. DetailsInstructions 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. |
ARO-21295
What
Adds node pool listing validations into the existing
nodepool_update_nodesE2E test. The listing is verified at four points in the test: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_nodestest 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) andHcpOpenShiftClustersClient.NewListByResourceGroupPager+NewListByParentPager(by resource group), both from the HCP SDK, so theAroRpApiCompatiblelabel is preserved.