Migrating User Store VerifyEmail, GetByAuth and GetByEmail functions to sync by default (#10941)

Этот коммит содержится в:
Jesús Espino
2019-06-12 19:30:50 +02:00
коммит произвёл GitHub
родитель f49a0881bf
Коммит 76bab4f0c2
16 изменённых файлов: 181 добавлений и 164 удалений

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

@@ -17,7 +17,6 @@ import (
"github.com/mattermost/mattermost-server/app"
"github.com/mattermost/mattermost-server/model"
"github.com/mattermost/mattermost-server/services/mailservice"
"github.com/mattermost/mattermost-server/store"
"github.com/mattermost/mattermost-server/utils/testutils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -1391,7 +1390,8 @@ func TestUpdateUserAuth(t *testing.T) {
user := th.CreateUser()
th.LinkUserToTeam(user, team)
store.Must(th.App.Srv.Store.User().VerifyEmail(user.Id, user.Email))
_, err := th.App.Srv.Store.User().VerifyEmail(user.Id, user.Email)
require.Nil(t, err)
userAuth := &model.UserAuth{}
userAuth.AuthData = user.AuthData
@@ -1431,7 +1431,8 @@ func TestUpdateUserAuth(t *testing.T) {
// Regular user can not use endpoint
user2 := th.CreateUser()
th.LinkUserToTeam(user2, team)
store.Must(th.App.Srv.Store.User().VerifyEmail(user2.Id, user2.Email))
_, err = th.App.Srv.Store.User().VerifyEmail(user2.Id, user2.Email)
require.Nil(t, err)
th.SystemAdminClient.Login(user2.Email, "passwd1")