mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-31 19:22:29 -05: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
|
|
@ -18,7 +18,6 @@
|
|||
package federatingdb_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"testing"
|
||||
"time"
|
||||
|
|
@ -40,7 +39,7 @@ func (suite *CreateTestSuite) TestCreateNote() {
|
|||
receivingAccount := suite.testAccounts["local_account_1"]
|
||||
requestingAccount := suite.testAccounts["remote_account_1"]
|
||||
|
||||
ctx := createTestContext(receivingAccount, requestingAccount)
|
||||
ctx := createTestContext(suite.T(), receivingAccount, requestingAccount)
|
||||
|
||||
create := suite.testActivities["dm_for_zork"].Activity
|
||||
objProp := create.GetActivityStreamsObject()
|
||||
|
|
@ -60,7 +59,7 @@ func (suite *CreateTestSuite) TestCreateNoteForward() {
|
|||
receivingAccount := suite.testAccounts["local_account_1"]
|
||||
requestingAccount := suite.testAccounts["remote_account_1"]
|
||||
|
||||
ctx := createTestContext(receivingAccount, requestingAccount)
|
||||
ctx := createTestContext(suite.T(), receivingAccount, requestingAccount)
|
||||
|
||||
create := suite.testActivities["forwarded_message"].Activity
|
||||
|
||||
|
|
@ -111,14 +110,14 @@ func (suite *CreateTestSuite) TestCreateFlag1() {
|
|||
suite.FailNow(err.Error())
|
||||
}
|
||||
|
||||
t, err := streams.ToType(context.Background(), m)
|
||||
t, err := streams.ToType(suite.T().Context(), m)
|
||||
if err != nil {
|
||||
suite.FailNow(err.Error())
|
||||
}
|
||||
|
||||
flag := t.(vocab.ActivityStreamsFlag)
|
||||
|
||||
ctx := createTestContext(reportedAccount, reportingAccount)
|
||||
ctx := createTestContext(suite.T(), reportedAccount, reportingAccount)
|
||||
if err := suite.federatingDB.Flag(ctx, flag); err != nil {
|
||||
suite.FailNow(err.Error())
|
||||
}
|
||||
|
|
@ -133,7 +132,7 @@ func (suite *CreateTestSuite) TestCreateFlag1() {
|
|||
report := msg.GTSModel.(*gtsmodel.Report)
|
||||
|
||||
// report should be in the database
|
||||
if _, err := suite.db.GetReportByID(context.Background(), report.ID); err != nil {
|
||||
if _, err := suite.db.GetReportByID(suite.T().Context(), report.ID); err != nil {
|
||||
suite.FailNow(err.Error())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue