-
Notifications
You must be signed in to change notification settings - Fork 308
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
Reorganize pkg/dashboard/objects
For Better Testability
#210
Comments
The code is mostly testable, since it relies on Helm's mock objects paradigm. You can look at api_test.go to see how test fixtures work. Also, there are some tests in repos_test.go. Please let me know if that makes sense |
I have added example test here: https://github.com/komodorio/helm-dashboard/blob/main/pkg/dashboard/objects/repos_test.go#L113 You can extend that test to cover the |
pkg/dashboard/objects
For Better Testabilitypkg/dashboard/objects
For Better Testability
Thanks @undera for the sample test case. It worked out for the current However, I think we have more places in Let's keep this card open. If I'm able to cover all scenarios using your way, I'll make this a |
To make the package
pkg/dashboard/objects
more testable and for more overall coverage,mockery
can be used to create the mock code.pkg/dashboard/objects
to avoid import cycles issue.@ Maintainers, I came across this while working on #139. I noticed, most parts of the package aren't (unit) testable without this. Please triage and let me know.
The text was updated successfully, but these errors were encountered: