diff options
| author | 2025-05-22 12:26:11 +0200 | |
|---|---|---|
| committer | 2025-05-22 12:26:11 +0200 | |
| commit | d5c9c4adc167cdb05e73f5105702cf340293e61c (patch) | |
| tree | 1d21fe376099864900837eba675a965517f98e5d /internal/processing/conversations/get_test.go | |
| parent | [feature] Allow exposing allows, implement `/api/v1/domain_blocks` and `/api/... (diff) | |
| download | gotosocial-d5c9c4adc167cdb05e73f5105702cf340293e61c.tar.xz | |
[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 <git@noreply.sourcery.dny.nu>
Co-committed-by: Daenney <git@noreply.sourcery.dny.nu>
Diffstat (limited to 'internal/processing/conversations/get_test.go')
| -rw-r--r-- | internal/processing/conversations/get_test.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/processing/conversations/get_test.go b/internal/processing/conversations/get_test.go index ea8794601..9106c930c 100644 --- a/internal/processing/conversations/get_test.go +++ b/internal/processing/conversations/get_test.go @@ -18,7 +18,6 @@ package conversations_test import ( - "context" "time" apimodel "code.superseriousbusiness.org/gotosocial/internal/api/model" @@ -27,7 +26,7 @@ import ( func (suite *ConversationsTestSuite) TestGetAll() { conversation := suite.NewTestConversation(suite.testAccount, 0) - resp, err := suite.conversationsProcessor.GetAll(context.Background(), suite.testAccount, nil) + resp, err := suite.conversationsProcessor.GetAll(suite.T().Context(), suite.testAccount, nil) if suite.NoError(err) && suite.Len(resp.Items, 1) && suite.IsType((*apimodel.Conversation)(nil), resp.Items[0]) { apiConversation := resp.Items[0].(*apimodel.Conversation) suite.Equal(conversation.ID, apiConversation.ID) @@ -46,11 +45,11 @@ func (suite *ConversationsTestSuite) TestGetAllOrder() { // Add an even newer status than that to conversation1. conversation1Status2 := suite.NewTestStatus(suite.testAccount, conversation1.LastStatus.ThreadID, 2*time.Second, conversation1.LastStatus) conversation1.LastStatusID = conversation1Status2.ID - if err := suite.db.UpsertConversation(context.Background(), conversation1, "last_status_id"); err != nil { + if err := suite.db.UpsertConversation(suite.T().Context(), conversation1, "last_status_id"); err != nil { suite.FailNow(err.Error()) } - resp, err := suite.conversationsProcessor.GetAll(context.Background(), suite.testAccount, nil) + resp, err := suite.conversationsProcessor.GetAll(suite.T().Context(), suite.testAccount, nil) if suite.NoError(err) && suite.Len(resp.Items, 2) { // conversation1 should be the first conversation returned. apiConversation1 := resp.Items[0].(*apimodel.Conversation) |
