Skip to content

Commit

Permalink
integration: add test asserting metrics have the required prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
nadiamoe committed Feb 7, 2025
1 parent fd6c87c commit 7364a6b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions integration/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"path/filepath"
"runtime"
"slices"
"strings"
"testing"
"time"

Expand Down Expand Up @@ -305,6 +306,16 @@ func TestSMK6(t *testing.T) {
})
}
})

t.Run("metrics have required prefix", func(t *testing.T) {
t.Parallel()

for _, m := range mfs {
if !strings.HasPrefix(*m.Name, "probe_") {
t.Fatalf("Metric %q not have the required prefix", *m.Name)
}
}
})
}

func equals(expected float64) func(float64) bool {
Expand Down

0 comments on commit 7364a6b

Please sign in to comment.