[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>
This commit is contained in:
Daenney 2025-05-22 12:26:11 +02:00 committed by kim
commit d5c9c4adc1
175 changed files with 857 additions and 1004 deletions

View file

@ -26,42 +26,42 @@ func copyMap(in map[string]*gtsmodel.Emoji) map[string]*gtsmodel.Emoji {
func (suite *CleanerTestSuite) TestEmojiUncacheRemote() {
suite.testEmojiUncacheRemote(
context.Background(),
suite.T().Context(),
mapvals(suite.emojis),
)
}
func (suite *CleanerTestSuite) TestEmojiUncacheRemoteDryRun() {
suite.testEmojiUncacheRemote(
gtscontext.SetDryRun(context.Background()),
gtscontext.SetDryRun(suite.T().Context()),
mapvals(suite.emojis),
)
}
func (suite *CleanerTestSuite) TestEmojiFixBroken() {
suite.testEmojiFixBroken(
context.Background(),
suite.T().Context(),
mapvals(suite.emojis),
)
}
func (suite *CleanerTestSuite) TestEmojiFixBrokenDryRun() {
suite.testEmojiFixBroken(
gtscontext.SetDryRun(context.Background()),
gtscontext.SetDryRun(suite.T().Context()),
mapvals(suite.emojis),
)
}
func (suite *CleanerTestSuite) TestEmojiPruneUnused() {
suite.testEmojiPruneUnused(
context.Background(),
suite.T().Context(),
mapvals(suite.emojis),
)
}
func (suite *CleanerTestSuite) TestEmojiPruneUnusedDryRun() {
suite.testEmojiPruneUnused(
gtscontext.SetDryRun(context.Background()),
gtscontext.SetDryRun(suite.T().Context()),
mapvals(suite.emojis),
)
}
@ -74,7 +74,7 @@ func (suite *CleanerTestSuite) TestEmojiFixCacheStates() {
emojis["rainbow"].Cached = util.Ptr(false)
suite.testEmojiFixCacheStates(
context.Background(),
suite.T().Context(),
mapvals(emojis),
)
}
@ -87,7 +87,7 @@ func (suite *CleanerTestSuite) TestEmojiFixCacheStatesDryRun() {
emojis["rainbow"].Cached = util.Ptr(false)
suite.testEmojiFixCacheStates(
gtscontext.SetDryRun(context.Background()),
gtscontext.SetDryRun(suite.T().Context()),
mapvals(emojis),
)
}