diff --git a/prometheus/testutil/testutil.go b/prometheus/testutil/testutil.go index e344cc8..4c72bc6 100644 --- a/prometheus/testutil/testutil.go +++ b/prometheus/testutil/testutil.go @@ -165,11 +165,9 @@ func compare(got, want []*dto.MetricFamily) error { metric output does not match expectation; want: %s - got: -%s -`, wantBuf.String(), gotBuf.String()) +%s`, wantBuf.String(), gotBuf.String()) } return nil diff --git a/prometheus/testutil/testutil_test.go b/prometheus/testutil/testutil_test.go index 4812247..e1f7aab 100644 --- a/prometheus/testutil/testutil_test.go +++ b/prometheus/testutil/testutil_test.go @@ -171,7 +171,6 @@ func TestCollectAndCompareHistogram(t *testing.T) { c prometheus.Collector metadata string expect string - labels []string observation float64 }{ { @@ -291,13 +290,11 @@ metric output does not match expectation; want: # TYPE some_other_metric counter some_other_metric{label1="value1"} 1.0 - got: # HELP some_total A value that represents a counter. # TYPE some_total counter some_total{label1="value1"} 1.0 - ` err := CollectAndCompare(c, strings.NewReader(metadata+expected)) @@ -306,6 +303,6 @@ some_total{label1="value1"} 1.0 } if err.Error() != expectedError { - t.Errorf("Expected\n%#+v\nGot:\n%#+v\n", expectedError, err.Error()) + t.Errorf("Expected\n%#+v\nGot:\n%#+v", expectedError, err.Error()) } }