From 56cdce4c063d8f1ba001c866ca27e0b7d24ed374 Mon Sep 17 00:00:00 2001 From: Jai Subash Devmane Date: Fri, 2 Jul 2021 16:20:30 -0400 Subject: [PATCH] 1. adding install flag to test makefile 2.fixing bug where velero was being uninstalled even though the -install-velero flag was set to false --- test/e2e/Makefile | 4 +++- test/e2e/enable_api_group_versions_test.go | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/test/e2e/Makefile b/test/e2e/Makefile index fb85a824b7..b4b6f2f2c9 100644 --- a/test/e2e/Makefile +++ b/test/e2e/Makefile @@ -56,6 +56,7 @@ BSL_CONFIG ?= VSL_CONFIG ?= CLOUD_PROVIDER ?= OBJECT_STORE_PROVIDER ?= +INSTALL_VELERO ?= true # Flags to create an additional BSL for multiple credentials tests ADDITIONAL_OBJECT_STORE_PROVIDER ?= @@ -90,7 +91,8 @@ run: ginkgo -additional-bsl-credentials-file=$(ADDITIONAL_CREDS_FILE) \ -additional-bsl-bucket=$(ADDITIONAL_BSL_BUCKET) \ -additional-bsl-prefix=$(ADDITIONAL_BSL_PREFIX) \ - -additional-bsl-config=$(ADDITIONAL_BSL_CONFIG) + -additional-bsl-config=$(ADDITIONAL_BSL_CONFIG) \ + -install-velero=$(INSTALL_VELERO) build: ginkgo mkdir -p $(OUTPUT_DIR) diff --git a/test/e2e/enable_api_group_versions_test.go b/test/e2e/enable_api_group_versions_test.go index 1195639567..12ec6d2f38 100644 --- a/test/e2e/enable_api_group_versions_test.go +++ b/test/e2e/enable_api_group_versions_test.go @@ -84,8 +84,10 @@ var _ = Describe("[APIGroup] Velero tests with various CRD API group versions", } Expect(err).NotTo(HaveOccurred()) - err = veleroUninstall(ctx, client.kubebuilder, installVelero, veleroNamespace) - Expect(err).NotTo(HaveOccurred()) + if installVelero { + err = veleroUninstall(ctx, client.kubebuilder, installVelero, veleroNamespace) + Expect(err).NotTo(HaveOccurred()) + } })