From 0f2de6394a1c52d47e326bb7d7d129a217ae4f6f Mon Sep 17 00:00:00 2001 From: Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 10 Aug 2021 13:32:39 +0200 Subject: Dereference remote replies (#132) * decided where to put reply dereferencing * fiddling with dereferencing threads * further adventures * tidy up some stuff * move dereferencing functionality * a bunch of refactoring * go fmt * more refactoring * bleep bloop * docs and linting * start implementing replies collection on gts side * fiddling around * allow dereferencing our replies * lint, fmt --- internal/typeutils/astointernal_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'internal/typeutils/astointernal_test.go') diff --git a/internal/typeutils/astointernal_test.go b/internal/typeutils/astointernal_test.go index 9d6ce4e0a..2e33271c5 100644 --- a/internal/typeutils/astointernal_test.go +++ b/internal/typeutils/astointernal_test.go @@ -28,6 +28,7 @@ import ( "github.com/go-fed/activity/streams/vocab" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" + "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/internal/typeutils" "github.com/superseriousbusiness/gotosocial/testrig" ) @@ -342,7 +343,7 @@ func (suite *ASToInternalTestSuite) SetupSuite() { } func (suite *ASToInternalTestSuite) SetupTest() { - testrig.StandardDBSetup(suite.db) + testrig.StandardDBSetup(suite.db, nil) } func (suite *ASToInternalTestSuite) TestParsePerson() { @@ -364,7 +365,7 @@ func (suite *ASToInternalTestSuite) TestParseGargron() { t, err := streams.ToType(context.Background(), m) assert.NoError(suite.T(), err) - rep, ok := t.(typeutils.Accountable) + rep, ok := t.(ap.Accountable) assert.True(suite.T(), ok) acct, err := suite.typeconverter.ASRepresentationToAccount(rep, false) @@ -391,7 +392,7 @@ func (suite *ASToInternalTestSuite) TestParseStatus() { first := obj.Begin() assert.NotNil(suite.T(), first) - rep, ok := first.GetType().(typeutils.Statusable) + rep, ok := first.GetType().(ap.Statusable) assert.True(suite.T(), ok) status, err := suite.typeconverter.ASStatusToStatus(rep) @@ -418,7 +419,7 @@ func (suite *ASToInternalTestSuite) TestParseStatusWithMention() { first := obj.Begin() assert.NotNil(suite.T(), first) - rep, ok := first.GetType().(typeutils.Statusable) + rep, ok := first.GetType().(ap.Statusable) assert.True(suite.T(), ok) status, err := suite.typeconverter.ASStatusToStatus(rep) -- cgit v1.2.3