Skip to content

Commit

Permalink
use the correct env var for second control plane endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderboltsid committed Aug 13, 2024
1 parent f1de4e2 commit e0f5a70
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/e2e/categories_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
})

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e0f5a70

Please sign in to comment.