[MM-48416] - Fix flaky TestRequestTrialLicense - trial license user count less than current users (#21988)

Этот коммит содержится в:
Allan Guwatudde
2023-01-06 15:42:17 +03:00
коммит произвёл GitHub
родитель fd4019630f
Коммит 398476138d

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

@@ -10,7 +10,6 @@ import (
"testing" "testing"
"time" "time"
"github.com/mattermost/mattermost-server/v6/app"
"github.com/mattermost/mattermost-server/v6/app/platform" "github.com/mattermost/mattermost-server/v6/app/platform"
"github.com/mattermost/mattermost-server/v6/einterfaces/mocks" "github.com/mattermost/mattermost-server/v6/einterfaces/mocks"
"github.com/mattermost/mattermost-server/v6/model" "github.com/mattermost/mattermost-server/v6/model"
@@ -242,7 +241,6 @@ func TestRequestTrialLicense(t *testing.T) {
}) })
t.Run("trial license user count less than current users", func(t *testing.T) { t.Run("trial license user count less than current users", func(t *testing.T) {
t.Skip("MM-48416")
nUsers := 1 nUsers := 1
license := model.NewTestLicense() license := model.NewTestLicense()
license.Features.Users = model.NewInt(nUsers) license.Features.Users = model.NewInt(nUsers)
@@ -268,9 +266,9 @@ func TestRequestTrialLicense(t *testing.T) {
th.App.Srv().Platform().SetLicenseManager(licenseManagerMock) th.App.Srv().Platform().SetLicenseManager(licenseManagerMock)
defer func(requestTrialURL string) { defer func(requestTrialURL string) {
app.RequestTrialURL = requestTrialURL platform.RequestTrialURL = requestTrialURL
}(app.RequestTrialURL) }(platform.RequestTrialURL)
app.RequestTrialURL = testServer.URL platform.RequestTrialURL = testServer.URL
resp, err := th.SystemAdminClient.RequestTrialLicense(nUsers) resp, err := th.SystemAdminClient.RequestTrialLicense(nUsers)
CheckErrorID(t, err, "api.license.add_license.unique_users.app_error") CheckErrorID(t, err, "api.license.add_license.unique_users.app_error")