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

[kubeapps-apis] Add unit-tests for existing plugin functionality to easy adding further changes #2849

Closed
absoludity opened this issue May 21, 2021 · 4 comments
Assignees
Labels
component/apis-server Issue related to kubeapps api-server component/ci Issue related to kubeapps ci system kind/feature An issue that reports a feature (approved) to be implemented

Comments

@absoludity
Copy link
Contributor

Description:

The existing demo functionality was added and works with fluxv2 and kapp-controller without unit-tests, but as we build on this, we want to be able to do so using TDD and so need decent examples of doing so with the dynamic client (which will in turn force writing more testable code).

Additional information you deem important (e.g. issue happens only occasionally):

This is important as more people start to work on the codebase, ensuring further changes are tested and that it is easy to follow existing examples to create new tests before changing/adding functionality, increasing velocity.

@absoludity absoludity added component/apis-server Issue related to kubeapps api-server priority/high labels May 21, 2021
@ppbaena ppbaena added component/ci Issue related to kubeapps ci system kind/feature An issue that reports a feature (approved) to be implemented and removed kind/tech-debt labels May 21, 2021
@absoludity
Copy link
Contributor Author

Just adding all three of us as assignees since we'll all be adding unit tests as we go :)

@gfichtenholt
Copy link
Contributor

I think in addition to unit-tests we should also have a end-2-end tests, where we stand up a cluster deploy carvel/flux on it test out our apis against that. I can open a separate issue for that if you think its best

@antgamdia
Copy link
Contributor

Yes, I agree. We already spin up a cluster as part of the usual CI process, as described in [1]. It's a good idea to continue working on improving our test suite. Let's file a new issue so that we can track the progress we make (eg. installing carvel and flux, etc).
However, I wouldn't start working/landing on those tests yet, since there are a few temporary things waiting to be defined.

Personally, currently, I'm working with a Postman collection where I track the (rest-ish) API calls
image

[1] https://github.com/kubeapps/kubeapps/blob/master/docs/developer/end-to-end-tests.md#end-to-end-tests-in-the-project.

@gfichtenholt
Copy link
Contributor

added #2881

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/apis-server Issue related to kubeapps api-server component/ci Issue related to kubeapps ci system kind/feature An issue that reports a feature (approved) to be implemented
Projects
None yet
Development

No branches or pull requests

4 participants