mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-14 03:04:37 +00:00
fine tune
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
// Tests here reload the config system multiple times with uncontrollable details.
|
||||
// So it must be in a separate package, to avoid affect other tests
|
||||
// So it must be in a separate package, to avoid affecting other tests
|
||||
|
||||
package cmdtest
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ func mainTest(m *testing.M, testOptsArg ...*TestOptions) int {
|
||||
defer appDataCleanup()
|
||||
_ = os.Setenv("GITEA_TEST_CONF_CONTENT", `
|
||||
[server]
|
||||
APP_DATA_PATH = "`+appDataPath+`"
|
||||
APP_DATA_PATH = `+appDataPath+`
|
||||
`)
|
||||
setting.SetupGiteaTestEnv()
|
||||
if setting.RepoRootPath == "" || setting.AppDataPath == "" {
|
||||
|
||||
@@ -65,7 +65,7 @@ func SetupGiteaTestEnv() {
|
||||
giteaConf = "custom/conf/app-test-tmp.ini"
|
||||
customConfBuiltin = filepath.Join(AppWorkPath, giteaConf)
|
||||
CustomConf = customConfBuiltin
|
||||
_ = os.WriteFile(CustomConf, []byte(os.Getenv("GITEA_TEST_CONF_CONTENT")), os.ModePerm)
|
||||
_ = os.WriteFile(CustomConf, []byte(os.Getenv("GITEA_TEST_CONF_CONTENT")), 0o644)
|
||||
} else {
|
||||
// CustomConf must be absolute path to make tests pass,
|
||||
CustomConf = filepath.Join(AppWorkPath, giteaConf)
|
||||
|
||||
Reference in New Issue
Block a user