Skip to content

Commit 8c03bf6

Browse files
committed
🐛 e2e should delete the cluster before validating
Signed-off-by: Vince Prignano <[email protected]>
1 parent 82b9314 commit 8c03bf6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/e2e/suites/unmanaged/unmanaged_functional_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
10691069
awsCluster, err := GetAWSClusterByName(ctx, namespace.Name, clusterName)
10701070
Expect(err).To(BeNil())
10711071

1072-
// Validate that s3 endpoints were created in the vpc.
1072+
ginkgo.By("Validating the s3 endpoint was created")
10731073
vpc, err := shared.GetVPCByName(e2eCtx, clusterName+"-vpc")
10741074
Expect(err).NotTo(HaveOccurred())
10751075
Expect(vpc).NotTo(BeNil())
@@ -1081,16 +1081,16 @@ var _ = ginkgo.Context("[unmanaged] [functional]", func() {
10811081
Expect(*endpoints[0].ServiceName).To(Equal("com.amazonaws." + awsCluster.Spec.Region + ".s3"))
10821082
Expect(*endpoints[0].VpcId).To(Equal(*vpc.VpcId))
10831083

1084+
ginkgo.By("Deleting the cluster")
1085+
deleteCluster(ctx, cluster)
1086+
10841087
ginkgo.By("Waiting for AWSCluster to show the VPC endpoint as deleted in conditions")
10851088
Eventually(func() bool {
10861089
awsCluster, err := GetAWSClusterByName(ctx, namespace.Name, clusterName)
10871090
Expect(err).To(BeNil())
10881091
return conditions.IsFalse(awsCluster, infrav1.VpcEndpointsReadyCondition) &&
10891092
conditions.GetReason(awsCluster, infrav1.VpcEndpointsReadyCondition) == clusterv1.DeletedReason
10901093
}, e2eCtx.E2EConfig.GetIntervals("", "wait-delete-cluster")...).Should(BeTrue())
1091-
1092-
ginkgo.By("Deleting the cluster")
1093-
deleteCluster(ctx, cluster)
10941094
})
10951095
})
10961096
})

0 commit comments

Comments
 (0)