From fdd5bb9c020cb5bdb179c81f249cae7517a073b1 Mon Sep 17 00:00:00 2001 From: TheInvincible <139259364+TheInvincibleRalph@users.noreply.github.com> Date: Mon, 4 Nov 2024 09:31:30 +0100 Subject: [PATCH] Update file_helper_test.go (fix errcheck issue) (#28983) --- server/.golangci.yml | 1 - server/channels/app/file_helper_test.go | 12 ++++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/server/.golangci.yml b/server/.golangci.yml index 2f4283c803..5b94ba2d17 100644 --- a/server/.golangci.yml +++ b/server/.golangci.yml @@ -101,7 +101,6 @@ issues: channels/app/export_test.go|\ channels/app/file.go|\ channels/app/file_bench_test.go|\ - channels/app/file_helper_test.go|\ channels/app/file_info.go|\ channels/app/file_test.go|\ channels/app/helper_test.go|\ diff --git a/server/channels/app/file_helper_test.go b/server/channels/app/file_helper_test.go index e6aa3b7afc..06625ab9a9 100644 --- a/server/channels/app/file_helper_test.go +++ b/server/channels/app/file_helper_test.go @@ -15,10 +15,11 @@ import ( func TestFilterInaccessibleFiles(t *testing.T) { th := Setup(t) th.App.Srv().SetLicense(model.NewTestLicense("cloud")) - th.App.Srv().Store().System().Save(&model.System{ + err := th.App.Srv().Store().System().Save(&model.System{ Name: model.SystemLastAccessibleFileTime, Value: "2", }) + require.NoError(t, err) defer th.TearDown() @@ -117,10 +118,11 @@ func TestFilterInaccessibleFiles(t *testing.T) { func TestGetFilteredAccessibleFiles(t *testing.T) { th := Setup(t) th.App.Srv().SetLicense(model.NewTestLicense("cloud")) - th.App.Srv().Store().System().Save(&model.System{ + err := th.App.Srv().Store().System().Save(&model.System{ Name: model.SystemLastAccessibleFileTime, Value: "2", }) + require.NoError(t, err) defer th.TearDown() @@ -158,10 +160,11 @@ func TestGetFilteredAccessibleFiles(t *testing.T) { func TestIsInaccessibleFile(t *testing.T) { th := Setup(t) th.App.Srv().SetLicense(model.NewTestLicense("cloud")) - th.App.Srv().Store().System().Save(&model.System{ + err := th.App.Srv().Store().System().Save(&model.System{ Name: model.SystemLastAccessibleFileTime, Value: "2", }) + require.NoError(t, err) defer th.TearDown() @@ -179,10 +182,11 @@ func TestIsInaccessibleFile(t *testing.T) { func TestRemoveInaccessibleContentFromFilesSlice(t *testing.T) { th := Setup(t) th.App.Srv().SetLicense(model.NewTestLicense("cloud")) - th.App.Srv().Store().System().Save(&model.System{ + err := th.App.Srv().Store().System().Save(&model.System{ Name: model.SystemLastAccessibleFileTime, Value: "2", }) + require.NoError(t, err) defer th.TearDown()