From 05dec8783c17f6eca26c035f9e68612831147005 Mon Sep 17 00:00:00 2001 From: awgreene Date: Tue, 15 Dec 2020 14:40:21 -0500 Subject: [PATCH] Fix manager start commands --- cmd/olm/main.go | 2 +- pkg/controller/operators/suite_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/olm/main.go b/cmd/olm/main.go index a4bcfebb431..fcc42bcf1df 100644 --- a/cmd/olm/main.go +++ b/cmd/olm/main.go @@ -231,7 +231,7 @@ func main() { } // Start the controller manager - if err := mgr.Start(ctx.Done()); err != nil { + if err := mgr.Start(ctx); err != nil { logger.WithError(err).Fatal("controller manager stopped") } diff --git a/pkg/controller/operators/suite_test.go b/pkg/controller/operators/suite_test.go index 08c46e0fe69..f7e751a9b63 100644 --- a/pkg/controller/operators/suite_test.go +++ b/pkg/controller/operators/suite_test.go @@ -144,16 +144,16 @@ var _ = BeforeSuite(func() { Expect(operatorConditionReconciler.SetupWithManager(mgr)).ToNot(HaveOccurred()) Expect(operatorConditionGeneratorReconciler.SetupWithManager(mgr)).ToNot(HaveOccurred()) - ctx = ctrl.SetupSignalHandler() + ctx := ctrl.SetupSignalHandler() go func() { defer GinkgoRecover() By("Starting managed controllers") - err = mgr.Start(stop) + err := mgr.Start(ctx) Expect(err).ToNot(HaveOccurred()) }() - Expect(mgr.GetCache().WaitForCacheSync(stop)).To(BeTrue(), "Cache sync failed on startup") + Expect(mgr.GetCache().WaitForCacheSync(ctx)).To(BeTrue(), "Cache sync failed on startup") k8sClient = mgr.GetClient() Expect(k8sClient).ToNot(BeNil())