From b1974735e1ffad5d9992c013de3f1606a95a503d Mon Sep 17 00:00:00 2001 From: beorn7 Date: Sat, 3 Nov 2018 22:05:26 +0100 Subject: [PATCH] Fix TestWriteToTextfile Signed-off-by: beorn7 --- prometheus/registry_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/prometheus/registry_test.go b/prometheus/registry_test.go index fb70c29..a869d65 100644 --- a/prometheus/registry_test.go +++ b/prometheus/registry_test.go @@ -913,6 +913,11 @@ test_summary_count{name="foo"} 2 prometheus.SummaryOpts{ Name: "test_summary", Help: "test summary", + Objectives: map[float64]float64{ + 0.5: 0.05, + 0.9: 0.01, + 0.99: 0.001, + }, }, []string{"name"}, ) @@ -970,6 +975,9 @@ test_summary_count{name="foo"} 2 fileContents := string(fileBytes) if fileContents != expectedOut { - t.Error("file contents didn't match unexpected") + t.Errorf( + "files don't match, got:\n%s\nwant:\n%s", + fileContents, expectedOut, + ) } }