Fix various unit tests (#10079)
* fix spurious TestMuteCommandSpecificChannel test failure See https://community-daily.mattermost.com/core/pl/px9p8s3dzbg1pf3ddrm5cr36uw * fix race in TestExportUserChannels * TestExportUserChannels: remove SaveMember call, as it is redundant and used to be silently failing anyway
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
343a1d67e9
Коммит
66d174d80b
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/store"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -78,12 +79,7 @@ func TestExportUserChannels(t *testing.T) {
|
||||
}
|
||||
var preferences model.Preferences
|
||||
preferences = append(preferences, preference)
|
||||
channelMember := model.ChannelMember{
|
||||
ChannelId: channel.Id,
|
||||
UserId: user.Id,
|
||||
}
|
||||
th.App.Srv.Store.Channel().SaveMember(&channelMember)
|
||||
th.App.Srv.Store.Preference().Save(&preferences)
|
||||
store.Must(th.App.Srv.Store.Preference().Save(&preferences))
|
||||
th.App.UpdateChannelMemberNotifyProps(notifyProps, channel.Id, user.Id)
|
||||
exportData, err := th.App.buildUserChannelMemberships(user.Id, team.Id)
|
||||
require.Nil(t, err)
|
||||
|
||||
Ссылка в новой задаче
Block a user