mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Making the posts tests a bit more robust (#17151)
This commit is contained in:
@@ -1335,7 +1335,7 @@ func testPostStoreGetPostsSince(t *testing.T, ss store.Store) {
|
||||
time.Sleep(time.Millisecond)
|
||||
|
||||
postList, err := ss.Post().GetPostsSince(model.GetPostsSinceOptions{ChannelId: channelId, Time: post3.CreateAt}, false)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, []string{
|
||||
post6.Id,
|
||||
@@ -1393,7 +1393,7 @@ func testPostStoreGetPostsSince(t *testing.T, ss store.Store) {
|
||||
|
||||
// And then ensure that it doesn't cause future requests to also return no results
|
||||
postList, err = ss.Post().GetPostsSince(model.GetPostsSinceOptions{ChannelId: channelId, Time: post1.CreateAt - 1}, true)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, []string{post1.Id}, postList.Order)
|
||||
|
||||
@@ -1499,7 +1499,7 @@ func testPostStoreGetPosts(t *testing.T, ss store.Store) {
|
||||
|
||||
t.Run("should return the last posts created in a channel without the threads and the reply count must be correct", func(t *testing.T) {
|
||||
postList, err := ss.Post().GetPosts(model.GetPostsOptions{ChannelId: channelId, Page: 0, PerPage: 2, SkipFetchThreads: true}, false)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.Equal(t, []string{
|
||||
post6.Id,
|
||||
|
||||
Reference in New Issue
Block a user