Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use fake client-set and informer add controller unittest. #540

Closed
zjj2wry opened this issue Apr 16, 2018 · 2 comments
Closed

feat: use fake client-set and informer add controller unittest. #540

zjj2wry opened this issue Apr 16, 2018 · 2 comments

Comments

@zjj2wry
Copy link
Member

zjj2wry commented Apr 16, 2018

The controller now uses informer, list, clientset. For the controller test client-go provides fake-client and "k8s.io/client-go/testing" package to help test. Use them can test the logic of the controller worker is correct.

/cc @jlewi @ScorpioCPH @gaocegege

@gaocegege
Copy link
Member

The test code is inspired by test in job controller in Kubernetes. And I do think we should use fake clientset instead of the normal clientset.

Thanks for the issue.

@stale
Copy link

stale bot commented Apr 20, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot closed this as completed Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants