diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-05-04 11:55:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 11:55:35 +0800 |
commit | 377a0a20f01a62f15a1504a3bba6cf6cc0c98bea (patch) | |
tree | e86a1818f23be1605a4cd707fadc7dcdce546d18 /routers/api/v1 | |
parent | a2fe68e50ba819daed9b0e28166a749d18c58750 (diff) | |
download | gitea-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 'routers/api/v1')
-rw-r--r-- | routers/api/v1/repo/main_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/routers/api/v1/repo/main_test.go b/routers/api/v1/repo/main_test.go index c7466c493f..bc048505f4 100644 --- a/routers/api/v1/repo/main_test.go +++ b/routers/api/v1/repo/main_test.go @@ -13,10 +13,11 @@ import ( ) func TestMain(m *testing.M) { - setting.InitProviderAndLoadCommonSettingsForTest() - setting.LoadQueueSettings() unittest.MainTest(m, &unittest.TestOptions{ GiteaRootPath: filepath.Join("..", "..", "..", ".."), - SetUp: webhook_service.Init, + SetUp: func() error { + setting.LoadQueueSettings() + return webhook_service.Init() + }, }) } |