2021-02-15 16:56:21 +00:00
|
|
|
rule_files:
|
|
|
|
- rules.yml
|
|
|
|
|
2020-10-24 11:03:55 +00:00
|
|
|
tests:
|
2021-02-15 16:56:21 +00:00
|
|
|
# Simple failing test, depends on no rules.
|
2020-10-24 11:03:55 +00:00
|
|
|
- interval: 1m
|
2021-02-03 17:04:31 +00:00
|
|
|
name: "Failing test"
|
2020-10-24 11:03:55 +00:00
|
|
|
input_series:
|
|
|
|
- series: test
|
|
|
|
values: '0'
|
|
|
|
|
|
|
|
promql_expr_test:
|
|
|
|
- expr: test
|
|
|
|
eval_time: 0m
|
|
|
|
exp_samples:
|
|
|
|
- value: 1
|
|
|
|
labels: test
|
|
|
|
|
|
|
|
alert_rule_test:
|
|
|
|
- eval_time: 0m
|
|
|
|
alertname: Test
|
|
|
|
exp_alerts:
|
|
|
|
- exp_labels: {}
|
2021-02-15 16:56:21 +00:00
|
|
|
|
|
|
|
# Alerts firing, but no alert expected by the test.
|
|
|
|
- interval: 1m
|
|
|
|
name: Failing alert test
|
|
|
|
input_series:
|
|
|
|
- series: 'up{job="test"}'
|
|
|
|
values: 0x10
|
|
|
|
|
|
|
|
alert_rule_test:
|
|
|
|
- eval_time: 5m
|
|
|
|
alertname: InstanceDown
|
|
|
|
exp_alerts: []
|
|
|
|
- eval_time: 5m
|
|
|
|
alertname: AlwaysFiring
|
|
|
|
exp_alerts: []
|