Skip to content

Commit

Permalink
Added new test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Tarhan committed Aug 29, 2023
1 parent a979065 commit 2096b73
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions cmd/pint/tests/0142l_offset.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
pint.error --no-color lint rules
! stdout .
cmp stderr stderr.txt

-- stderr.txt --
level=info msg="Loading configuration file" path=.pint.hcl
rules/0001.yml:4 Warning: the cloud_metric offset 3m metric requires a minimum offset of 5m0s (promql/offset)
6 | expr: cloud_metric offset 3m

level=info msg="Problems found" Warning=1
-- rules/0001.yml --
- alert: ignored
expr: regular_metric
- alert: not ok
expr: cloud_metric offset 3m
- alert: ok
expr: cloud_metric offset 10m

-- .pint.hcl --
parser {
relaxed = [".*"]
}
rule {
offset {
prefix = "cloud_.*"
min = 5m
}
}

0 comments on commit 2096b73

Please # to comment.