Skip to content

Commit 261af48

Browse files
committed
refactor cacheexpectation
1 parent 20e3193 commit 261af48

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

xset/xset_controller.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,11 @@ func SetUpWithManager(mgr ctrl.Manager, xsetController api.XSetController) error
6666
xsetGVK := xsetMeta.GroupVersionKind()
6767
targetMeta := xsetController.XMeta()
6868

69-
cacheExpectations := expectations.NewxCacheExpectations(reconcilerMixin.Client, reconcilerMixin.Scheme, clock.RealClock{})
7069
targetControl, err := xcontrol.NewTargetControl(reconcilerMixin, xsetController)
70+
if err != nil {
71+
return err
72+
}
73+
cacheExpectations := expectations.NewxCacheExpectations(reconcilerMixin.Client, reconcilerMixin.Scheme, clock.RealClock{})
7174
resourceContexts := resourcecontexts.NewRealResourceContext(reconcilerMixin.Client, cacheExpectations)
7275
syncControl := synccontrols.NewRealSyncControl(reconcilerMixin, xsetController, targetControl, resourceContexts, cacheExpectations)
7376
revisionControl := history.NewRevisionControl(reconcilerMixin.Client, reconcilerMixin.Client)

0 commit comments

Comments
 (0)