From d5c9c4adc167cdb05e73f5105702cf340293e61c Mon Sep 17 00:00:00 2001 From: Daenney Date: Thu, 22 May 2025 12:26:11 +0200 Subject: [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 Co-committed-by: Daenney --- internal/db/bundb/domain_test.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'internal/db/bundb/domain_test.go') diff --git a/internal/db/bundb/domain_test.go b/internal/db/bundb/domain_test.go index 553cdeb80..8ebe0a2ba 100644 --- a/internal/db/bundb/domain_test.go +++ b/internal/db/bundb/domain_test.go @@ -18,7 +18,6 @@ package bundb_test import ( - "context" "slices" "testing" "time" @@ -32,7 +31,7 @@ type DomainTestSuite struct { } func (suite *DomainTestSuite) TestIsDomainBlocked() { - ctx := context.Background() + ctx := suite.T().Context() domainBlock := >smodel.DomainBlock{ ID: "01G204214Y9TNJEBX39C7G88SW", @@ -57,7 +56,7 @@ func (suite *DomainTestSuite) TestIsDomainBlocked() { } func (suite *DomainTestSuite) TestIsDomainBlockedWithAllow() { - ctx := context.Background() + ctx := suite.T().Context() domainBlock := >smodel.DomainBlock{ ID: "01G204214Y9TNJEBX39C7G88SW", @@ -110,7 +109,7 @@ func (suite *DomainTestSuite) TestIsDomainBlockedWithAllow() { } func (suite *DomainTestSuite) TestIsDomainBlockedWildcard() { - ctx := context.Background() + ctx := suite.T().Context() domainBlock := >smodel.DomainBlock{ ID: "01G204214Y9TNJEBX39C7G88SW", @@ -142,7 +141,7 @@ func (suite *DomainTestSuite) TestIsDomainBlockedWildcard() { } func (suite *DomainTestSuite) TestIsDomainBlockedNonASCII() { - ctx := context.Background() + ctx := suite.T().Context() now := time.Now() @@ -178,7 +177,7 @@ func (suite *DomainTestSuite) TestIsDomainBlockedNonASCII() { } func (suite *DomainTestSuite) TestIsDomainBlockedNonASCII2() { - ctx := context.Background() + ctx := suite.T().Context() now := time.Now() @@ -214,7 +213,7 @@ func (suite *DomainTestSuite) TestIsDomainBlockedNonASCII2() { } func (suite *DomainTestSuite) TestIsOtherDomainBlockedWildcardAndExplicit() { - ctx := context.Background() + ctx := suite.T().Context() blocks := []*gtsmodel.DomainBlock{ { -- cgit v1.2.3