From c5e1b36dd32986b3f193840fd36388e3efb0092b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Tue, 16 Mar 2021 15:55:55 +0100 Subject: [PATCH] Making the posts tests a bit more robust (#17151) --- store/storetest/post_store.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/store/storetest/post_store.go b/store/storetest/post_store.go index 341d18cfd5..992a46d4b4 100644 --- a/store/storetest/post_store.go +++ b/store/storetest/post_store.go @@ -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,