Refactoring cfg refs and load / save functions (#7749)
* refactoring cfg refs and load / save functions * improve error output
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
b446d0aa0a
Коммит
ce2b2be5de
@@ -64,12 +64,6 @@ func StopTestStore() {
|
||||
}
|
||||
|
||||
func setupTestHelper(enterprise bool) *TestHelper {
|
||||
if utils.T == nil {
|
||||
utils.TranslationsPreInit()
|
||||
}
|
||||
utils.LoadConfig("config.json")
|
||||
utils.InitTranslations(utils.Cfg.LocalizationSettings)
|
||||
|
||||
var options []app.Option
|
||||
if testStore != nil {
|
||||
options = append(options, app.StoreOverride(testStore))
|
||||
@@ -80,9 +74,11 @@ func setupTestHelper(enterprise bool) *TestHelper {
|
||||
}
|
||||
th.originalConfig = th.App.Config().Clone()
|
||||
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.TeamSettings.MaxUsersPerTeam = 50 })
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.RateLimitSettings.Enable = false })
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { cfg.EmailSettings.SendEmailNotifications = true })
|
||||
th.App.UpdateConfig(func(cfg *model.Config) {
|
||||
*cfg.TeamSettings.MaxUsersPerTeam = 50
|
||||
*cfg.RateLimitSettings.Enable = false
|
||||
cfg.EmailSettings.SendEmailNotifications = true
|
||||
})
|
||||
utils.DisableDebugLogForTest()
|
||||
prevListenAddress := *th.App.Config().ServiceSettings.ListenAddress
|
||||
if testStore != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user