User limit enforcement (#26511)
* Added hard limits when creating user * Added check to user activation * Added missing check for licensed servers * Fix i18n * Fixed style order * Added a separate hard limit along with existing 10k user soft limit * For CI * Fixing flaky test, hopefully * Added tests
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2c2dbba72c
Коммит
b02d634916
@@ -1985,11 +1985,21 @@ func TestUserHasJoinedChannel(t *testing.T) {
|
||||
require.Nil(t, appErr)
|
||||
|
||||
assert.EventuallyWithT(t, func(t *assert.CollectT) {
|
||||
posts, appErr := th.App.GetPosts(channel.Id, 0, 1)
|
||||
posts, appErr := th.App.GetPosts(channel.Id, 0, 30)
|
||||
|
||||
require.Nil(t, appErr)
|
||||
assert.True(t, len(posts.Order) > 0)
|
||||
assert.Equal(t, fmt.Sprintf("Test: User %s joined %s", user2.Id, channel.Id), posts.Posts[posts.Order[0]].Message)
|
||||
|
||||
found := false
|
||||
for _, post := range posts.Posts {
|
||||
if post.Message == fmt.Sprintf("Test: User %s joined %s", user2.Id, channel.Id) {
|
||||
found = true
|
||||
}
|
||||
}
|
||||
|
||||
if !found {
|
||||
assert.Fail(t, "Couldn't find user joined channel hook message post")
|
||||
}
|
||||
}, 5*time.Second, 100*time.Millisecond)
|
||||
})
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user