update status_test.go (fix errcheck issue) (#29157)

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
TheInvincible
2024-11-22 15:10:23 +01:00
коммит произвёл GitHub
родитель dc5e395543
Коммит 8e2610e459
2 изменённых файлов: 7 добавлений и 2 удалений

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

@@ -123,7 +123,6 @@ issues:
channels/app/slashcommands/auto_environment.go|\
channels/app/slashcommands/command_test.go|\
channels/app/slashcommands/helper_test.go|\
channels/app/status_test.go|\
channels/app/support_packet_test.go|\
channels/app/team.go|\
channels/app/team_test.go|\

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

@@ -177,7 +177,13 @@ func TestSetCustomStatus(t *testing.T) {
} {
t.Run(testCase.Name, func(t *testing.T) {
err := th.App.SetCustomStatus(th.Context, th.BasicUser.Id, testCase.Input)
defer th.App.RemoveCustomStatus(th.Context, th.BasicUser.Id)
if err == nil {
defer func() {
removeErr := th.App.RemoveCustomStatus(th.Context, th.BasicUser.Id)
require.Nil(t, removeErr)
}()
}
if testCase.ExpectsError {
require.NotNil(t, err)