Replacing require.nil in app layer (#16905)
* Replacing require.nil in app layer * Fixing some tests * Fixing tests * Reverting the error correction, defering it for another PR * Fixing golangci-lint errors Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fd2e75bc5b
Коммит
69ff686667
@@ -566,13 +566,13 @@ func (*TestHelper) ResetEmojisMigration() {
|
||||
|
||||
func (th *TestHelper) CheckTeamCount(t *testing.T, expected int64) {
|
||||
teamCount, err := th.App.Srv().Store.Team().AnalyticsTeamCount(false)
|
||||
require.Nil(t, err, "Failed to get team count.")
|
||||
require.NoError(t, err, "Failed to get team count.")
|
||||
require.Equalf(t, teamCount, expected, "Unexpected number of teams. Expected: %v, found: %v", expected, teamCount)
|
||||
}
|
||||
|
||||
func (th *TestHelper) CheckChannelsCount(t *testing.T, expected int64) {
|
||||
count, err := th.App.Srv().Store.Channel().AnalyticsTypeCount("", model.CHANNEL_OPEN)
|
||||
require.Nilf(t, err, "Failed to get channel count.")
|
||||
require.NoError(t, err, "Failed to get channel count.")
|
||||
require.Equalf(t, count, expected, "Unexpected number of channels. Expected: %v, found: %v", expected, count)
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user