Migrate Reactions store to Sync by default (#10737)
* Migrate Reactions store to Sync by default * Fixing tests * Fixing tests * Fixing govet * fixing tests * Addressing PR review comments
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
584ec68755
Коммит
9a9d5d4081
@@ -263,10 +263,10 @@ func TestGetReactions(t *testing.T) {
|
||||
var reactions []*model.Reaction
|
||||
|
||||
for _, userReaction := range userReactions {
|
||||
if result := <-th.App.Srv.Store.Reaction().Save(userReaction); result.Err != nil {
|
||||
t.Fatal(result.Err)
|
||||
if reaction, err := th.App.Srv.Store.Reaction().Save(userReaction); err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
reactions = append(reactions, result.Data.(*model.Reaction))
|
||||
reactions = append(reactions, reaction)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -618,10 +618,10 @@ func TestGetBulkReactions(t *testing.T) {
|
||||
|
||||
for _, userReaction := range userReactions {
|
||||
reactions := expectedPostIdsReactionsMap[userReaction.PostId]
|
||||
if result := <-th.App.Srv.Store.Reaction().Save(userReaction); result.Err != nil {
|
||||
t.Fatal(result.Err)
|
||||
if reaction, err := th.App.Srv.Store.Reaction().Save(userReaction); err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
reactions = append(reactions, result.Data.(*model.Reaction))
|
||||
reactions = append(reactions, reaction)
|
||||
|
||||
}
|
||||
expectedPostIdsReactionsMap[userReaction.PostId] = reactions
|
||||
|
||||
Ссылка в новой задаче
Block a user