Check for cloud license and CWS error when checking integration freemium limits (#20387)

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Michael Kochell
2022-06-09 15:57:02 -04:00
коммит произвёл GitHub
родитель 71cdd9e486
Коммит e18b1cf89f
3 изменённых файлов: 32 добавлений и 2 удалений

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

@@ -250,6 +250,8 @@ func TestUpdateConfig(t *testing.T) {
})
t.Run("Should not be able to save config if the new config exceeds Freemium limits", func(t *testing.T) {
th.App.Srv().SetLicense(model.NewTestLicense("cloud"))
defer th.App.Srv().RemoveLicense()
os.Setenv("MM_FEATUREFLAGS_CLOUDFREE", "true")
defer os.Unsetenv("MM_FEATUREFLAGS_CLOUDFREE")
th.App.ReloadConfig()
@@ -853,6 +855,8 @@ func TestPatchConfig(t *testing.T) {
})
t.Run("Should not be able to save config if the new config exceeds Freemium limits", func(t *testing.T) {
th.App.Srv().SetLicense(model.NewTestLicense("cloud"))
defer th.App.Srv().RemoveLicense()
os.Setenv("MM_FEATUREFLAGS_CLOUDFREE", "true")
defer os.Unsetenv("MM_FEATUREFLAGS_CLOUDFREE")
th.App.ReloadConfig()