Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Jogeleit <[email protected]>
  • Loading branch information
fjogeleit committed Nov 9, 2023
1 parent d27e2e4 commit 2148a09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/listener/metrics/model_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,8 @@ func Test_LabelMappings(t *testing.T) {
if val, ok := results["kind"]; !ok && val != "" {
t.Errorf("expected empty name without resource, got: %s", val)
}
metrics.LabelGeneratorMapping["message"](results, preport, fixtures.FailPodResult)
if val, ok := results["namespace"]; !ok && val != fixtures.FailPodResult.Message {
t.Errorf("expected result for message label not found: %s", val)
}
}

0 comments on commit 2148a09

Please sign in to comment.