cmd/geth: fix logging test

This commit is contained in:
Felix Lange 2025-09-11 18:50:25 +02:00
parent d83ebf8f34
commit da5747990d

View file

@ -91,7 +91,7 @@ func testConsoleLogging(t *testing.T, format string, tStart, tEnd int) {
have = censor(have, tStart, tEnd) have = censor(have, tStart, tEnd)
want = censor(want, tStart, tEnd) want = censor(want, tStart, tEnd)
if have != want { if have != want {
t.Logf(nicediff([]byte(have), []byte(want))) t.Log(nicediff([]byte(have), []byte(want)))
t.Fatalf("format %v, line %d\nhave %v\nwant %v", format, i, have, want) t.Fatalf("format %v, line %d\nhave %v\nwant %v", format, i, have, want)
} }
} }
@ -142,7 +142,7 @@ func TestJsonLogging(t *testing.T) {
} }
if !bytes.Equal(have, want) { if !bytes.Equal(have, want) {
// show an intelligent diff // show an intelligent diff
t.Logf(nicediff(have, want)) t.Log(nicediff(have, want))
t.Errorf("file content wrong") t.Errorf("file content wrong")
} }
} }
@ -211,7 +211,7 @@ func TestFileOut(t *testing.T) {
} }
if !bytes.Equal(have, want) { if !bytes.Equal(have, want) {
// show an intelligent diff // show an intelligent diff
t.Logf(nicediff(have, want)) t.Log(nicediff(have, want))
t.Errorf("file content wrong") t.Errorf("file content wrong")
} }
} }
@ -231,7 +231,7 @@ func TestRotatingFileOut(t *testing.T) {
} }
if !bytes.Equal(have, want) { if !bytes.Equal(have, want) {
// show an intelligent diff // show an intelligent diff
t.Logf(nicediff(have, want)) t.Log(nicediff(have, want))
t.Errorf("file content wrong") t.Errorf("file content wrong")
} }
} }