diff --git a/prometheus/testutil/testutil.go b/prometheus/testutil/testutil.go index e24baf2..98ed75b 100644 --- a/prometheus/testutil/testutil.go +++ b/prometheus/testutil/testutil.go @@ -264,7 +264,6 @@ func compareMetricFamilies(got, expected []*dto.MetricFamily, metricNames ...str // The error contains the encoded text of both the desired and the actual // result. func compare(got, want []*dto.MetricFamily) error { - var gotBuf, wantBuf bytes.Buffer enc := expfmt.NewEncoder(&gotBuf, expfmt.NewFormat(expfmt.TypeTextPlain)) for _, mf := range got { diff --git a/prometheus/testutil/testutil_test.go b/prometheus/testutil/testutil_test.go index 054cf63..12cb7a8 100644 --- a/prometheus/testutil/testutil_test.go +++ b/prometheus/testutil/testutil_test.go @@ -305,22 +305,6 @@ func TestMetricNotFound(t *testing.T) { expected := ` some_other_metric{label1="value1"} 1 ` - /* - expectedError := ` - - Diff: - --- metric output does not match expectation; want - +++ got: - @@ -1,4 +1,4 @@ - -(bytes.Buffer) # HELP some_other_metric A value that represents a counter. - -# TYPE some_other_metric counter - -some_other_metric{label1="value1"} 1 - +(bytes.Buffer) # HELP some_total A value that represents a counter. - +# TYPE some_total counter - +some_total{label1="value1"} 1 - - ` - */ expectedError := `