forked from kevadesu/forgejo
Refactor env var related code (#33075)
And add more comments (cherry picked from commit 4f386e2c5e39b860424faf4cbc02c16f641f956e) Conflicts: cmd/main_test.go tests/integration/integration_test.go trivial context conflicts
This commit is contained in:
parent
6208d5f5c2
commit
e507fa30df
5 changed files with 32 additions and 52 deletions
|
@ -60,6 +60,12 @@ func InitSettings() {
|
|||
|
||||
setting.PasswordHashAlgo, _ = hash.SetDefaultPasswordHashAlgorithm("dummy")
|
||||
setting.InitGiteaEnvVars()
|
||||
|
||||
// Avoid loading the git's system config.
|
||||
// On macOS, system config sets the osxkeychain credential helper, which will cause tests to freeze with a dialog.
|
||||
// But we do not set it in production at the moment, because it might be a "breaking" change,
|
||||
// more details are in "modules/git.commonBaseEnvs".
|
||||
_ = os.Setenv("GIT_CONFIG_NOSYSTEM", "true")
|
||||
}
|
||||
|
||||
// TestOptions represents test options
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue