MM-15288: Migrate CommandStore.Get to sync by default (#10739)

* MM-15288: Migrate Command.Get to sync by default

* addressing review comments, updating status code of err returned by Get Method
Этот коммит содержится в:
Puneeth Reddy
2019-05-06 09:12:41 -07:00
коммит произвёл Jesús Espino
родитель fc15eda37f
Коммит 2d3fb4f426
7 изменённых файлов: 50 добавлений и 47 удалений

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

@@ -53,19 +53,28 @@ func (_m *CommandStore) Delete(commandId string, time int64) *model.AppError {
}
// Get provides a mock function with given fields: id
func (_m *CommandStore) Get(id string) store.StoreChannel {
func (_m *CommandStore) Get(id string) (*model.Command, *model.AppError) {
ret := _m.Called(id)
var r0 store.StoreChannel
if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
var r0 *model.Command
if rf, ok := ret.Get(0).(func(string) *model.Command); ok {
r0 = rf(id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(store.StoreChannel)
r0 = ret.Get(0).(*model.Command)
}
}
return r0
var r1 *model.AppError
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
r1 = rf(id)
} else {
if ret.Get(1) != nil {
r1 = ret.Get(1).(*model.AppError)
}
}
return r0, r1
}
// GetByTeam provides a mock function with given fields: teamId