-
Notifications
You must be signed in to change notification settings - Fork 51
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 operator-observability rules unit test #1776
Conversation
/lgtm |
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
Please consider splitting to commits, one that does the vendoring and one for the code changes, here it is easy to review, but when it isn't it is much better.
Do we need all the PR referenced ? it is nice to have, but maybe lets trim the list please to the most important ones?
@@ -0,0 +1,13 @@ | |||
package rules |
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.
please use package rules_test (both files)
all the functions that you are testing are already external so it is easy
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.
I had to import rules package for using some functions, but done.
Vendor grafana/regexp package, as it's needed for the alerts and recording rules testing Signed-off-by: assafad <aadmi@redhat.com>
Add rules unit test, which ensures that alerts and recording rules definitions are following conventions. Signed-off-by: assafad <aadmi@redhat.com>
Quality Gate passedIssues Measures |
@oshoval Done. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: oshoval The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
Add operator-observability rules unit test, which ensures that alerts and recording rules definitions are following the monitoring best practices, e.g. alerts have all the required annotations and labels with expected values, recording rules have expressions, etc.
Fixes https://issues.redhat.com/browse/CNV-36763
Other PRs references: kubevirt/hyperconverged-cluster-operator#2827, kubevirt/kubevirt#11454
/cc @machadovilaca, @oshoval
Release note: