diff options
author | Corey Hulen <corey@hulen.com> | 2017-08-16 09:51:45 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-08-16 09:51:45 -0700 |
commit | 0ab490845aed0ce3b58cbffd8ec35be237abda1c (patch) | |
tree | 5310cce7e546f5a03f97245af473b62d382028e8 /api4/post_test.go | |
parent | 32265df8be5d530f5b79284792afb9451464ad3a (diff) | |
download | chat-0ab490845aed0ce3b58cbffd8ec35be237abda1c.tar.gz chat-0ab490845aed0ce3b58cbffd8ec35be237abda1c.tar.bz2 chat-0ab490845aed0ce3b58cbffd8ec35be237abda1c.zip |
PLT-6226 Fixing races with licensing (#7213)
* PLT-6226 Fixing races with licensing
* Fixing build issue
* Fixing licensing issue
* removing commented code
Diffstat (limited to 'api4/post_test.go')
-rw-r--r-- | api4/post_test.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/api4/post_test.go b/api4/post_test.go index b7ed06bd4..c09cb77d1 100644 --- a/api4/post_test.go +++ b/api4/post_test.go @@ -366,18 +366,18 @@ func TestUpdatePost(t *testing.T) { Client := th.Client channel := th.BasicChannel - isLicensed := utils.IsLicensed - license := utils.License + isLicensed := utils.IsLicensed() + license := utils.License() allowEditPost := *utils.Cfg.ServiceSettings.AllowEditPost defer func() { - utils.IsLicensed = isLicensed - utils.License = license + utils.SetIsLicensed(isLicensed) + utils.SetLicense(license) *utils.Cfg.ServiceSettings.AllowEditPost = allowEditPost utils.SetDefaultRolesBasedOnConfig() }() - utils.IsLicensed = true - utils.License = &model.License{Features: &model.Features{}} - utils.License.Features.SetDefaults() + utils.SetIsLicensed(true) + utils.SetLicense(&model.License{Features: &model.Features{}}) + utils.License().Features.SetDefaults() *utils.Cfg.ServiceSettings.AllowEditPost = model.ALLOW_EDIT_POST_ALWAYS utils.SetDefaultRolesBasedOnConfig() @@ -445,18 +445,18 @@ func TestPatchPost(t *testing.T) { Client := th.Client channel := th.BasicChannel - isLicensed := utils.IsLicensed - license := utils.License + isLicensed := utils.IsLicensed() + license := utils.License() allowEditPost := *utils.Cfg.ServiceSettings.AllowEditPost defer func() { - utils.IsLicensed = isLicensed - utils.License = license + utils.SetIsLicensed(isLicensed) + utils.SetLicense(license) *utils.Cfg.ServiceSettings.AllowEditPost = allowEditPost utils.SetDefaultRolesBasedOnConfig() }() - utils.IsLicensed = true - utils.License = &model.License{Features: &model.Features{}} - utils.License.Features.SetDefaults() + utils.SetIsLicensed(true) + utils.SetLicense(&model.License{Features: &model.Features{}}) + utils.License().Features.SetDefaults() *utils.Cfg.ServiceSettings.AllowEditPost = model.ALLOW_EDIT_POST_ALWAYS utils.SetDefaultRolesBasedOnConfig() |