From a963a02ab35ee0435eba147ff954f12d76a4e175 Mon Sep 17 00:00:00 2001 From: Marcin Skalski Date: Wed, 25 Sep 2024 08:14:45 +0200 Subject: [PATCH] fix(e2e): don't reuse namespace for helm upgrade test (#11539) --------- Signed-off-by: Marcin Skalski --- test/e2e/helm/kuma_helm_upgrade_multizone.go | 32 ++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/test/e2e/helm/kuma_helm_upgrade_multizone.go b/test/e2e/helm/kuma_helm_upgrade_multizone.go index 1f011196deb8..84b5317a10e8 100644 --- a/test/e2e/helm/kuma_helm_upgrade_multizone.go +++ b/test/e2e/helm/kuma_helm_upgrade_multizone.go @@ -19,6 +19,7 @@ import ( ) func UpgradingWithHelmChartMultizone() { + namespace := "helm-upgrade-ns" var global, zoneK8s, zoneUniversal Cluster var globalCP ControlPlane @@ -39,6 +40,7 @@ func UpgradingWithHelmChartMultizone() { zoneUniversal = NewUniversalCluster(NewTestingT(), Kuma3, Silent) }) +<<<<<<< HEAD E2EAfterAll(func() { Expect(zoneUniversal.DismissCluster()).To(Succeed()) Expect(zoneK8s.DeleteNamespace(TestNamespace)).To(Succeed()) @@ -46,6 +48,27 @@ func UpgradingWithHelmChartMultizone() { Expect(zoneK8s.DismissCluster()).To(Succeed()) Expect(global.DeleteKuma()).To(Succeed()) Expect(global.DismissCluster()).To(Succeed()) +======= + E2EAfterEach(func() { + grp := sync.WaitGroup{} + grp.Add(3) + go func() { + defer grp.Done() + Expect(zoneUniversal.DismissCluster()).To(Succeed()) + }() + go func() { + defer grp.Done() + Expect(zoneK8s.DeleteNamespace(namespace)).To(Succeed()) + Expect(zoneK8s.DeleteKuma()).To(Succeed()) + Expect(zoneK8s.DismissCluster()).To(Succeed()) + }() + go func() { + defer grp.Done() + Expect(global.DeleteKuma()).To(Succeed()) + Expect(global.DismissCluster()).To(Succeed()) + }() + grp.Wait() +>>>>>>> 7d80a5ab5 (fix(e2e): don't reuse namespace for helm upgrade test (#11539)) }) It("should install a Kuma version 2 minor releases behind the current version on Global", func() { @@ -135,12 +158,21 @@ spec: }, "30s", "1s").Should(Equal(1)) }) +<<<<<<< HEAD It("should sync DPPs from Zone to Global", func() { // when start test server on Zone err := NewClusterSetup(). Install(NamespaceWithSidecarInjection(TestNamespace)). Install(testserver.Install()).Setup(zoneK8s) Expect(err).ToNot(HaveOccurred()) +======= + By("Sync DPPs from Zone to Global") + // when start test server on Zone + err = NewClusterSetup(). + Install(NamespaceWithSidecarInjection(namespace)). + Install(testserver.Install(testserver.WithNamespace(namespace))).Setup(zoneK8s) + Expect(err).ToNot(HaveOccurred()) +>>>>>>> 7d80a5ab5 (fix(e2e): don't reuse namespace for helm upgrade test (#11539)) // then the DPP is synced to Global Eventually(func(g Gomega) int {