Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
caryttd committed Aug 31, 2023
1 parent 40e8e79 commit 4fac073
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion internal/checks/promql_counter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,17 @@ func TestCounterCheck(t *testing.T) {
content: "- record: foo\n expr: rate(foo[5m])\n",
checker: newCounterCheck,
prometheus: newSimpleProm,
problems: noProblems,
problems: func(uri string) []checks.Problem {
return []checks.Problem{
{
Fragment: "foo",
Lines: []int{2},
Reporter: "promql/counter",
Text: checkErrorUnableToRun(checks.CounterCheckName, "prom", uri, "server_error: internal error"),
Severity: checks.Bug,
},
}
},
mocks: []*prometheusMock{
{
conds: []requestCondition{requireMetadataPath},
Expand Down

0 comments on commit 4fac073

Please # to comment.