mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	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.
This commit is contained in:
		| @@ -28,8 +28,9 @@ var localMetas = map[string]string{ | ||||
| } | ||||
|  | ||||
| func TestMain(m *testing.M) { | ||||
| 	setting.InitProviderAllowEmpty() | ||||
| 	setting.LoadCommonSettings() | ||||
| 	setting.Init(&setting.Options{ | ||||
| 		AllowEmpty: true, | ||||
| 	}) | ||||
| 	if err := git.InitSimple(context.Background()); err != nil { | ||||
| 		log.Fatal("git init failed, err: %v", err) | ||||
| 	} | ||||
|   | ||||
| @@ -33,8 +33,9 @@ var localMetas = map[string]string{ | ||||
| } | ||||
|  | ||||
| func TestMain(m *testing.M) { | ||||
| 	setting.InitProviderAllowEmpty() | ||||
| 	setting.LoadCommonSettings() | ||||
| 	setting.Init(&setting.Options{ | ||||
| 		AllowEmpty: true, | ||||
| 	}) | ||||
| 	if err := git.InitSimple(context.Background()); err != nil { | ||||
| 		log.Fatal("git init failed, err: %v", err) | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user