@@ -17,10 +17,10 @@ limitations under the License.
17
17
/*
18
18
Package fake provides a fake client for testing.
19
19
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.
21
21
You can create a fake client with optional objects.
22
22
23
- client := NewFakeClient( initObjs...) // initObjs is a slice of runtime.Object
23
+ client := NewFakeClientWithScheme(scheme, initObjs...) // initObjs is a slice of runtime.Object
24
24
25
25
You can invoke the methods defined in the Client interface.
26
26
@@ -30,11 +30,11 @@ envtest.Environment with a real client and API server.
30
30
Current Limitations / Known Issues with the fake Client:
31
31
- this client does not use reactors so it can not be setup with detailed responses for testing
32
32
- 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
35
34
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.
38
38
39
39
*/
40
40
package fake
0 commit comments