From 888f4daa311665d0e7bf6e12d324280330cd2084 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 25 Apr 2026 18:40:17 +0800 Subject: [PATCH] debug --- models/unittest/testdb.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/models/unittest/testdb.go b/models/unittest/testdb.go index b179dfb6fe2..830968e858d 100644 --- a/models/unittest/testdb.go +++ b/models/unittest/testdb.go @@ -47,7 +47,13 @@ func mainTest(m *testing.M, testOptsArg ...*TestOptions) int { if err != nil { testlogger.Panicf("TempDir: %v\n", err) } - defer appDataCleanup() + + // FIXME: debug + _, _ = fmt.Fprintf(os.Stderr, "Prepare APP_DATA_PATH for SetupGiteaTestEnv: %s\n", appDataPath) + defer func() { + _, _ = fmt.Fprintf(os.Stderr, "Remove APP_DATA_PATH for SetupGiteaTestEnv: %s\n", appDataPath) + appDataCleanup() + }() _ = os.Setenv("GITEA_TEST_CONF_CONTENT", ` [server] APP_DATA_PATH = `+appDataPath+`