From 61b9c39a789c9ecd0097e2f2dee5067affb6e6d9 Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Sat, 14 Oct 2023 00:22:09 -0700 Subject: [PATCH] run tests serially --- test/e2e/cluster.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/e2e/cluster.go b/test/e2e/cluster.go index 3607f472b29..67ab7bd2a8e 100644 --- a/test/e2e/cluster.go +++ b/test/e2e/cluster.go @@ -30,10 +30,10 @@ import ( "github.com/Azure/ARO-RP/test/util/project" ) -var _ = Describe("Cluster", func() { +var _ = Describe("Cluster", Serial, func() { var p project.Project - var _ = BeforeEach(func(ctx context.Context) { + BeforeEach(func(ctx context.Context) { By("creating a test namespace") testNamespace := fmt.Sprintf("test-e2e-%d", GinkgoParallelProcess()) p = project.NewProject(clients.Kubernetes, clients.Project, testNamespace) @@ -43,18 +43,18 @@ var _ = Describe("Cluster", func() { By("verifying the namespace is ready") Eventually(func(ctx context.Context) error { return p.Verify(ctx) - }).WithContext(ctx).Should(BeNil()) - }) + }).WithContext(ctx).WithTimeout(5 * time.Minute).Should(BeNil()) - var _ = AfterEach(func(ctx context.Context) { - By("deleting a test namespace") - err := p.Delete(ctx) - Expect(err).NotTo(HaveOccurred(), "Failed to delete test namespace") + DeferCleanup(func(ctx context.Context) { + By("deleting a test namespace") + err := p.Delete(ctx) + Expect(err).NotTo(HaveOccurred(), "Failed to delete test namespace") - By("verifying the namespace is deleted") - Eventually(func(ctx context.Context) error { - return p.VerifyProjectIsDeleted(ctx) - }).WithContext(ctx).Should(BeNil()) + By("verifying the namespace is deleted") + Eventually(func(ctx context.Context) error { + return p.VerifyProjectIsDeleted(ctx) + }).WithContext(ctx).WithTimeout(5 * time.Minute).Should(BeNil()) + }) }) It("can run a stateful set which is using Azure Disk storage", func(ctx context.Context) {