mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-18 17:21:23 +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 |
||
---|---|---|
.. | ||
doc.go | ||
main_test.go | ||
README.md |
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