Skip to content

Commit 1559577

Browse files
author
Jelle Dijkstra
committed
Retry e2e
1 parent acbd0b0 commit 1559577

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

test/e2e/e2e_suite_test.go

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,9 @@ var _ = BeforeSuite(func() {
7272
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to load the manager(Operator) image into Kind")
7373

7474
// The tests-e2e are intended to run on a temporary cluster that is created and destroyed for testing.
75-
// To prevent errors when tests run in environments with Prometheus or CertManager already installed,
75+
// To prevent errors when tests run in environments with CertManager already installed,
7676
// we check for their presence before execution.
77-
// Setup Prometheus and CertManager before the suite if not skipped and if not already installed
78-
if !skipPrometheusInstall {
79-
By("checking if prometheus is installed already")
80-
isPrometheusOperatorAlreadyInstalled = utils.IsPrometheusCRDsInstalled()
81-
if !isPrometheusOperatorAlreadyInstalled {
82-
_, _ = fmt.Fprintf(GinkgoWriter, "Installing Prometheus Operator...\n")
83-
Expect(utils.InstallPrometheusOperator()).To(Succeed(), "Failed to install Prometheus Operator")
84-
} else {
85-
_, _ = fmt.Fprintf(GinkgoWriter, "WARNING: Prometheus Operator is already installed. Skipping installation...\n")
86-
}
87-
}
77+
// Setup CertManager before the suite if not skipped and if not already installed
8878
if !skipCertManagerInstall {
8979
By("checking if cert manager is installed already")
9080
isCertManagerAlreadyInstalled = utils.IsCertManagerCRDsInstalled()
@@ -98,11 +88,7 @@ var _ = BeforeSuite(func() {
9888
})
9989

10090
var _ = AfterSuite(func() {
101-
// Teardown Prometheus and CertManager after the suite if not skipped and if they were not already installed
102-
if !skipPrometheusInstall && !isPrometheusOperatorAlreadyInstalled {
103-
_, _ = fmt.Fprintf(GinkgoWriter, "Uninstalling Prometheus Operator...\n")
104-
utils.UninstallPrometheusOperator()
105-
}
91+
// Teardown CertManager after the suite if not skipped and if they were not already installed
10692
if !skipCertManagerInstall && !isCertManagerAlreadyInstalled {
10793
_, _ = fmt.Fprintf(GinkgoWriter, "Uninstalling CertManager...\n")
10894
utils.UninstallCertManager()

0 commit comments

Comments
 (0)