diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-09 14:59:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-09 14:59:48 -0700 |
commit | bff2b5e735ae7fc80157b4108ddbe56be8acb752 (patch) | |
tree | 14867d2bff71b6b638b0b358b1f38eb062cb597f /app/apptestlib.go | |
parent | 0f66b6e72621842467d0e368b95ee58f485d4ace (diff) | |
download | chat-bff2b5e735ae7fc80157b4108ddbe56be8acb752.tar.gz chat-bff2b5e735ae7fc80157b4108ddbe56be8acb752.tar.bz2 chat-bff2b5e735ae7fc80157b4108ddbe56be8acb752.zip |
Miscellaneous app cleanup (#7594)
* app cleanup
* whoops, forgot a file
* some minor cleanup
* longer container deadline
* defensive checks
Diffstat (limited to 'app/apptestlib.go')
-rw-r--r-- | app/apptestlib.go | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/app/apptestlib.go b/app/apptestlib.go index 29139ac39..09bf02d39 100644 --- a/app/apptestlib.go +++ b/app/apptestlib.go @@ -22,26 +22,23 @@ type TestHelper struct { } func setupTestHelper(enterprise bool) *TestHelper { + utils.TranslationsPreInit() + utils.LoadConfig("config.json") + utils.InitTranslations(utils.Cfg.LocalizationSettings) + th := &TestHelper{ App: New(), } - if th.App.Srv == nil { - utils.TranslationsPreInit() - utils.LoadConfig("config.json") - utils.InitTranslations(utils.Cfg.LocalizationSettings) - *utils.Cfg.TeamSettings.MaxUsersPerTeam = 50 - *utils.Cfg.RateLimitSettings.Enable = false - utils.DisableDebugLogForTest() - th.App.NewServer() - th.App.InitStores() - th.App.StartServer() - utils.InitHTML() - utils.EnableDebugLogForTest() - th.App.Srv.Store.MarkSystemRanUnitTests() - - *utils.Cfg.TeamSettings.EnableOpenServer = true - } + *utils.Cfg.TeamSettings.MaxUsersPerTeam = 50 + *utils.Cfg.RateLimitSettings.Enable = false + utils.DisableDebugLogForTest() + th.App.StartServer() + utils.InitHTML() + utils.EnableDebugLogForTest() + th.App.Srv.Store.MarkSystemRanUnitTests() + + *utils.Cfg.TeamSettings.EnableOpenServer = true utils.SetIsLicensed(enterprise) if enterprise { |