test: fix use of t.Logf where t.Log would suffice (#16328)

This commit is contained in:
Mathias Fredriksson
2025-01-29 14:35:04 +00:00
committed by GitHub
parent 6caa29a29f
commit c069563af1
15 changed files with 39 additions and 39 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ func TestDeleteOldWorkspaceAgentStats(t *testing.T) {
defer func() {
if t.Failed() {
t.Logf("Test failed, printing rows...")
t.Log("Test failed, printing rows...")
ctx := testutil.Context(t, testutil.WaitShort)
buf := &bytes.Buffer{}
enc := json.NewEncoder(buf)
+2 -2
View File
@@ -283,9 +283,9 @@ func TestMigrateUpWithFixtures(t *testing.T) {
}
}
if len(emptyTables) > 0 {
t.Logf("The following tables have zero rows, consider adding fixtures for them or create a full database dump:")
t.Log("The following tables have zero rows, consider adding fixtures for them or create a full database dump:")
t.Errorf("tables have zero rows: %v", emptyTables)
t.Logf("See https://github.com/coder/coder/blob/main/docs/CONTRIBUTING.md#database-fixtures-for-testing-migrations for more information")
t.Log("See https://github.com/coder/coder/blob/main/docs/CONTRIBUTING.md#database-fixtures-for-testing-migrations for more information")
}
})