-
Notifications
You must be signed in to change notification settings - Fork 40
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 more expression operator tests for alert profiles and fix cleaning in ExpressionForm #2752
Add more expression operator tests for alert profiles and fix cleaning in ExpressionForm #2752
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2752 +/- ##
=======================================
Coverage 55.61% 55.61%
=======================================
Files 567 567
Lines 41247 41247
=======================================
Hits 22941 22941
Misses 18306 18306 ☔ View full report in Codecov by Sentry. |
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.
Suggestion: split the ip-address and sysname tests into separate classes (and the tests for the remainder stays where they are. This highlights that ip-address and sysname are special snowflakes.
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.
For future polish:
Rename TestsExpressions
to TestAddExpressions
and remove alertprofiles_add_expression_with_
from every method name since it is redundant.
94b3460
to
f325211
Compare
Kudos, SonarCloud Quality Gate passed!
|
Add more tests to make sure that all kind of values can be posted for all different operators.
That also revealed that only in case of the equal operator with values being selected from a list that value is then sent as a list. In case of sysname the value is still a string and therefore should not be cleaned the same way.
See the second commit for the specific test for that.