From 5004e0a9da665ccc0e18cd4075ee636641b71f0a Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sun, 8 May 2022 19:49:45 +0200 Subject: [bugfix] Fix remote media pruning failing if media already gone (#548) * fix error check of prune to allow missing files * update go-store library, add test for pruning item with db entry but no file Signed-off-by: kim * remove now-unneccessary error check Signed-off-by: kim Co-authored-by: kim --- internal/api/client/auth/authorize_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'internal/api/client/auth/authorize_test.go') diff --git a/internal/api/client/auth/authorize_test.go b/internal/api/client/auth/authorize_test.go index 8f16702da..f9c1eceb6 100644 --- a/internal/api/client/auth/authorize_test.go +++ b/internal/api/client/auth/authorize_test.go @@ -7,7 +7,6 @@ import ( "testing" "time" - "codeberg.org/gruf/go-errors" "github.com/gin-contrib/sessions" "github.com/stretchr/testify/suite" "github.com/superseriousbusiness/gotosocial/internal/api/client/auth" @@ -26,8 +25,7 @@ type authorizeHandlerTestCase struct { } func (suite *AuthAuthorizeTestSuite) TestAccountAuthorizeHandler() { - - var tests = []authorizeHandlerTestCase{ + tests := []authorizeHandlerTestCase{ { description: "user has their email unconfirmed", mutateUserAccount: func(user *gtsmodel.User, account *gtsmodel.Account) { @@ -80,7 +78,7 @@ func (suite *AuthAuthorizeTestSuite) TestAccountAuthorizeHandler() { testSession.Set(sessionUserID, user.ID) testSession.Set(sessionClientID, suite.testApplications["application_1"].ClientID) if err := testSession.Save(); err != nil { - panic(errors.WrapMsgf(err, "failed on case: %s", testCase.description)) + panic(fmt.Errorf("failed on case %s: %w", testCase.description, err)) } testCase.mutateUserAccount(user, account) -- cgit v1.2.3