summaryrefslogtreecommitdiffstats
path: root/store/storetest/post_store.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/storetest/post_store.go')
-rw-r--r--store/storetest/post_store.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/store/storetest/post_store.go b/store/storetest/post_store.go
index b3a7e8d12..5ab88847e 100644
--- a/store/storetest/post_store.go
+++ b/store/storetest/post_store.go
@@ -514,7 +514,7 @@ func testPostStoreGetPostsWithDetails(t *testing.T, ss store.Store) {
o2.Message = "zz" + model.NewId() + "b"
o2.ParentId = o1.Id
o2.RootId = o1.Id
- o2 = (<-ss.Post().Save(o2)).Data.(*model.Post)
+ _ = (<-ss.Post().Save(o2)).Data.(*model.Post)
time.Sleep(2 * time.Millisecond)
o2a := &model.Post{}
@@ -609,7 +609,7 @@ func testPostStoreGetPostsWithDetails(t *testing.T, ss store.Store) {
o6.ChannelId = o1.ChannelId
o6.UserId = model.NewId()
o6.Message = "zz" + model.NewId() + "b"
- o6 = (<-ss.Post().Save(o6)).Data.(*model.Post)
+ _ = (<-ss.Post().Save(o6)).Data.(*model.Post)
// Should only be 6 since we hit the cache
r3 := (<-ss.Post().GetPosts(o1.ChannelId, 0, 30, true)).Data.(*model.PostList)
@@ -627,7 +627,7 @@ func testPostStoreGetPostsBeforeAfter(t *testing.T, ss store.Store) {
o0.ChannelId = model.NewId()
o0.UserId = model.NewId()
o0.Message = "zz" + model.NewId() + "b"
- o0 = (<-ss.Post().Save(o0)).Data.(*model.Post)
+ _ = (<-ss.Post().Save(o0)).Data.(*model.Post)
time.Sleep(2 * time.Millisecond)
o1 := &model.Post{}
@@ -677,7 +677,7 @@ func testPostStoreGetPostsBeforeAfter(t *testing.T, ss store.Store) {
o5.Message = "zz" + model.NewId() + "b"
o5.ParentId = o4.Id
o5.RootId = o4.Id
- o5 = (<-ss.Post().Save(o5)).Data.(*model.Post)
+ _ = (<-ss.Post().Save(o5)).Data.(*model.Post)
r1 := (<-ss.Post().GetPostsBefore(o1.ChannelId, o1.Id, 4, 0)).Data.(*model.PostList)
@@ -731,7 +731,7 @@ func testPostStoreGetPostsSince(t *testing.T, ss store.Store) {
o0.ChannelId = model.NewId()
o0.UserId = model.NewId()
o0.Message = "zz" + model.NewId() + "b"
- o0 = (<-ss.Post().Save(o0)).Data.(*model.Post)
+ _ = (<-ss.Post().Save(o0)).Data.(*model.Post)
time.Sleep(2 * time.Millisecond)
o1 := &model.Post{}
@@ -747,7 +747,7 @@ func testPostStoreGetPostsSince(t *testing.T, ss store.Store) {
o2.Message = "zz" + model.NewId() + "b"
o2.ParentId = o1.Id
o2.RootId = o1.Id
- o2 = (<-ss.Post().Save(o2)).Data.(*model.Post)
+ _ = (<-ss.Post().Save(o2)).Data.(*model.Post)
time.Sleep(2 * time.Millisecond)
o2a := &model.Post{}
@@ -865,7 +865,7 @@ func testPostStoreSearch(t *testing.T, ss store.Store) {
o1a.UserId = model.NewId()
o1a.Message = "corey mattermost new york"
o1a.Type = model.POST_JOIN_CHANNEL
- o1a = (<-ss.Post().Save(o1a)).Data.(*model.Post)
+ _ = (<-ss.Post().Save(o1a)).Data.(*model.Post)
o2 := &model.Post{}
o2.ChannelId = c1.Id
@@ -877,7 +877,7 @@ func testPostStoreSearch(t *testing.T, ss store.Store) {
o3.ChannelId = c2.Id
o3.UserId = model.NewId()
o3.Message = "New Jersey is where John is from corey new york"
- o3 = (<-ss.Post().Save(o3)).Data.(*model.Post)
+ _ = (<-ss.Post().Save(o3)).Data.(*model.Post)
o4 := &model.Post{}
o4.ChannelId = c1.Id
@@ -1045,7 +1045,7 @@ func testUserCountsWithPostsByDay(t *testing.T, ss store.Store) {
o1a.UserId = model.NewId()
o1a.CreateAt = o1.CreateAt
o1a.Message = "zz" + model.NewId() + "b"
- o1a = store.Must(ss.Post().Save(o1a)).(*model.Post)
+ _ = store.Must(ss.Post().Save(o1a)).(*model.Post)
o2 := &model.Post{}
o2.ChannelId = c1.Id
@@ -1059,7 +1059,7 @@ func testUserCountsWithPostsByDay(t *testing.T, ss store.Store) {
o2a.UserId = o2.UserId
o2a.CreateAt = o1.CreateAt - (1000 * 60 * 60 * 24)
o2a.Message = "zz" + model.NewId() + "b"
- o2a = store.Must(ss.Post().Save(o2a)).(*model.Post)
+ _ = store.Must(ss.Post().Save(o2a)).(*model.Post)
if r1 := <-ss.Post().AnalyticsUserCountsWithPostsByDay(t1.Id); r1.Err != nil {
t.Fatal(r1.Err)
@@ -1103,7 +1103,7 @@ func testPostCountsByDay(t *testing.T, ss store.Store) {
o1a.UserId = model.NewId()
o1a.CreateAt = o1.CreateAt
o1a.Message = "zz" + model.NewId() + "b"
- o1a = store.Must(ss.Post().Save(o1a)).(*model.Post)
+ _ = store.Must(ss.Post().Save(o1a)).(*model.Post)
o2 := &model.Post{}
o2.ChannelId = c1.Id
@@ -1117,7 +1117,7 @@ func testPostCountsByDay(t *testing.T, ss store.Store) {
o2a.UserId = o2.UserId
o2a.CreateAt = o1.CreateAt - (1000 * 60 * 60 * 24 * 2)
o2a.Message = "zz" + model.NewId() + "b"
- o2a = store.Must(ss.Post().Save(o2a)).(*model.Post)
+ _ = store.Must(ss.Post().Save(o2a)).(*model.Post)
time.Sleep(1 * time.Second)
@@ -1534,14 +1534,14 @@ func testPostStoreGetPostsCreatedAt(t *testing.T, ss store.Store) {
o2.ParentId = o1.Id
o2.RootId = o1.Id
o2.CreateAt = createTime + 1
- o2 = (<-ss.Post().Save(o2)).Data.(*model.Post)
+ _ = (<-ss.Post().Save(o2)).Data.(*model.Post)
o3 := &model.Post{}
o3.ChannelId = model.NewId()
o3.UserId = model.NewId()
o3.Message = "zz" + model.NewId() + "b"
o3.CreateAt = createTime
- o3 = (<-ss.Post().Save(o3)).Data.(*model.Post)
+ _ = (<-ss.Post().Save(o3)).Data.(*model.Post)
r1 := (<-ss.Post().GetPostsCreatedAt(o1.ChannelId, createTime)).Data.([]*model.Post)
assert.Equal(t, 2, len(r1))