kubernetes-client / kubernetes-client/python
fake client for unit testing
- Dominant language
- Python
- Stars
- 7.7k
- Forks
- 3.5k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 18
Description
Kubernetes's [client-go](https://github.com/kubernetes/client-go) includes a powerful "fake" library (https://godoc.org/k8s.io/client-go/kubernetes/fake), which provides a mock API client that handles reads and writes without a cluster. It enables unit testing of code that uses client-go. This blog post has examples of how it's used: https://medium.com/@e_frogers/unit-testing-with-kubernetes-client-go-283b11aaa7db
Could this library provide a similar mock interface? I think a fake `kubernetes.client.ApiClient` that works in-process instead of over HTTP (like the go fake client) would be perfect: it would be injectable into the existing clients to allow full testing.
Contributor guide
Assessment
This issue has not been assessed yet.