mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
test: fix use of t.Logf where t.Log would suffice (#16328)
This commit is contained in:
@@ -181,7 +181,7 @@ func assertLogs(t testing.TB, path string, expected ...string) {
|
||||
|
||||
logs := strings.Split(strings.TrimSpace(string(data)), "\n")
|
||||
if !assert.Len(t, logs, len(expected)) {
|
||||
t.Logf(string(data))
|
||||
t.Log(string(data))
|
||||
t.FailNow()
|
||||
}
|
||||
for i, log := range logs {
|
||||
@@ -202,7 +202,7 @@ func assertLogsJSON(t testing.TB, path string, levelExpected ...string) {
|
||||
|
||||
logs := strings.Split(strings.TrimSpace(string(data)), "\n")
|
||||
if !assert.Len(t, logs, len(levelExpected)/2) {
|
||||
t.Logf(string(data))
|
||||
t.Log(string(data))
|
||||
t.FailNow()
|
||||
}
|
||||
for i, log := range logs {
|
||||
|
||||
Reference in New Issue
Block a user