Replacing {require,assert}.{Nil,NotNil} with {require,assert}.{NoError,Error} in the store tests (when comparing errors) (#16886)

* Replacing require.Nil with require.NoError

* More replacements

* More Nil/NotNill to NoError/Error

* Other detected errors

* renaming apperr to err

* Removed not needed line

* Rename old appErr variables that are no longer model.AppError values

* Fixing tiny typo

* Reverting changes outside the store (accidentally added)

* Apply suggestions from code review

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Этот коммит содержится в:
Jesús Espino
2021-02-10 11:34:41 +01:00
коммит произвёл GitHub
родитель 5f043b0a08
Коммит 0e9ad9f7f8
56 изменённых файлов: 5061 добавлений и 5106 удалений

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

@@ -249,9 +249,9 @@ func (me SqlSessionStore) UpdateDeviceId(id string, deviceId string, expiresAt i
}
func (me SqlSessionStore) UpdateProps(session *model.Session) error {
oldSession, appErr := me.Get(session.Id)
if appErr != nil {
return appErr
oldSession, err := me.Get(session.Id)
if err != nil {
return err
}
oldSession.Props = session.Props