Improve testing init, clean up webhook tests (#37412)
Avoid webhook test fixtures affect other tests (be triggered) Also fixed more testing problems including path init, global config pollution & conflict --------- Signed-off-by: silverwind <me@silverwind.io> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
@@ -40,7 +40,7 @@ func initMigrationTest(t *testing.T) func() {
|
||||
setting.SetupGiteaTestEnv()
|
||||
|
||||
assert.NotEmpty(t, setting.RepoRootPath)
|
||||
assert.NoError(t, unittest.SyncDirs(filepath.Join(filepath.Dir(setting.AppPath), "tests/gitea-repositories-meta"), setting.RepoRootPath))
|
||||
assert.NoError(t, unittest.SyncDirs(filepath.Join(setting.GetGiteaTestSourceRoot(), "tests/gitea-repositories-meta"), setting.RepoRootPath))
|
||||
assert.NoError(t, git.InitFull())
|
||||
setting.LoadDBSetting()
|
||||
setting.InitLoggersForTest()
|
||||
|
||||
Reference in New Issue
Block a user