From 4731b8f9b993536ed61dbc065e161e8994253f0d Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 12 Sep 2017 14:12:29 -0500 Subject: fix plugin test (#7436) * fix plugin test * ugh. global state * Fix plugin test * Fix TestDeleteChannel * Remove plugin config listener when shutting down --- api4/apitestlib.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'api4/apitestlib.go') diff --git a/api4/apitestlib.go b/api4/apitestlib.go index d98683d32..9538eb99c 100644 --- a/api4/apitestlib.go +++ b/api4/apitestlib.go @@ -58,9 +58,6 @@ func setupTestHelper(enterprise bool) *TestHelper { *utils.Cfg.RateLimitSettings.Enable = false utils.Cfg.EmailSettings.SendEmailNotifications = true utils.DisableDebugLogForTest() - if enterprise { - utils.License().Features.SetDefaults() - } th.App.NewServer() th.App.InitStores() th.App.Srv.Router = NewRouter() @@ -74,6 +71,11 @@ func setupTestHelper(enterprise bool) *TestHelper { *utils.Cfg.TeamSettings.EnableOpenServer = true } + utils.SetIsLicensed(enterprise) + if enterprise { + utils.License().Features.SetDefaults() + } + if jobs.Srv.Store == nil { jobs.Srv.Store = th.App.Srv.Store } -- cgit v1.2.3-1-g7c22