summaryrefslogtreecommitdiffstats
path: root/models/unittest/testdb.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/unittest/testdb.go')
-rw-r--r--models/unittest/testdb.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/models/unittest/testdb.go b/models/unittest/testdb.go
index 94a3253644..70110c4962 100644
--- a/models/unittest/testdb.go
+++ b/models/unittest/testdb.go
@@ -59,6 +59,13 @@ func InitSettings() {
_ = hash.Register("dummy", hash.NewDummyHasher)
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