Skip to content

Commit

Permalink
Add more tests, fix more logic
Browse files Browse the repository at this point in the history
  • Loading branch information
prymitive committed Jan 17, 2022
1 parent 80d69c6 commit 8eb9fb2
Show file tree
Hide file tree
Showing 7 changed files with 2,899 additions and 690 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

- `promql/rate`, `query/series` and `promql/vector_matching` checks were not enabled
for all defined `prometheus {}` blocks unless there was at least one `rule {}` block.
- `annotation` based `match` blocks didn't work correctly.

## v0.6.6

Expand Down
3 changes: 3 additions & 0 deletions internal/checks/alerts_annotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ type AnnotationCheck struct {
}

func (c AnnotationCheck) String() string {
if c.valueRe != nil {
return fmt.Sprintf("%s(%s=~%s:%v)", AnnotationCheckName, c.key, c.valueRe, c.isReguired)
}
return fmt.Sprintf("%s(%s:%v)", AnnotationCheckName, c.key, c.isReguired)
}

Expand Down
Loading

0 comments on commit 8eb9fb2

Please sign in to comment.