-
Notifications
You must be signed in to change notification settings - Fork 707
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
Conversation
Allow adding an optional description for app repositories
There was a problem hiding this 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, | ||
}, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
No description provided.