Migrate ChannelMemberHistory store to Sync by default (#11331)

Этот коммит содержится в:
Jesús Espino
2019-06-26 09:39:43 +02:00
коммит произвёл GitHub
родитель d17bdc6764
Коммит 8f0216c57f
8 изменённых файлов: 217 добавлений и 166 удалений

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

@@ -294,9 +294,9 @@ func TestCreateDefaultMemberships(t *testing.T) {
timeAfterLeaving := model.GetMillis()
// Purging channelmemberhistory doesn't re-add user to channel
result := <-th.App.Srv.Store.ChannelMemberHistory().PermanentDeleteBatch(timeBeforeLeaving, 1000)
if result.Err != nil {
t.Errorf("error permanently deleting channelmemberhistory: %s", result.Err.Error())
_, err = th.App.Srv.Store.ChannelMemberHistory().PermanentDeleteBatch(timeBeforeLeaving, 1000)
if err != nil {
t.Errorf("error permanently deleting channelmemberhistory: %s", err.Error())
}
pErr = th.App.CreateDefaultMemberships(scienceChannelGroupSyncable.UpdateAt)
@@ -310,9 +310,9 @@ func TestCreateDefaultMemberships(t *testing.T) {
}
// Purging channelmemberhistory doesn't re-add user to channel
result = <-th.App.Srv.Jobs.Store.ChannelMemberHistory().PermanentDeleteBatch(timeAfterLeaving, 1000)
if result.Err != nil {
t.Errorf("error permanently deleting channelmemberhistory: %s", result.Err.Error())
_, err = th.App.Srv.Jobs.Store.ChannelMemberHistory().PermanentDeleteBatch(timeAfterLeaving, 1000)
if err != nil {
t.Errorf("error permanently deleting channelmemberhistory: %s", err.Error())
}
pErr = th.App.CreateDefaultMemberships(scienceChannelGroupSyncable.UpdateAt)