summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-05-04 11:55:35 +0800
committerGitHub <noreply@github.com>2023-05-04 11:55:35 +0800
commit377a0a20f01a62f15a1504a3bba6cf6cc0c98bea (patch)
treee86a1818f23be1605a4cd707fadc7dcdce546d18 /tests
parenta2fe68e50ba819daed9b0e28166a749d18c58750 (diff)
downloadgitea-377a0a20f01a62f15a1504a3bba6cf6cc0c98bea.tar.gz
gitea-377a0a20f01a62f15a1504a3bba6cf6cc0c98bea.zip
Merge setting.InitXXX into one function with options (#24389)
This PR will merge 3 Init functions on setting packages as 1 and introduce an options struct.
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/migration-test/migration_test.go2
-rw-r--r--tests/test_utils.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/integration/migration-test/migration_test.go b/tests/integration/migration-test/migration_test.go
index 4152379a9b..a68d458a0b 100644
--- a/tests/integration/migration-test/migration_test.go
+++ b/tests/integration/migration-test/migration_test.go
@@ -57,7 +57,7 @@ func initMigrationTest(t *testing.T) func() {
setting.CustomConf = giteaConf
}
- setting.InitProviderAndLoadCommonSettingsForTest()
+ unittest.InitSettings()
assert.True(t, len(setting.RepoRootPath) != 0)
assert.NoError(t, util.RemoveAll(setting.RepoRootPath))
diff --git a/tests/test_utils.go b/tests/test_utils.go
index 0f4aa26a60..c22b2c356c 100644
--- a/tests/test_utils.go
+++ b/tests/test_utils.go
@@ -74,7 +74,7 @@ func InitTest(requireGitea bool) {
}
setting.SetCustomPathAndConf("", "", "")
- setting.InitProviderAndLoadCommonSettingsForTest()
+ unittest.InitSettings()
setting.Repository.DefaultBranch = "master" // many test code still assume that default branch is called "master"
_ = util.RemoveAll(repo_module.LocalCopyPath())