Skip to content

Commit

Permalink
fix(logql-compliance-tester): print actual total
Browse files Browse the repository at this point in the history
  • Loading branch information
tdakkota committed Apr 18, 2024
1 parent 6b0d5ca commit 37980bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/logql-compliance-tester/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func outp(output io.Writer, results []*lokicompliance.Result, includePassing boo
Results []*lokicompliance.Result `json:"results,omitempty"`
IncludePassing bool `json:"includePassing"`
}
total := len(results)
if !includePassing {
var failed []*lokicompliance.Result
for _, r := range results {
Expand All @@ -59,7 +60,7 @@ func outp(output io.Writer, results []*lokicompliance.Result, includePassing boo
}

buf, err := json.MarshalIndent(JSONResult{
TotalResults: len(results),
TotalResults: total,
Results: results,
IncludePassing: includePassing,
}, "", "\t")
Expand Down

0 comments on commit 37980bd

Please sign in to comment.