diff --git a/test/e2e/categories_test.go b/test/e2e/categories_test.go index 94c00ccaf4..df3adaa5ca 100644 --- a/test/e2e/categories_test.go +++ b/test/e2e/categories_test.go @@ -66,6 +66,7 @@ var _ = Describe("Nutanix categories", Label("capx-feature-test", "categories"), dumpSpecResourcesAndCleanup(ctx, specName, bootstrapClusterProxy, artifactFolder, namespace, cancelWatches, clusterResources.Cluster, e2eConfig.GetIntervals, skipCleanup) if clusterResources2 != nil { dumpSpecResourcesAndCleanup(ctx, specName+"-2", bootstrapClusterProxy, artifactFolder, namespace2, cancelWatches2, clusterResources2.Cluster, e2eConfig.GetIntervals, skipCleanup) + clusterResources2 = nil } }) @@ -184,11 +185,11 @@ var _ = Describe("Nutanix categories", Label("capx-feature-test", "categories"), By("PASSED!") }) - It("Create and delete 2 clusters with same name with default cluster categories and should succeed", Label("same-name-two-cluster-test"), func() { + It("Create and delete two clusters with same name should succeed", Label("duplicate-cluster-name"), func() { Expect(namespace).NotTo(BeNil()) flavor := clusterctl.DefaultFlavor expectedClusterNameCategoryKey := infrav1.DefaultCAPICategoryKeyForName - By("Creating a workload cluster 1", func() { + By("Creating first workload cluster", func() { testHelper.deployClusterAndWait( deployClusterParams{ clusterName: clusterName, @@ -223,12 +224,12 @@ var _ = Describe("Nutanix categories", Label("capx-feature-test", "categories"), testHelper.verifyCategoriesNutanixMachines(ctx, clusterName, namespace.Name, expectedCategories) }) - By("Setting different Control plane endpoint IP for 2nd cluster", func() { - cp2EndpointIP := testHelper.getVariableFromE2eConfig("CONTROL_PLANE_ENDPOINT_IP_2") + By("Setting different Control plane endpoint IP for second cluster", func() { + cp2EndpointIP := testHelper.getVariableFromE2eConfig("CONTROL_PLANE_ENDPOINT_IP_WORKLOAD_CLUSTER") if cp2EndpointIP == "" { - cp2EndpointIP = os.Getenv("CONTROL_PLANE_ENDPOINT_IP_2") + cp2EndpointIP = os.Getenv("CONTROL_PLANE_ENDPOINT_IP_WORKLOAD_CLUSTER") if cp2EndpointIP == "" { - Fail("CONTROL_PLANE_ENDPOINT_IP_2 not set") + Fail("CONTROL_PLANE_ENDPOINT_IP_WORKLOAD_CLUSTER not set") } } testHelper.updateVariableInE2eConfig("CONTROL_PLANE_ENDPOINT_IP", cp2EndpointIP)