From 53b607c738b0c5000286e5f8b8e69a24d76c7ea5 Mon Sep 17 00:00:00 2001 From: Aditya Bhatia <7274741+adityabhatia@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:56:02 +0100 Subject: [PATCH] test: combine Finalizers tests to default quick start tests --- test/e2e/quick_start_test.go | 59 +++++++++--------------------------- 1 file changed, 14 insertions(+), 45 deletions(-) diff --git a/test/e2e/quick_start_test.go b/test/e2e/quick_start_test.go index bc0a545d6a55..077f737c6594 100644 --- a/test/e2e/quick_start_test.go +++ b/test/e2e/quick_start_test.go @@ -56,6 +56,13 @@ var _ = Describe("When following the Cluster API quick-start", func() { framework.KubeadmControlPlaneOwnerReferenceAssertions, framework.KubernetesReferenceAssertions, ) + // This check ensures that finalizers are resilient - i.e. correctly re-reconciled - when removed. + framework.ValidateFinalizersResilience(ctx, proxy, namespace, clusterName, + framework.CoreFinalizersAssertion, + framework.KubeadmControlPlaneFinalizersAssertion, + framework.ExpFinalizersAssertion, + framework.DockerInfraFinalizersAssertion, + ) }, } }) @@ -90,6 +97,13 @@ var _ = Describe("When following the Cluster API quick-start with ClusterClass [ framework.KubeadmControlPlaneOwnerReferenceAssertions, framework.KubernetesReferenceAssertions, ) + // This check ensures that finalizers are resilient - i.e. correctly re-reconciled - when removed. + framework.ValidateFinalizersResilience(ctx, proxy, namespace, clusterName, + framework.CoreFinalizersAssertion, + framework.KubeadmControlPlaneFinalizersAssertion, + framework.ExpFinalizersAssertion, + framework.DockerInfraFinalizersAssertion, + ) }, } }) @@ -175,48 +189,3 @@ var _ = Describe("When following the Cluster API quick-start with dualstack and } }) }) - -var _ = Describe("When following the Cluster API quick-start check finalizers resilience after deletion", func() { - QuickStartSpec(ctx, func() QuickStartSpecInput { - return QuickStartSpecInput{ - E2EConfig: e2eConfig, - ClusterctlConfigPath: clusterctlConfigPath, - BootstrapClusterProxy: bootstrapClusterProxy, - ArtifactFolder: artifactFolder, - SkipCleanup: skipCleanup, - InfrastructureProvider: ptr.To("docker"), - PostMachinesProvisioned: func(proxy framework.ClusterProxy, namespace, clusterName string) { - // This check ensures that finalizers are resilient - i.e. correctly re-reconciled - when removed. - framework.ValidateFinalizersResilience(ctx, proxy, namespace, clusterName, - framework.CoreFinalizersAssertion, - framework.KubeadmControlPlaneFinalizersAssertion, - framework.ExpFinalizersAssertion, - framework.DockerInfraFinalizersAssertion, - ) - }, - } - }) -}) - -var _ = Describe("When following the Cluster API quick-start with ClusterClass check finalizers resilience after deletion [ClusterClass]", func() { - QuickStartSpec(ctx, func() QuickStartSpecInput { - return QuickStartSpecInput{ - E2EConfig: e2eConfig, - ClusterctlConfigPath: clusterctlConfigPath, - BootstrapClusterProxy: bootstrapClusterProxy, - ArtifactFolder: artifactFolder, - SkipCleanup: skipCleanup, - Flavor: ptr.To("topology"), - InfrastructureProvider: ptr.To("docker"), - PostMachinesProvisioned: func(proxy framework.ClusterProxy, namespace, clusterName string) { - // This check ensures that finalizers are resilient - i.e. correctly re-reconciled - when removed. - framework.ValidateFinalizersResilience(ctx, proxy, namespace, clusterName, - framework.CoreFinalizersAssertion, - framework.KubeadmControlPlaneFinalizersAssertion, - framework.ExpFinalizersAssertion, - framework.DockerInfraFinalizersAssertion, - ) - }, - } - }) -})