diff --git a/server/.golangci.yml b/server/.golangci.yml index ff0ee3fd7c..18c715332f 100644 --- a/server/.golangci.yml +++ b/server/.golangci.yml @@ -146,7 +146,6 @@ issues: channels/app/session_test.go|\ channels/app/slack.go|\ channels/app/slashcommands/auto_environment.go|\ - channels/app/slashcommands/command_leave_test.go|\ channels/app/slashcommands/command_loadtest.go|\ channels/app/slashcommands/command_remove_test.go|\ channels/app/slashcommands/command_test.go|\ diff --git a/server/channels/app/slashcommands/command_leave_test.go b/server/channels/app/slashcommands/command_leave_test.go index 0d85d50192..63e23d3346 100644 --- a/server/channels/app/slashcommands/command_leave_test.go +++ b/server/channels/app/slashcommands/command_leave_test.go @@ -39,12 +39,18 @@ func TestLeaveProviderDoCommand(t *testing.T) { guest := th.createGuest() - th.App.AddUserToTeam(th.Context, th.BasicTeam.Id, th.BasicUser.Id, th.BasicUser.Id) - th.App.AddUserToChannel(th.Context, th.BasicUser, publicChannel, false) - th.App.AddUserToChannel(th.Context, th.BasicUser, privateChannel, false) - th.App.AddUserToTeam(th.Context, th.BasicTeam.Id, guest.Id, guest.Id) - th.App.AddUserToChannel(th.Context, guest, publicChannel, false) - th.App.AddUserToChannel(th.Context, guest, defaultChannel, false) + _, _, appErr := th.App.AddUserToTeam(th.Context, th.BasicTeam.Id, th.BasicUser.Id, th.BasicUser.Id) + require.Nil(t, appErr) + _, appErr = th.App.AddUserToChannel(th.Context, th.BasicUser, publicChannel, false) + require.Nil(t, appErr) + _, appErr = th.App.AddUserToChannel(th.Context, th.BasicUser, privateChannel, false) + require.Nil(t, appErr) + _, _, appErr = th.App.AddUserToTeam(th.Context, th.BasicTeam.Id, guest.Id, guest.Id) + require.Nil(t, appErr) + _, appErr = th.App.AddUserToChannel(th.Context, guest, publicChannel, false) + require.Nil(t, appErr) + _, appErr = th.App.AddUserToChannel(th.Context, guest, defaultChannel, false) + require.Nil(t, appErr) t.Run("Should error when no Channel ID in args", func(t *testing.T) { args := &model.CommandArgs{