Skip to content

Commit c05e817

Browse files
authored
Merge pull request #165 from coredns/metrics-fix
Fix prometheus update caused by CI failure. See build(deps): bump github.com/prometheus/client_golang from 1.23.0 to 1.23.2 coredns#7522 Update prometheus version coredns#7533
2 parents 1d33ad3 + dde8c11 commit c05e817

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/kubernetes/metrics_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"time"
1010

1111
"github.com/prometheus/common/expfmt"
12+
"github.com/prometheus/common/model"
1213
api "k8s.io/api/core/v1"
1314
discovery "k8s.io/api/discovery/v1"
1415
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -83,7 +84,7 @@ func testEndpoints(t *testing.T, client *kubernetes.Clientset, slices bool) {
8384

8485
// scrape and parse metrics to get base state
8586
m := ScrapeMetrics(t)
86-
var tp expfmt.TextParser
87+
tp := expfmt.NewTextParser(model.LegacyValidation)
8788
base, err := tp.TextToMetricFamilies(strings.NewReader(string(m)))
8889
if err != nil {
8990
t.Fatalf("Could not parse scraped metrics: %v", err)

0 commit comments

Comments
 (0)