From 1d6a95f80a5bd3be4b1d926d2452cef830e81636 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 25 Apr 2026 20:42:15 +0800 Subject: [PATCH] fix test --- modules/git/git.go | 2 +- modules/testlogger/testlogger.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/git/git.go b/modules/git/git.go index d70d2446010..69eb07d1f0b 100644 --- a/modules/git/git.go +++ b/modules/git/git.go @@ -198,7 +198,7 @@ func runGitTests(m interface{ Run() int }) int { setting.Git.HomePath = gitHomePath if err = InitFull(); err != nil { - return testlogger.MainErrorf("failed to call Init: %s", err) + return testlogger.MainErrorf("failed to call Init: %v", err) } return m.Run() } diff --git a/modules/testlogger/testlogger.go b/modules/testlogger/testlogger.go index 2eeede878fa..151ca397032 100644 --- a/modules/testlogger/testlogger.go +++ b/modules/testlogger/testlogger.go @@ -118,7 +118,7 @@ func PrintCurrentTest(t testing.TB, skip ...int) func() { deferHasRun := false t.Cleanup(func() { if !deferHasRun { - stdoutPrintf("!!! %s defer function hasn't been run but Cleanup is called, usually caused by panic\n", t.Name()) + stdoutPrintf("!!! %s: defer function hasn't been run but Cleanup is called, usually caused by panic\n", t.Name()) } }) stdoutPrintf("=== %s (%s:%d)\n", log.NewColoredValue(t.Name()), strings.TrimPrefix(filename, prefix), line)