Skip to content

Commit

Permalink
Fix manager start commands
Browse files Browse the repository at this point in the history
  • Loading branch information
awgreene committed Dec 16, 2020
1 parent a448cdf commit 05dec87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/olm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/controller/operators/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 05dec87

Please sign in to comment.