You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
As a reconciler author, I want to express expected watches in my tests So that I know when I forgot to create a watch to enqueue tracked resources
When my reconciler uses c.TrackAndGet to track a resource, its easy to forget to create a watch in my reconciler's Setup. I would like to express the expected watches (or lack thereof) through unit tests.
I haven't found a good fake for the manager and builder resources that would make them unit testable. e2e testing is the preferred approach to date.
It might be worth dealing with the complexity of creating our own fakes since this is a significant part of the controller that isn't unit testable today.
As a reconciler author,
I want to express expected watches in my tests
So that I know when I forgot to create a watch to enqueue tracked resources
When my reconciler uses
c.TrackAndGet
to track a resource, its easy to forget to create a watch in my reconciler'sSetup
. I would like to express the expected watches (or lack thereof) through unit tests.Eventually, I want this to pass
and this to fail:
I am not even sure there's a case for
c.TrackAndGet
without its companion watch, or is there?The text was updated successfully, but these errors were encountered: