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
Этот коммит содержится в:
Jesús Espino
2019-04-30 21:34:26 +02:00
коммит произвёл Christopher Speller
родитель 584ec68755
Коммит 9a9d5d4081
16 изменённых файлов: 408 добавлений и 301 удалений

Просмотреть файл

@@ -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