update status_test.go (fix errcheck issue) (#29157)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
dc5e395543
Коммит
8e2610e459
@@ -123,7 +123,6 @@ issues:
|
|||||||
channels/app/slashcommands/auto_environment.go|\
|
channels/app/slashcommands/auto_environment.go|\
|
||||||
channels/app/slashcommands/command_test.go|\
|
channels/app/slashcommands/command_test.go|\
|
||||||
channels/app/slashcommands/helper_test.go|\
|
channels/app/slashcommands/helper_test.go|\
|
||||||
channels/app/status_test.go|\
|
|
||||||
channels/app/support_packet_test.go|\
|
channels/app/support_packet_test.go|\
|
||||||
channels/app/team.go|\
|
channels/app/team.go|\
|
||||||
channels/app/team_test.go|\
|
channels/app/team_test.go|\
|
||||||
|
|||||||
@@ -177,7 +177,13 @@ func TestSetCustomStatus(t *testing.T) {
|
|||||||
} {
|
} {
|
||||||
t.Run(testCase.Name, func(t *testing.T) {
|
t.Run(testCase.Name, func(t *testing.T) {
|
||||||
err := th.App.SetCustomStatus(th.Context, th.BasicUser.Id, testCase.Input)
|
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 {
|
if testCase.ExpectsError {
|
||||||
require.NotNil(t, err)
|
require.NotNil(t, err)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user