From d5c9c4adc167cdb05e73f5105702cf340293e61c Mon Sep 17 00:00:00 2001 From: Daenney Date: Thu, 22 May 2025 12:26:11 +0200 Subject: [chore] Upgrade to Go 1.24 (#4187) * Set `go.mod` to 1.24 now that it's been out for 3 months. * Update all the test to use `testing.T.Context()`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4187 Co-authored-by: Daenney Co-committed-by: Daenney --- internal/typeutils/wrap_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'internal/typeutils/wrap_test.go') diff --git a/internal/typeutils/wrap_test.go b/internal/typeutils/wrap_test.go index ae68d98c8..48a28e3b0 100644 --- a/internal/typeutils/wrap_test.go +++ b/internal/typeutils/wrap_test.go @@ -18,7 +18,6 @@ package typeutils_test import ( - "context" "encoding/json" "testing" @@ -34,7 +33,7 @@ type WrapTestSuite struct { func (suite *WrapTestSuite) TestWrapNoteInCreateIRIOnly() { testStatus := suite.testStatuses["local_account_1_status_1"] - note, err := suite.typeconverter.StatusToAS(context.Background(), testStatus) + note, err := suite.typeconverter.StatusToAS(suite.T().Context(), testStatus) suite.NoError(err) create := typeutils.WrapStatusableInCreate(note, true) @@ -62,7 +61,7 @@ func (suite *WrapTestSuite) TestWrapNoteInCreateIRIOnly() { func (suite *WrapTestSuite) TestWrapNoteInCreate() { testStatus := suite.testStatuses["local_account_1_status_1"] - note, err := suite.typeconverter.StatusToAS(context.Background(), testStatus) + note, err := suite.typeconverter.StatusToAS(suite.T().Context(), testStatus) suite.NoError(err) create := typeutils.WrapStatusableInCreate(note, false) @@ -154,7 +153,7 @@ func (suite *WrapTestSuite) TestWrapNoteInCreate() { func (suite *WrapTestSuite) TestWrapAccountableInUpdate() { testAccount := suite.testAccounts["local_account_1"] - accountable, err := suite.typeconverter.AccountToAS(context.Background(), testAccount) + accountable, err := suite.typeconverter.AccountToAS(suite.T().Context(), testAccount) if err != nil { suite.FailNow(err.Error()) } -- cgit v1.2.3