[MM-48973] Enable test that was fixed separately (#22043)

* Enable test that was fixed separately

* Add cloud check to be safe

* Feedback

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Nick Misasi
2023-01-12 15:04:22 -05:00
коммит произвёл GitHub
родитель c314941317
Коммит 309df7917f
2 изменённых файлов: 8 добавлений и 7 удалений

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

@@ -102,7 +102,6 @@ func TestAddUserToTeam(t *testing.T) {
})
t.Run("block user by domain but allow bot", func(t *testing.T) {
t.Skip("MM-48973")
th.BasicTeam.AllowedDomains = "example.com"
_, err := th.App.UpdateTeam(th.BasicTeam)
require.Nil(t, err, "Should update the team")

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

@@ -321,12 +321,14 @@ func (a *App) createUserOrGuest(c request.CTX, user *model.User, guest bool) (*m
// table in CWS. This is then used to calculate how much the customers have to pay in addition for the extra users. If the
// workspace is currently on a monthly plan, then this function will not do anything.
go func() {
_, err := a.SendSubscriptionHistoryEvent(ruser.Id)
if err != nil {
c.Logger().Error("Failed to create/update the SubscriptionHistoryEvent", mlog.Err(err))
}
}()
if a.Channels().License().IsCloud() {
go func(userId string) {
_, err := a.SendSubscriptionHistoryEvent(userId)
if err != nil {
c.Logger().Error("Failed to create/update the SubscriptionHistoryEvent", mlog.Err(err))
}
}(ruser.Id)
}
return ruser, nil
}