Skip to content

Commit

Permalink
🐛 fix SimpleController in builder test
Browse files Browse the repository at this point in the history
Replace SimpleController with ControllerManagedBy.
  • Loading branch information
Mengqi Yu committed Aug 6, 2019
1 parent 054ee41 commit 11818d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/builder/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,12 @@ var _ = Describe("application", func() {
}
return nil, fmt.Errorf("max concurrent reconcilers expected %d but found %d", maxConcurrentReconciles, options.MaxConcurrentReconciles)
}
instance, err := SimpleController().

By("creating a controller manager")
m, err := manager.New(cfg, manager.Options{})
Expect(err).NotTo(HaveOccurred())

instance, err := ControllerManagedBy(m).
For(&appsv1.ReplicaSet{}).
Owns(&appsv1.ReplicaSet{}).
WithOptions(controller.Options{MaxConcurrentReconciles: maxConcurrentReconciles}).
Expand Down

0 comments on commit 11818d8

Please sign in to comment.