diff --git a/server/.golangci.yml b/server/.golangci.yml index 07148ed590..2f11550531 100644 --- a/server/.golangci.yml +++ b/server/.golangci.yml @@ -90,7 +90,7 @@ issues: channels/api4/scheme_test.go|\ channels/api4/shared_channel.go|\ channels/api4/status.go|\ - channels/api4/status_test.go|\ + channels/api4/system.go|\ channels/api4/system_local.go|\ channels/api4/system_test.go|\ channels/api4/team_local.go|\ diff --git a/server/channels/api4/status_test.go b/server/channels/api4/status_test.go index 62a7c4ee64..5c1876769f 100644 --- a/server/channels/api4/status_test.go +++ b/server/channels/api4/status_test.go @@ -85,7 +85,8 @@ func TestGetUserStatus(t *testing.T) { }) t.Run("get status from logged out user", func(t *testing.T) { - client.Logout(context.Background()) + _, err := client.Logout(context.Background()) + require.NoError(t, err) _, resp, err := client.GetUserStatus(context.Background(), th.BasicUser2.Id, "") require.Error(t, err) CheckUnauthorizedStatus(t, resp) @@ -173,7 +174,8 @@ func TestGetUsersStatusesByIds(t *testing.T) { }) t.Run("get statuses from logged out user", func(t *testing.T) { - client.Logout(context.Background()) + _, err := client.Logout(context.Background()) + require.NoError(t, err) _, resp, err := client.GetUsersStatusesByIds(context.Background(), usersIds) require.Error(t, err) @@ -236,7 +238,8 @@ func TestUpdateUserStatus(t *testing.T) { t.Run("get statuses from logged out user", func(t *testing.T) { toUpdateUserStatus := &model.Status{Status: "online", UserId: th.BasicUser2.Id} - client.Logout(context.Background()) + _, err := client.Logout(context.Background()) + require.NoError(t, err) _, resp, err := client.UpdateUserStatus(context.Background(), th.BasicUser2.Id, toUpdateUserStatus) require.Error(t, err) @@ -334,7 +337,8 @@ func TestUpdateUserCustomStatus(t *testing.T) { }) t.Run("attempt to set custom status as non-authenticated user", func(t *testing.T) { - client.Logout(context.Background()) + _, err := client.Logout(context.Background()) + require.NoError(t, err) toUpdateCustomStatus := &model.CustomStatus{ Emoji: "palm_tree", Text: "My custom status", @@ -384,7 +388,8 @@ func TestRemoveUserCustomStatus(t *testing.T) { }) t.Run("attempt to remove custom status as non-authenticated user", func(t *testing.T) { - client.Logout(context.Background()) + _, err := client.Logout(context.Background()) + require.NoError(t, err) resp, err := client.RemoveUserCustomStatus(context.Background(), th.BasicUser.Id) require.Error(t, err) CheckUnauthorizedStatus(t, resp)