diff --git a/metrics/opentsdb_test.go b/metrics/opentsdb_test.go index 4548309f9c..d13973a588 100644 --- a/metrics/opentsdb_test.go +++ b/metrics/opentsdb_test.go @@ -46,7 +46,8 @@ func TestExampleOpenTSB(t *testing.T) { if err != nil { t.Fatal(err) } - if have, want := w.String(), string(wantB); have != want { + want := strings.ReplaceAll(string(wantB), "\r\n", "\n") + if have := w.String(); have != want { t.Errorf("\nhave:\n%v\nwant:\n%v\n", have, want) t.Logf("have vs want:\n%v", findFirstDiffPos(have, want)) }