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/filters | |
| 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/filters')
| -rw-r--r-- | internal/api/client/filters/v1/filter_test.go | 4 | ||||
| -rw-r--r-- | internal/api/client/filters/v2/filter_test.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/internal/api/client/filters/v1/filter_test.go b/internal/api/client/filters/v1/filter_test.go index df182493e..7beb9313a 100644 --- a/internal/api/client/filters/v1/filter_test.go +++ b/internal/api/client/filters/v1/filter_test.go @@ -115,7 +115,7 @@ func (suite *FiltersTestSuite) TearDownTest() { } func (suite *FiltersTestSuite) openHomeStream(account *gtsmodel.Account) *stream.Stream { - stream, err := suite.processor.Stream().Open(context.Background(), account, stream.TimelineHome) + stream, err := suite.processor.Stream().Open(suite.T().Context(), account, stream.TimelineHome) if err != nil { suite.FailNow(err.Error()) } @@ -129,7 +129,7 @@ func (suite *FiltersTestSuite) checkStreamed( expectEventType string, ) { // Set a 5s timeout on context. - ctx := context.Background() + ctx := suite.T().Context() ctx, cncl := context.WithTimeout(ctx, time.Second*5) defer cncl() diff --git a/internal/api/client/filters/v2/filter_test.go b/internal/api/client/filters/v2/filter_test.go index 038205460..6e9e4ef07 100644 --- a/internal/api/client/filters/v2/filter_test.go +++ b/internal/api/client/filters/v2/filter_test.go @@ -114,7 +114,7 @@ func (suite *FiltersTestSuite) TearDownTest() { } func (suite *FiltersTestSuite) openHomeStream(account *gtsmodel.Account) *stream.Stream { - stream, err := suite.processor.Stream().Open(context.Background(), account, stream.TimelineHome) + stream, err := suite.processor.Stream().Open(suite.T().Context(), account, stream.TimelineHome) if err != nil { suite.FailNow(err.Error()) } @@ -128,7 +128,7 @@ func (suite *FiltersTestSuite) checkStreamed( expectEventType string, ) { // Set a 5s timeout on context. - ctx := context.Background() + ctx := suite.T().Context() ctx, cncl := context.WithTimeout(ctx, time.Second*5) defer cncl() |
