Skip to content

Commit

Permalink
Add extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
prymitive committed May 3, 2023
1 parent 31e793c commit 2b02b7c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions cmd/pint/tests/0138_annoation_regex_key_required.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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:1-2 Bug: annotation_.* annotation is required (alerts/annotation)
1 | - alert: Instance Is Down 1
2 | expr: up == 0

level=info msg="Problems found" Bug=1
level=fatal msg="Fatal error" error="found 1 problem(s) with severity Bug or higher"
-- rules/0001.yml --
- alert: Instance Is Down 1
expr: up == 0

-- .pint.hcl --
parser {
relaxed = [".*"]
}
rule {
annotation "annotation_.*" {
required = true
severity = "bug"
}
}

0 comments on commit 2b02b7c

Please sign in to comment.