summaryrefslogtreecommitdiffstats
path: root/api/apitestlib.go
diff options
context:
space:
mode:
authorJonathan Fritz <jonathan.fritz@mattermost.com>2018-02-13 08:39:56 -0500
committerJonathan Fritz <jonathan.fritz@mattermost.com>2018-02-13 08:39:56 -0500
commit18fa32567b56584c6e24da2ae68814d5bf8ece6f (patch)
tree311ab6a3918ba64ac665286f15950b32dc1b1dba /api/apitestlib.go
parent7b2861de3a09cf00d00b0872cc537d54302c4bfa (diff)
parent8b79f5d49cb8d4877e136a76e515edef41ef6f28 (diff)
downloadchat-18fa32567b56584c6e24da2ae68814d5bf8ece6f.tar.gz
chat-18fa32567b56584c6e24da2ae68814d5bf8ece6f.tar.bz2
chat-18fa32567b56584c6e24da2ae68814d5bf8ece6f.zip
Merge branch 'release-4.7' into XYZ-110
Diffstat (limited to 'api/apitestlib.go')
-rw-r--r--api/apitestlib.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/api/apitestlib.go b/api/apitestlib.go
index 47691b2dd..8d7f54902 100644
--- a/api/apitestlib.go
+++ b/api/apitestlib.go
@@ -105,11 +105,7 @@ func setupTestHelper(enterprise bool) *TestHelper {
if testStore != nil {
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.ListenAddress = ":0" })
}
- serverErr := th.App.StartServer()
- if serverErr != nil {
- panic(serverErr)
- }
-
+ th.App.StartServer()
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.ListenAddress = prevListenAddress })
api4.Init(th.App, th.App.Srv.Router, false)
Init(th.App, th.App.Srv.Router)
@@ -118,10 +114,9 @@ func setupTestHelper(enterprise bool) *TestHelper {
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.TeamSettings.EnableOpenServer = true })
+ utils.SetIsLicensed(enterprise)
if enterprise {
- th.App.SetLicense(model.NewTestLicense())
- } else {
- th.App.SetLicense(nil)
+ utils.License().Features.SetDefaults()
}
return th