Skip to content

Commit

Permalink
[fix] Add bigger flexibility to alerts tests
Browse files Browse the repository at this point in the history
  • Loading branch information
llowinge authored and astefanutti committed Feb 11, 2021
1 parent 8d61a70 commit 80afc24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion e2e/yaks/openshift/monitoring/alerting.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ Feature: Alerts from Camel-K are propagated to Openshift Prometheus
Given HTTP request header Authorization is "Bearer ${openshift.token}"
When send GET /api/v1/rules
Then verify HTTP response expressions
| $..rules[?(@.labels.namespace == '${YAKS_NAMESPACE}' && @.state == 'pending')].name | CamelKBuildFailure |
| $..rules[?(@.labels.namespace == '${YAKS_NAMESPACE}' && @.state == 'firing')].name | CamelKBuildFailure |
And receive HTTP 200
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ spec:
for {{ $labels.job }} have their duration above 5m.
- alert: CamelKBuildFailure
expr: |
sum(rate(camel_k_build_duration_seconds_count{result="Failed"}[5m])) by (job)
sum(rate(camel_k_build_duration_seconds_count{result="Failed"}[20m])) by (job)
/
sum(rate(camel_k_build_duration_seconds_count[5m])) by (job)
sum(rate(camel_k_build_duration_seconds_count[20m])) by (job)
* 100
> 1
for: 10m
for: 1m
labels:
severity: warning
annotations:
Expand Down

0 comments on commit 80afc24

Please sign in to comment.