Reload license from DB for all cluster app servers (#5525)

* Reload license from DB for all cluster app servers

* Increase test timeout
Этот коммит содержится в:
Joram Wilander
2017-02-28 16:39:25 -05:00
коммит произвёл Harrison Healey
родитель 5a3bc43668
Коммит 5e9adddb6f
10 изменённых файлов: 126 добавлений и 106 удалений

Просмотреть файл

@@ -1823,17 +1823,20 @@ func TestUpdateMfa(t *testing.T) {
th := Setup().InitBasic()
Client := th.BasicClient
isLicensed := utils.IsLicensed
license := utils.License
enableMfa := *utils.Cfg.ServiceSettings.EnableMultifactorAuthentication
defer func() {
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)
}
enableMfa := *utils.Cfg.ServiceSettings.EnableMultifactorAuthentication
defer func() {
utils.IsLicensed = false
*utils.License.Features.MFA = false
*utils.Cfg.ServiceSettings.EnableMultifactorAuthentication = enableMfa
}()
team := model.Team{DisplayName: "Name", Name: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN}
rteam, _ := Client.CreateTeam(&team)