diff options
| author | 2025-05-22 12:26:11 +0200 | |
|---|---|---|
| committer | 2025-05-22 12:26:11 +0200 | |
| commit | d5c9c4adc167cdb05e73f5105702cf340293e61c (patch) | |
| tree | 1d21fe376099864900837eba675a965517f98e5d /internal/api/client/bookmarks/bookmarks_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/api/client/bookmarks/bookmarks_test.go')
| -rw-r--r-- | internal/api/client/bookmarks/bookmarks_test.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/internal/api/client/bookmarks/bookmarks_test.go b/internal/api/client/bookmarks/bookmarks_test.go index 9210d6f1c..f056a05b5 100644 --- a/internal/api/client/bookmarks/bookmarks_test.go +++ b/internal/api/client/bookmarks/bookmarks_test.go @@ -18,7 +18,6 @@ package bookmarks_test import ( - "context" "encoding/json" "fmt" "io/ioutil" @@ -198,7 +197,7 @@ func (suite *BookmarkTestSuite) TestGetBookmarksMultiple() { testUser := suite.testUsers["local_account_1"] // Add a few extra bookmarks for this account. - ctx := context.Background() + ctx := suite.T().Context() for _, b := range []*gtsmodel.StatusBookmark{ { ID: "01GSZPDQYE9WZ26T501KMM876V", // oldest @@ -239,7 +238,7 @@ func (suite *BookmarkTestSuite) TestGetBookmarksMultiplePaging() { testUser := suite.testUsers["local_account_1"] // Add a few extra bookmarks for this account. - ctx := context.Background() + ctx := suite.T().Context() for _, b := range []*gtsmodel.StatusBookmark{ { ID: "01GSZPDQYE9WZ26T501KMM876V", // oldest @@ -280,7 +279,7 @@ func (suite *BookmarkTestSuite) TestGetBookmarksNone() { testUser := suite.testUsers["local_account_1"] // Remove all bookmarks for this account. - if err := suite.db.DeleteStatusBookmarks(context.Background(), "", testAccount.ID); err != nil { + if err := suite.db.DeleteStatusBookmarks(suite.T().Context(), "", testAccount.ID); err != nil { suite.FailNow(err.Error()) } @@ -299,7 +298,7 @@ func (suite *BookmarkTestSuite) TestGetBookmarksNonexistentStatus() { testUser := suite.testUsers["local_account_1"] // Add a few extra bookmarks for this account. - ctx := context.Background() + ctx := suite.T().Context() for _, b := range []*gtsmodel.StatusBookmark{ { ID: "01GSZPDQYE9WZ26T501KMM876V", // oldest |
