@@ -122,12 +122,12 @@ var _ = BeforeSuite(func() {
122
122
The only difference is that the manager is started in a separate goroutine so it does not block the cleanup of envtest
123
123
when you’re done running your tests.
124
124
125
- Note that we set up both a "live" k8s client, separate from the manager. This is because when making assertions in
126
- tests, you generally want to assert against the live state of the API server. If you used the client from the
127
- manager (`k8sManager.GetClient`), you'd end up asserting against the contents of the cache instead, which is slower
128
- and can introduce flakiness into your tests. We could use the manager's `APIReader` to accomplish the same thing,
129
- but that would leave us with two clients in our test assertions and setup (one for reading, one for writing), and
130
- it'd be easy to make mistakes.
125
+ Note that we set up both a "live" k8s client and a separate client from the manager. This is because when making
126
+ assertions in tests, you generally want to assert against the live state of the API server. If you use the client
127
+ from the manager (`k8sManager.GetClient`), you'd end up asserting against the contents of the cache instead, which is
128
+ slower and can introduce flakiness into your tests. We could use the manager's `APIReader` to accomplish the same
129
+ thing, but that would leave us with two clients in our test assertions and setup (one for reading, one for writing),
130
+ and it'd be easy to make mistakes.
131
131
132
132
Note that we keep the reconciler running against the manager's cache client, though -- we want our controller to
133
133
behave as it would in production, and we use features of the cache (like indicies) in our controller which aren't
0 commit comments