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

add unit tests for fluxv2 plugin GetAvailablePackages #2892

Merged
merged 23 commits into from
May 27, 2021

Conversation

gfichtenholt
Copy link
Contributor

No description provided.

@gfichtenholt gfichtenholt self-assigned this May 26, 2021
Copy link
Contributor

@absoludity absoludity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Greg.

), nil
},
statusCode: codes.OK,
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The previous two tests differ only in that one has a nil conditions, the other has an empty map? Fine either way, but normally (for me) this indicates that the function itself is perhaps dealing with too many details. So, for example, if the functionality that checks if the repo is ready was pulled out to a separate function, func isRepoReady(*unstructured.Unstructured) bool (which can be unit-tested independently), then the unit tests for this current function, GetAvailablePackages, don't need to iterate through all the permutations of those details, nor care about them.

Again, fine as is, just a thought.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good suggestion. I will make that change. Thanks

@gfichtenholt gfichtenholt merged commit 68deb8d into vmware-tanzu:master May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add end-2-end tests that test core api server and plug-ins features
2 participants