summaryrefslogtreecommitdiffstats
path: root/api/user_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-02-28 16:39:25 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2017-02-28 16:39:25 -0500
commit5e9adddb6f19a8d18d568871559495ea51b401ae (patch)
treeadb7f82df01611d56f6f31b6e870afd0540a1b71 /api/user_test.go
parent5a3bc43668353e41949d2d48c8956eaa9d061860 (diff)
downloadchat-5e9adddb6f19a8d18d568871559495ea51b401ae.tar.gz
chat-5e9adddb6f19a8d18d568871559495ea51b401ae.tar.bz2
chat-5e9adddb6f19a8d18d568871559495ea51b401ae.zip
Reload license from DB for all cluster app servers (#5525)
* Reload license from DB for all cluster app servers * Increase test timeout
Diffstat (limited to 'api/user_test.go')
-rw-r--r--api/user_test.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/api/user_test.go b/api/user_test.go
index 68472c6d1..01784fadf 100644
--- a/api/user_test.go
+++ b/api/user_test.go
@@ -1823,16 +1823,19 @@ func TestUpdateMfa(t *testing.T) {
th := Setup().InitBasic()
Client := th.BasicClient
- if utils.License.Features.MFA == nil {
- utils.License.Features.MFA = new(bool)
- }
-
+ isLicensed := utils.IsLicensed
+ license := utils.License
enableMfa := *utils.Cfg.ServiceSettings.EnableMultifactorAuthentication
defer func() {
- utils.IsLicensed = false
- *utils.License.Features.MFA = false
+ utils.IsLicensed = isLicensed
+ utils.License = license
*utils.Cfg.ServiceSettings.EnableMultifactorAuthentication = enableMfa
}()
+ utils.IsLicensed = false
+ utils.License = &model.License{Features: &model.Features{}}
+ if utils.License.Features.MFA == nil {
+ utils.License.Features.MFA = new(bool)
+ }
team := model.Team{DisplayName: "Name", Name: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN}
rteam, _ := Client.CreateTeam(&team)