mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-31 23:22:24 -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 search_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"encoding/json"
|
||||
|
|
@ -160,7 +159,7 @@ func (suite *SearchGetTestSuite) bodgeLocalInstance(domain string) {
|
|||
|
||||
// Set username of instance account to given domain.
|
||||
instanceAccount.Username = domain
|
||||
if err := suite.db.UpdateAccount(context.Background(), instanceAccount, "username"); err != nil {
|
||||
if err := suite.db.UpdateAccount(suite.T().Context(), instanceAccount, "username"); err != nil {
|
||||
suite.FailNow(err.Error())
|
||||
}
|
||||
}
|
||||
|
|
@ -1389,7 +1388,7 @@ func (suite *SearchGetTestSuite) TestSearchRemoteInstanceAccountPartial() {
|
|||
suite.FailNow(err.Error())
|
||||
}
|
||||
|
||||
if err := suite.db.PutAccount(context.Background(), >smodel.Account{
|
||||
if err := suite.db.PutAccount(suite.T().Context(), >smodel.Account{
|
||||
ID: "01H6RWPG8T6DNW6VNXPBCJBH5S",
|
||||
Username: theirDomain,
|
||||
Domain: theirDomain,
|
||||
|
|
@ -1724,7 +1723,7 @@ func (suite *SearchGetTestSuite) TestSearchBlockedAccountFullNamestring() {
|
|||
// Block the account
|
||||
// we're about to search.
|
||||
if err := suite.db.PutBlock(
|
||||
context.Background(),
|
||||
suite.T().Context(),
|
||||
>smodel.Block{
|
||||
ID: id.NewULID(),
|
||||
URI: "https://example.org/nooooooo",
|
||||
|
|
@ -1788,7 +1787,7 @@ func (suite *SearchGetTestSuite) TestSearchBlockedAccountPartialNamestring() {
|
|||
// Block the account
|
||||
// we're about to search.
|
||||
if err := suite.db.PutBlock(
|
||||
context.Background(),
|
||||
suite.T().Context(),
|
||||
>smodel.Block{
|
||||
ID: id.NewULID(),
|
||||
URI: "https://example.org/nooooooo",
|
||||
|
|
@ -1849,7 +1848,7 @@ func (suite *SearchGetTestSuite) TestSearchBlockedAccountURI() {
|
|||
// Block the account
|
||||
// we're about to search.
|
||||
if err := suite.db.PutBlock(
|
||||
context.Background(),
|
||||
suite.T().Context(),
|
||||
>smodel.Block{
|
||||
ID: id.NewULID(),
|
||||
URI: "https://example.org/nooooooo",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue