Initial migration of the store to be sync (#10592)

* Migrating audit store

* Final migration example for the audit store

* async example

* Ending migration

* Removing Async helper

* Fixing tests

* Fixing govet problems with the StoreResult instanstiation
Этот коммит содержится в:
Jesús Espino
2019-04-15 22:53:52 +02:00
коммит произвёл GitHub
родитель 957ec1388b
Коммит 12c50eb830
30 изменённых файлов: 597 добавлений и 583 удалений

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

@@ -733,8 +733,7 @@ func (me *TestHelper) cleanupTestFile(info *model.FileInfo) error {
func (me *TestHelper) MakeUserChannelAdmin(user *model.User, channel *model.Channel) {
utils.DisableDebugLogForTest()
if cmr := <-me.App.Srv.Store.Channel().GetMember(channel.Id, user.Id); cmr.Err == nil {
cm := cmr.Data.(*model.ChannelMember)
if cm, err := me.App.Srv.Store.Channel().GetMember(channel.Id, user.Id); err == nil {
cm.SchemeAdmin = true
if sr := <-me.App.Srv.Store.Channel().UpdateMember(cm); sr.Err != nil {
utils.EnableDebugLogForTest()
@@ -742,7 +741,7 @@ func (me *TestHelper) MakeUserChannelAdmin(user *model.User, channel *model.Chan
}
} else {
utils.EnableDebugLogForTest()
panic(cmr.Err)
panic(err)
}
utils.EnableDebugLogForTest()