mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-08 14:34:49 +09:00
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:
@@ -13,11 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func TestManager(t *testing.T) {
|
||||
oldAppDataPath := setting.AppDataPath
|
||||
setting.AppDataPath = t.TempDir()
|
||||
defer func() {
|
||||
setting.AppDataPath = oldAppDataPath
|
||||
}()
|
||||
|
||||
newQueueFromConfig := func(name, cfg string) (*WorkerPoolQueue[int], error) {
|
||||
cfgProvider, err := setting.NewConfigProviderFromData(cfg)
|
||||
|
||||
Reference in New Issue
Block a user