Skip to content

Commit bec4074

Browse files
Merge pull request #4816 from Azure/mvacula/cluster-listing-refactor
Cluster listing test case refactor: move into an existing test
2 parents dadda56 + 773adf3 commit bec4074

8 files changed

+13
-115
lines changed

test/e2e/cluster_list_no_infra.go

Lines changed: 0 additions & 109 deletions
This file was deleted.

test/e2e/clusters_sharing_resgroup.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,18 @@ var _ = Describe("Customer", func() {
158158
By("verifying that the managed resource group still exists")
159159
_, err = tc.GetARMResourcesClientFactoryOrDie(ctx).NewResourceGroupsClient().Get(ctx, clusterParams2.ManagedResourceGroupName, nil)
160160
Expect(err).NotTo(HaveOccurred())
161+
162+
By("testing resource group-level cluster listing")
163+
pager := clusterClient.NewListByResourceGroupPager(*customerResourceGroup.Name, nil)
164+
var foundClusters []string
165+
for pager.More() {
166+
clusterList, err := pager.NextPage(ctx)
167+
Expect(err).NotTo(HaveOccurred())
168+
for _, cluster := range clusterList.Value {
169+
foundClusters = append(foundClusters, *cluster.Name)
170+
}
171+
}
172+
Expect(foundClusters).To(HaveLen(2), "Expected exactly two clusters listed in resource group %s", *customerResourceGroup.Name)
173+
Expect(foundClusters).To(ContainElements(customerClusterName, customerClusterName2))
161174
})
162175
})

test/testdata/zz_fixture_TestMainListSuitesForEachSuite_dev_cd_check_paralleldev_cd_check_parallel.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Customer should be able to create a no-CNI private cluster with a private key va
99
Customer should be able to create a HCP cluster without CNI
1010
Customer should be able to create an HCP cluster and custom node pool osDisk size
1111
Create HCPOpenShiftCluster with Private KeyVault should create a cluster with private keyvault using v20251223preview API
12-
Customer should be able to list HCP clusters without node pools at the resource group level
1312
Customer should be able to create an HCP cluster and manage pull secrets
1413
Update HCPOpenShiftCluster Positive creates a cluster and updates tags with a PATCH request
1514
Customer should be able to create an HCP cluster with back-level version 4.19

test/testdata/zz_fixture_TestMainListSuitesForEachSuite_integration_parallelintegration_parallel.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Customer should be able to create a no-CNI private cluster with a private key va
77
Customer should be able to create a HCP cluster without CNI
88
Customer should be able to create an HCP cluster and custom node pool osDisk size
99
Create HCPOpenShiftCluster with Private KeyVault should create a cluster with private keyvault using v20251223preview API
10-
Customer should be able to list HCP clusters without node pools at the resource group level
1110
Customer should not be able to reuse subnets and NSGs between clusters
1211
Customer should be able to create an HCP cluster and manage pull secrets
1312
Customer should create an HCP cluster and validate TLS certificates

test/testdata/zz_fixture_TestMainListSuitesForEachSuite_prod_parallelprod_parallel.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Customer should be able to create a no-CNI private cluster with a private key va
77
Customer should be able to create a HCP cluster without CNI
88
Customer should be able to create an HCP cluster and custom node pool osDisk size
99
Create HCPOpenShiftCluster with Private KeyVault should create a cluster with private keyvault using v20251223preview API
10-
Customer should be able to list HCP clusters without node pools at the resource group level
1110
Customer should not be able to reuse subnets and NSGs between clusters
1211
Customer should be able to create an HCP cluster and manage pull secrets
1312
Customer should create an HCP cluster and validate TLS certificates

test/testdata/zz_fixture_TestMainListSuitesForEachSuite_rp_api_compat_all_parallel_01rp_api_compat_all_parallel_development.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Customer should be able to create a no-CNI private cluster with a private key va
1010
Customer should be able to create a HCP cluster without CNI
1111
Customer should be able to create an HCP cluster and custom node pool osDisk size
1212
Create HCPOpenShiftCluster with Private KeyVault should create a cluster with private keyvault using v20251223preview API
13-
Customer should be able to list HCP clusters without node pools at the resource group level
1413
Customer should not be able to reuse subnets and NSGs between clusters
1514
Customer should be able to create an HCP cluster and manage pull secrets
1615
Update HCPOpenShiftCluster Positive creates a cluster and updates tags with a PATCH request

test/testdata/zz_fixture_TestMainListSuitesForEachSuite_rp_api_compat_all_parallelrp_api_compat_all_parallel.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Customer should be able to create a no-CNI private cluster with a private key va
77
Customer should be able to create a HCP cluster without CNI
88
Customer should be able to create an HCP cluster and custom node pool osDisk size
99
Create HCPOpenShiftCluster with Private KeyVault should create a cluster with private keyvault using v20251223preview API
10-
Customer should be able to list HCP clusters without node pools at the resource group level
1110
Customer should not be able to reuse subnets and NSGs between clusters
1211
Customer should be able to create an HCP cluster and manage pull secrets
1312
Update HCPOpenShiftCluster Positive creates a cluster and updates tags with a PATCH request

test/testdata/zz_fixture_TestMainListSuitesForEachSuite_stage_parallelstage_parallel.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Customer should be able to create a no-CNI private cluster with a private key va
77
Customer should be able to create a HCP cluster without CNI
88
Customer should be able to create an HCP cluster and custom node pool osDisk size
99
Create HCPOpenShiftCluster with Private KeyVault should create a cluster with private keyvault using v20251223preview API
10-
Customer should be able to list HCP clusters without node pools at the resource group level
1110
Customer should not be able to reuse subnets and NSGs between clusters
1211
Customer should be able to create an HCP cluster and manage pull secrets
1312
Customer should create an HCP cluster and validate TLS certificates

0 commit comments

Comments
 (0)