From 90ceb4a5e32c5aa5cf54043d65225ff32175cd0e Mon Sep 17 00:00:00 2001 From: Arya Khochare <91268931+Aryakoste@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:58:36 +0530 Subject: [PATCH] Fixed errcheck issues in server/channels/api4/usage_test.go (#28644) Co-authored-by: Ben Schumacher --- server/.golangci.yml | 1 - server/channels/api4/usage_test.go | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/server/.golangci.yml b/server/.golangci.yml index f513845e61c..07148ed5904 100644 --- a/server/.golangci.yml +++ b/server/.golangci.yml @@ -96,7 +96,6 @@ issues: channels/api4/team_local.go|\ channels/api4/team_test.go|\ channels/api4/upload_test.go|\ - channels/api4/usage_test.go|\ channels/api4/user.go|\ channels/api4/user_local.go|\ channels/api4/user_test.go|\ diff --git a/server/channels/api4/usage_test.go b/server/channels/api4/usage_test.go index d6182ff87d9..6f5c7647782 100644 --- a/server/channels/api4/usage_test.go +++ b/server/channels/api4/usage_test.go @@ -19,7 +19,8 @@ func TestGetPostsUsage(t *testing.T) { th := Setup(t) defer th.TearDown() - th.Client.Logout(context.Background()) + _, err := th.Client.Logout(context.Background()) + require.NoError(t, err) usage, r, err := th.Client.GetPostsUsage(context.Background()) assert.Error(t, err) @@ -57,7 +58,8 @@ func TestGetStorageUsage(t *testing.T) { th := Setup(t) defer th.TearDown() - th.Client.Logout(context.Background()) + _, err := th.Client.Logout(context.Background()) + require.NoError(t, err) usage, r, err := th.Client.GetStorageUsage(context.Background()) assert.Error(t, err) @@ -71,7 +73,8 @@ func TestGetTeamsUsage(t *testing.T) { th := Setup(t) defer th.TearDown() - th.Client.Logout(context.Background()) + _, err := th.Client.Logout(context.Background()) + require.NoError(t, err) usage, r, err := th.Client.GetTeamsUsage(context.Background()) assert.Error(t, err)