[MM-54434] Use job.Logger to capture ldap logs (#24493)

Этот коммит содержится в:
Ben Schumacher
2023-10-06 22:43:21 +02:00
коммит произвёл GitHub
родитель afaf41b587
Коммит aad25be4e1
50 изменённых файлов: 385 добавлений и 426 удалений

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

@@ -7,7 +7,6 @@ import (
"testing"
"github.com/mattermost/mattermost/server/public/model"
"github.com/mattermost/mattermost/server/public/shared/mlog"
"github.com/mattermost/mattermost/server/public/shared/request"
"github.com/mattermost/mattermost/server/v8/channels/store"
"github.com/stretchr/testify/require"
@@ -20,7 +19,7 @@ func Setup(tb testing.TB) store.Store {
}
func deleteAllJobsByTypeAndMigrationKey(t *testing.T, store store.Store, jobType string, migrationKey string) {
ctx := request.EmptyContext(mlog.CreateConsoleTestLogger(t))
ctx := request.TestContext(t)
jobs, err := store.Job().GetAllByType(ctx, model.JobTypeMigrations)
require.NoError(t, err)

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

@@ -10,7 +10,6 @@ import (
"github.com/stretchr/testify/require"
"github.com/mattermost/mattermost/server/public/model"
"github.com/mattermost/mattermost/server/public/shared/mlog"
"github.com/mattermost/mattermost/server/public/shared/request"
)
@@ -19,7 +18,7 @@ func TestGetMigrationState(t *testing.T) {
t.SkipNow()
}
store := Setup(t)
ctx := request.EmptyContext(mlog.CreateConsoleTestLogger(t))
ctx := request.TestContext(t)
migrationKey := model.NewId()