mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 20:52:25 -06:00
[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:
parent
ec4d4d0115
commit
d5c9c4adc1
175 changed files with 857 additions and 1004 deletions
|
|
@ -39,7 +39,7 @@ func (suite *PollTestSuite) TestGetPollBy() {
|
|||
t := suite.T()
|
||||
|
||||
// Create a new context for this test.
|
||||
ctx, cncl := context.WithCancel(context.Background())
|
||||
ctx, cncl := context.WithCancel(suite.T().Context())
|
||||
defer cncl()
|
||||
|
||||
// Sentinel error to mark avoiding a test case.
|
||||
|
|
@ -103,7 +103,7 @@ func (suite *PollTestSuite) TestGetPollVoteBy() {
|
|||
t := suite.T()
|
||||
|
||||
// Create a new context for this test.
|
||||
ctx, cncl := context.WithCancel(context.Background())
|
||||
ctx, cncl := context.WithCancel(suite.T().Context())
|
||||
defer cncl()
|
||||
|
||||
// Sentinel error to mark avoiding a test case.
|
||||
|
|
@ -175,7 +175,7 @@ func (suite *PollTestSuite) TestGetPollVoteBy() {
|
|||
|
||||
func (suite *PollTestSuite) TestUpdatePoll() {
|
||||
// Create a new context for this test.
|
||||
ctx, cncl := context.WithCancel(context.Background())
|
||||
ctx, cncl := context.WithCancel(suite.T().Context())
|
||||
defer cncl()
|
||||
|
||||
for _, poll := range suite.testPolls {
|
||||
|
|
@ -200,7 +200,7 @@ func (suite *PollTestSuite) TestUpdatePoll() {
|
|||
|
||||
func (suite *PollTestSuite) TestPutPoll() {
|
||||
// Create a new context for this test.
|
||||
ctx, cncl := context.WithCancel(context.Background())
|
||||
ctx, cncl := context.WithCancel(suite.T().Context())
|
||||
defer cncl()
|
||||
|
||||
for _, poll := range suite.testPolls {
|
||||
|
|
@ -220,7 +220,7 @@ func (suite *PollTestSuite) TestPutPoll() {
|
|||
|
||||
func (suite *PollTestSuite) TestPutPollVote() {
|
||||
// Create a new context for this test.
|
||||
ctx, cncl := context.WithCancel(context.Background())
|
||||
ctx, cncl := context.WithCancel(suite.T().Context())
|
||||
defer cncl()
|
||||
|
||||
// randomChoices generates random vote choices in poll.
|
||||
|
|
@ -271,7 +271,7 @@ func (suite *PollTestSuite) TestPutPollVote() {
|
|||
|
||||
func (suite *PollTestSuite) TestDeletePoll() {
|
||||
// Create a new context for this test.
|
||||
ctx, cncl := context.WithCancel(context.Background())
|
||||
ctx, cncl := context.WithCancel(suite.T().Context())
|
||||
defer cncl()
|
||||
|
||||
for _, poll := range suite.testPolls {
|
||||
|
|
@ -286,7 +286,7 @@ func (suite *PollTestSuite) TestDeletePoll() {
|
|||
}
|
||||
|
||||
func (suite *PollTestSuite) TestDeletePollVotesBy() {
|
||||
ctx, cncl := context.WithCancel(context.Background())
|
||||
ctx, cncl := context.WithCancel(suite.T().Context())
|
||||
defer cncl()
|
||||
|
||||
for _, vote := range suite.testPollVotes {
|
||||
|
|
@ -308,7 +308,7 @@ func (suite *PollTestSuite) TestDeletePollVotesBy() {
|
|||
}
|
||||
|
||||
func (suite *PollTestSuite) TestDeletePollVotesByNoAccount() {
|
||||
ctx, cncl := context.WithCancel(context.Background())
|
||||
ctx, cncl := context.WithCancel(suite.T().Context())
|
||||
defer cncl()
|
||||
|
||||
// Try to delete a poll by nonexisting account.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue