mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-19 22:14:58 +00:00
test: stop tests from writing into ~/.ssh (#39348)
This commit is contained in:
@@ -121,6 +121,8 @@ func SetupGiteaTestEnv() {
|
||||
panic("SetupGiteaTestEnv failed, paths are not initialized")
|
||||
}
|
||||
|
||||
SSH.RootPath = AppDataTempDir("ssh").JoinPath() // prevent tests from writing into ~/.ssh
|
||||
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user