summaryrefslogtreecommitdiffstats
path: root/web/web_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-10-09 14:59:48 -0700
committerGitHub <noreply@github.com>2017-10-09 14:59:48 -0700
commitbff2b5e735ae7fc80157b4108ddbe56be8acb752 (patch)
tree14867d2bff71b6b638b0b358b1f38eb062cb597f /web/web_test.go
parent0f66b6e72621842467d0e368b95ee58f485d4ace (diff)
downloadchat-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 'web/web_test.go')
-rw-r--r--web/web_test.go33
1 files changed, 15 insertions, 18 deletions
diff --git a/web/web_test.go b/web/web_test.go
index f4e231b30..6cc75fac1 100644
--- a/web/web_test.go
+++ b/web/web_test.go
@@ -18,25 +18,22 @@ var ApiClient *model.Client
var URL string
func Setup() *app.App {
+ utils.TranslationsPreInit()
+ utils.LoadConfig("config.json")
+ utils.InitTranslations(utils.Cfg.LocalizationSettings)
+
a := app.New()
- if a.Srv == nil {
- utils.TranslationsPreInit()
- utils.LoadConfig("config.json")
- utils.InitTranslations(utils.Cfg.LocalizationSettings)
- a.NewServer()
- a.InitStores()
- a.Srv.Router = api.NewRouter()
- a.StartServer()
- api4.Init(a, a.Srv.Router, false)
- api3 := api.Init(a, a.Srv.Router)
- Init(api3)
- URL = "http://localhost" + *utils.Cfg.ServiceSettings.ListenAddress
- ApiClient = model.NewClient(URL)
-
- a.Srv.Store.MarkSystemRanUnitTests()
-
- *utils.Cfg.TeamSettings.EnableOpenServer = true
- }
+ a.StartServer()
+ api4.Init(a, a.Srv.Router, false)
+ api3 := api.Init(a, a.Srv.Router)
+ Init(api3)
+ URL = "http://localhost" + *utils.Cfg.ServiceSettings.ListenAddress
+ ApiClient = model.NewClient(URL)
+
+ a.Srv.Store.MarkSystemRanUnitTests()
+
+ *utils.Cfg.TeamSettings.EnableOpenServer = true
+
return a
}