From e60c9ffb09122f73b33fda14d44b819be1b5cbd5 Mon Sep 17 00:00:00 2001 From: Carolyn Van Slyck Date: Fri, 4 Mar 2022 07:26:30 -0600 Subject: [PATCH] Run integration tests against an empty cluster Do not run the integration tests against a cluster with the operator installed. We need to go back and fix how we run the tests so that the test controller and the installed operator don't both react to the same events Signed-off-by: Carolyn Van Slyck --- magefile.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/magefile.go b/magefile.go index bce44e72..7372cb89 100644 --- a/magefile.go +++ b/magefile.go @@ -253,6 +253,14 @@ func UpdateTestfiles() { func TestIntegration() { mg.Deps(UseTestEnvironment, CleanTestdata, EnsureGinkgo, EnsureDeployed) + // TODO: we need to run these tests either isolated against EnvTest, or + // against a cluster that doesn't have the operator deployed. Otherwise + // both the controller running in the test, and the controller on the cluster + // are responding to the same events. + // For now, it's up to the caller to use a fresh cluster with CRDs installed until we can fix it. + + kubectl("delete", "deployment", "porter-operator-controller-manager", "-n=porter-operator-system").RunV() + v := "" if mg.Verbose() { v = "-v"