[MM-55990] Logger improvements for tests (#25467)

Этот коммит содержится в:
Ben Schumacher
2023-11-30 10:47:04 +01:00
коммит произвёл GitHub
родитель bd71288731
Коммит c395ec6245
9 изменённых файлов: 28 добавлений и 16 удалений

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

@@ -26,6 +26,7 @@ func TestProcessPermalinkToRemote(t *testing.T) {
mockStore := &mocks.Store{}
mockPostStore := mocks.PostStore{}
utils.TranslationsPreInit()
logger := mlog.CreateConsoleTestLogger(t)
pl := &model.PostList{}
mockPostStore.On("Get", context.Background(), "postID", model.GetPostsOptions{SkipFetchThreads: true}, "", map[string]bool{}).Return(pl, nil)
@@ -34,7 +35,7 @@ func TestProcessPermalinkToRemote(t *testing.T) {
mockServer := scs.server.(*MockServerIface)
mockServer.On("GetStore").Return(mockStore)
mockServer.On("Log").Return(mlog.NewLogger())
mockServer.On("Log").Return(logger)
mockApp := scs.app.(*MockAppIface)
mockApp.On("SendEphemeralPost", mock.Anything, "user", mock.AnythingOfType("*model.Post")).Return(&model.Post{}).Times(1)