-
Notifications
You must be signed in to change notification settings - Fork 22
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 ConditionsMatch function #397
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #397 +/- ##
==========================================
+ Coverage 77.98% 78.12% +0.13%
==========================================
Files 47 47
Lines 1958 1970 +12
==========================================
+ Hits 1527 1539 +12
Misses 373 373
Partials 58 58
|
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.
Looks good. However we need unit tests :)
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.
Apart from the comments below, could you please provide a little bit of context for why this new function is needed? codeready-toolchain/registration-service#411 (which is linked from SANDBOX-554) was closed more than a month ago and does not use this change.
@metlos thanks for the review - this PR is not actually new code, it's just a refactoring to move existing code to a different package in order to allow it to be used outside of the tests. It is already used extensively throughout the dev sandbox codebase and very well tested, so i'm hesitant to change any of it at this point. |
This is supposed to be used in this PR: codeready-toolchain/host-operator#988 |
Regarding the
And in the test package:
|
Sure, it makes completely sense to match the message in the tests, but why moving it out of the pkg/test/ package? All these functions that are there can be (and are) already used by unit tests in host-operator see https://github.com/codeready-toolchain/host-operator/blob/423ebbae4392a3752562f9f975e8db3532b31b2d/controllers/usersignup/usersignup_controller_test.go#L33 |
Shane wants to use it in runtime too. See the new predicate code in the host operator PR: https://github.com/codeready-toolchain/host-operator/pull/988/files#diff-686778ddb77570eda2cfd3b717a28573e5b4399c35d7f85936143fe0feff0dedR52 |
ok, this is exactly what I was looking for, thanks for the link. |
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.
Looks good overall. Just a couple of minor comments regarding missing function descriptions. And also it looks like you can add a bit more tests.
Quality Gate passedIssues Measures |
Refactor to move conditions testing functions from the test package to the conditions package so that they may be used outside of tests