This commit is contained in:
wxiaoguang
2026-04-25 20:24:43 +08:00
parent 0b7aee8147
commit e86d62e497
8 changed files with 113 additions and 108 deletions

View File

@@ -101,6 +101,10 @@ func SetupGiteaTestEnv() {
cleanUpEnv()
initWorkPathAndConfig()
if RepoRootPath == "" || AppDataPath == "" {
panic("SetupGiteaTestEnv failed, paths are not initialized")
}
// TODO: some git repo hooks (test fixtures) still use these env variables, need to be refactored in the future
_ = os.Setenv("GITEA_ROOT", giteaRoot)
_ = os.Setenv("GITEA_CONF", giteaConf) // test fixture git hooks use "$GITEA_ROOT/$GITEA_CONF" in their scripts