mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 04:32:25 -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
				
			
		|  | @ -158,7 +158,7 @@ func (suite *FromClientAPITestSuite) checkStreamed( | |||
| ) { | ||||
| 
 | ||||
| 	// Set a 5s timeout on context. | ||||
| 	ctx := context.Background() | ||||
| 	ctx := suite.T().Context() | ||||
| 	ctx, cncl := context.WithTimeout(ctx, time.Second*5) | ||||
| 	defer cncl() | ||||
| 
 | ||||
|  | @ -259,7 +259,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWithNotification() { | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 		testList         = suite.testLists["local_account_1_list_1"] | ||||
|  | @ -376,7 +376,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateBackfilledStatusWithNotifi | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 		testList         = suite.testLists["local_account_1_list_1"] | ||||
|  | @ -475,7 +475,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateBackfilledStatusWithRemote | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["local_account_1"] | ||||
| 		receivingAccount = suite.testAccounts["remote_account_1"] | ||||
| 
 | ||||
|  | @ -531,7 +531,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusReply() { | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 		testList         = suite.testLists["local_account_1_list_1"] | ||||
|  | @ -602,7 +602,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusReplyMuted() { | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 
 | ||||
|  | @ -666,7 +666,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusBoostMuted() { | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 
 | ||||
|  | @ -734,7 +734,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusListRepliesPolicyLis | |||
| 	*testList = *suite.testLists["local_account_1_list_1"] | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 		streams          = suite.openStreams(ctx, testStructs.Processor, receivingAccount, []string{testList.ID}) | ||||
|  | @ -813,7 +813,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusListRepliesPolicyLis | |||
| 	*testList = *suite.testLists["local_account_1_list_1"] | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 		streams          = suite.openStreams(ctx, testStructs.Processor, receivingAccount, []string{testList.ID}) | ||||
|  | @ -898,7 +898,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusReplyListRepliesPoli | |||
| 	*testList = *suite.testLists["local_account_1_list_1"] | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 		streams          = suite.openStreams(ctx, testStructs.Processor, receivingAccount, []string{testList.ID}) | ||||
|  | @ -973,7 +973,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusBoost() { | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 		testList         = suite.testLists["local_account_1_list_1"] | ||||
|  | @ -1040,7 +1040,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusBoostNoReblogs() { | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 		testList         = suite.testLists["local_account_1_list_1"] | ||||
|  | @ -1107,7 +1107,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWhichBeginsConversat | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["local_account_2"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 		streams          = suite.openStreams(ctx, | ||||
|  | @ -1196,7 +1196,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWhichShouldNotCreate | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["local_account_2"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 		streams          = suite.openStreams(ctx, | ||||
|  | @ -1269,7 +1269,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWithFollowedHashtag( | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_2"] | ||||
| 		streams          = suite.openStreams(ctx, | ||||
|  | @ -1346,7 +1346,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWithFollowedHashtagA | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["remote_account_1"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_2"] | ||||
| 		streams          = suite.openStreams(ctx, | ||||
|  | @ -1430,7 +1430,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateBoostWithFollowedHashtag() | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["remote_account_2"] | ||||
| 		boostingAccount  = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_2"] | ||||
|  | @ -1536,7 +1536,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateBoostWithFollowedHashtagAn | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["remote_account_1"] | ||||
| 		boostingAccount  = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_2"] | ||||
|  | @ -1649,7 +1649,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateBoostWithFollowedHashtagAn | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["admin_account"] | ||||
| 		boostingAccount  = suite.testAccounts["remote_account_1"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_2"] | ||||
|  | @ -1760,7 +1760,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWithAuthorOnExclusiv | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["local_account_2"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 		testList         = suite.testLists["local_account_1_list_1"] | ||||
|  | @ -1836,7 +1836,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWithAuthorOnExclusiv | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx               = context.Background() | ||||
| 		ctx               = suite.T().Context() | ||||
| 		postingAccount    = suite.testAccounts["local_account_2"] | ||||
| 		receivingAccount  = suite.testAccounts["local_account_1"] | ||||
| 		testInclusiveList = suite.testLists["local_account_1_list_1"] | ||||
|  | @ -1953,7 +1953,7 @@ func (suite *FromClientAPITestSuite) TestProcessCreateStatusWithAuthorOnExclusiv | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["local_account_2"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_1"] | ||||
| 		testFollow       = suite.testFollows["local_account_1_local_account_2"] | ||||
|  | @ -2080,7 +2080,7 @@ func (suite *FromClientAPITestSuite) TestProcessUpdateStatusWithFollowedHashtag( | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["admin_account"] | ||||
| 		receivingAccount = suite.testAccounts["local_account_2"] | ||||
| 		streams          = suite.openStreams(ctx, | ||||
|  | @ -2156,7 +2156,7 @@ func (suite *FromClientAPITestSuite) TestProcessUpdateStatusInteractedWith() { | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx              = context.Background() | ||||
| 		ctx              = suite.T().Context() | ||||
| 		postingAccount   = suite.testAccounts["local_account_1"] | ||||
| 		receivingAccount = suite.testAccounts["admin_account"] | ||||
| 		streams          = suite.openStreams(ctx, | ||||
|  | @ -2244,7 +2244,7 @@ func (suite *FromClientAPITestSuite) TestProcessStatusDelete() { | |||
| 	defer testrig.TearDownTestStructs(testStructs) | ||||
| 
 | ||||
| 	var ( | ||||
| 		ctx                  = context.Background() | ||||
| 		ctx                  = suite.T().Context() | ||||
| 		deletingAccount      = suite.testAccounts["local_account_1"] | ||||
| 		receivingAccount     = suite.testAccounts["local_account_2"] | ||||
| 		deletedStatus        = suite.testStatuses["local_account_1_status_1"] | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue