From abe00cf0b106418f628918d3b583026851df3027 Mon Sep 17 00:00:00 2001 From: Helder Santana Date: Wed, 12 Jul 2023 11:15:56 +0200 Subject: [PATCH] Adjust helm to support deletion protection flags --- helm-charts | 2 +- test/e2e/cli/helm/helm.go | 8 ++++++++ test/e2e/helm_chart_test.go | 2 +- test/int/project_protect_test.go | 4 ++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/helm-charts b/helm-charts index 50bd0ec1a6..35843312f5 160000 --- a/helm-charts +++ b/helm-charts @@ -1 +1 @@ -Subproject commit 50bd0ec1a6a148a63cb98e3f4d7377d111a0f1c8 +Subproject commit 35843312f561b4413fb01424c674593270bcb942 diff --git a/test/e2e/cli/helm/helm.go b/test/e2e/cli/helm/helm.go index 9c98d78c92..8a1d4cb53a 100644 --- a/test/e2e/cli/helm/helm.go +++ b/test/e2e/cli/helm/helm.go @@ -107,6 +107,8 @@ func InstallOperatorWideSubmodule(input model.UserInputs) { "atlas-operator-"+input.Project.GetProjectName(), config.AtlasOperatorHelmChartPath, "--set-string", fmt.Sprintf("atlasURI=%s", config.AtlasHost), + "--set", "objectDeletionProtection=false", + "--set", "subobjectDeletionProtection=false", "--set-string", fmt.Sprintf("image.repository=%s", repo), "--set-string", fmt.Sprintf("image.tag=%s", tag), "--namespace", input.Namespace, @@ -122,6 +124,8 @@ func InstallOperatorNamespacedFromLatestRelease(input model.UserInputs) { "mongodb/mongodb-atlas-operator", "--set", fmt.Sprintf("watchNamespaces={%s}", input.Namespace), "--set-string", fmt.Sprintf("atlasURI=%s", config.AtlasHost), + "--set", "objectDeletionProtection=false", + "--set", "subobjectDeletionProtection=false", "--namespace="+input.Namespace, "--create-namespace", ) @@ -141,6 +145,8 @@ func InstallOperatorNamespacedSubmodule(input model.UserInputs) { "--set-string", fmt.Sprintf("image.tag=%s", tag), "--set", fmt.Sprintf("watchNamespaces={%s}", input.Namespace), "--set", "mongodb-atlas-operator-crds.enabled=false", + "--set", "objectDeletionProtection=false", + "--set", "subobjectDeletionProtection=false", "--namespace="+input.Namespace, "--create-namespace", ) @@ -188,6 +194,8 @@ func UpgradeOperatorChart(input model.UserInputs) { "atlas-operator-"+input.Project.GetProjectName(), config.AtlasOperatorHelmChartPath, "--set-string", fmt.Sprintf("atlasURI=%s", config.AtlasHost), + "--set", "objectDeletionProtection=false", + "--set", "subobjectDeletionProtection=false", "--set-string", fmt.Sprintf("image.repository=%s", repo), "--set-string", fmt.Sprintf("image.tag=%s", tag), "-n", input.Namespace, diff --git a/test/e2e/helm_chart_test.go b/test/e2e/helm_chart_test.go index 5d82f70dd8..3cd09b655c 100644 --- a/test/e2e/helm_chart_test.go +++ b/test/e2e/helm_chart_test.go @@ -214,7 +214,7 @@ var _ = Describe("HELM charts", func() { }) }) - Describe("HELM charts.", Label("helm-update"), func() { + FDescribe("HELM charts.", Label("helm-update"), func() { It("User deploy operator and later deploy new version of the Atlas operator", func() { By("User creates configuration for a new Project, Deployment, DBUser", func() { data = model.DataProviderWithResources( diff --git a/test/int/project_protect_test.go b/test/int/project_protect_test.go index d898a94b8a..a00355f093 100644 --- a/test/int/project_protect_test.go +++ b/test/int/project_protect_test.go @@ -56,7 +56,7 @@ var _ = Describe("AtlasProject", Label("int", "AtlasProject", "protection-enable }) // nolint:dupl - By("Deleting project in cluster don't delete from Atlas", func() { + By("Deleting project in cluster doesn't delete from Atlas", func() { projectID := testProject.ID() Expect(k8sClient.Delete(context.TODO(), testProject, &client.DeleteOptions{})).To(Succeed()) @@ -98,7 +98,7 @@ var _ = Describe("AtlasProject", Label("int", "AtlasProject", "protection-enable }) // nolint:dupl - By("Deleting project in cluster don't delete from Atlas", func() { + By("Deleting project in cluster doesn't delete from Atlas", func() { projectID := testProject.ID() Expect(k8sClient.Delete(context.TODO(), testProject, &client.DeleteOptions{})).To(Succeed())