mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-05 00:51:02 +00:00
Note that the fake client isn't designed to work with informer. It doesn't support resource version. It's encouraged to use a real client in an integration/E2E test if you need to test complex behavior with informer/controllers. Kubernetes-commit: 942bc9b32e39bb9c6ca045c02b48cc84dfa86633
Fake Client Example
This example demonstrates how to use a fake client with SharedInformerFactory in tests.
It covers:
- Creating the fake client
- Setting up real informers
- Injecting events into those informers
Running
go test -v k8s.io/client-go/examples/fake-client