From 5d66d2554dd458da4973a8ed9b6bc2b40ddd81c4 Mon Sep 17 00:00:00 2001 From: Thibault VINCENT Date: Fri, 5 Apr 2024 12:12:28 +0200 Subject: [PATCH] test: fix metrics parse --- internal/exporter_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/exporter_test.go b/internal/exporter_test.go index b92ca84..7200473 100644 --- a/internal/exporter_test.go +++ b/internal/exporter_test.go @@ -1014,7 +1014,7 @@ func testRequest(t *testing.T, exporter *Exporter, cb func(metrics []model.Metri var metric model.MetricFamily metrics := []model.MetricFamily{} - decoder := expfmt.NewDecoder(res.Body, expfmt.FmtText) + decoder := expfmt.NewDecoder(res.Body, expfmt.NewFormat(expfmt.TypeProtoText)) for { if err := decoder.Decode(&metric); err != nil { break