client-go/examples/fake-client
José Carlos Chávez 76174b8af8 chore: adds consistent vanity import to files and provides tooling for verifying and updating them. (#120642)
* chore: drops update vanity imports from script.

* chore: changes copyright year to 2024.

* chore: makes lint happy.

Kubernetes-commit: 6d6398ef9266abce3518a4c9a3d4e4d8feeffdc1
2024-02-08 13:38:07 +00:00
..
doc.go chore: adds consistent vanity import to files and provides tooling for verifying and updating them. (#120642) 2024-02-08 13:38:07 +00:00
main_test.go fix the fake client example: how to handle a race between the fake client and informer 2020-10-26 22:50:32 -07:00
README.md Add client-go example using fake client in test. 2018-06-20 18:35:57 -07:00

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