Skip to content

Commit f17728e

Browse files
committed
fixing comments from PR
1 parent 8cdf1c2 commit f17728e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/client/fake/doc.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ limitations under the License.
1717
/*
1818
Package fake provides a fake client for testing.
1919
20-
fake client is backed by its simple object store indexed by GroupVersionResource.
20+
A fake client is backed by its simple object store indexed by GroupVersionResource.
2121
You can create a fake client with optional objects.
2222
23-
client := NewFakeClient(initObjs...) // initObjs is a slice of runtime.Object
23+
client := NewFakeClientWithScheme(scheme, initObjs...) // initObjs is a slice of runtime.Object
2424
2525
You can invoke the methods defined in the Client interface.
2626
@@ -30,11 +30,11 @@ envtest.Environment with a real client and API server.
3030
Current Limitations / Known Issues with the fake Client:
3131
- this client does not use reactors so it can not be setup with detailed responses for testing
3232
- possible locking issues when using fake client and not the actual client
33-
- by default you are using the wrong scheme
34-
- there is no support for sub resources which can cause issues with tests if you're trying to update
33+
- there is some support for sub resources which can cause issues with tests if you're trying to update
3534
e.g. metadata and status in the same reconcile
36-
- There is also no OpenAPI validation
37-
- It does not bump `Generation` or `ResourceVersion` so Patch/Update will not behave properly
35+
- No OpeanAPI validation is performed when creating or updating objects.
36+
- ObjectMeta's `Generation` and `ResourceVersion` don't behave properly, Patch or Update
37+
operations that rely on these fields will fail, or give false positives.
3838
3939
*/
4040
package fake

0 commit comments

Comments
 (0)