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"