From 0e2c34219112db3a6b7801530a946fd5b1bbb111 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Fri, 1 Dec 2023 15:27:15 +0100 Subject: [bugfix/chore] `Announce` reliability updates (#2405) * [bugfix/chore] `Announce` updates * test update * fix tests * TestParseAnnounce * update comments * don't lock/unlock, change function signature * naming stuff * don't check domain block twice * UnwrapIfBoost * beep boop --- internal/federation/federatingdb/announce_test.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'internal/federation/federatingdb') diff --git a/internal/federation/federatingdb/announce_test.go b/internal/federation/federatingdb/announce_test.go index ae5213f66..d8de2e49c 100644 --- a/internal/federation/federatingdb/announce_test.go +++ b/internal/federation/federatingdb/announce_test.go @@ -50,8 +50,10 @@ func (suite *AnnounceTestSuite) TestNewAnnounce() { suite.True(ok) suite.Equal(announcingAccount.ID, boost.AccountID) - // only the URI will be set on the boosted status because it still needs to be dereferenced - suite.NotEmpty(boost.BoostOf.URI) + // only the URI will be set for the boosted status + // because it still needs to be dereferenced + suite.Nil(boost.BoostOf) + suite.Equal("http://example.org/users/Some_User/statuses/afaba698-5740-4e32-a702-af61aa543bc1", boost.BoostOfURI) } func (suite *AnnounceTestSuite) TestAnnounceTwice() { @@ -81,8 +83,10 @@ func (suite *AnnounceTestSuite) TestAnnounceTwice() { return nil }) - // only the URI will be set on the boosted status because it still needs to be dereferenced - suite.NotEmpty(boost.BoostOf.URI) + // only the URI will be set for the boosted status + // because it still needs to be dereferenced + suite.Nil(boost.BoostOf) + suite.Equal("http://example.org/users/Some_User/statuses/afaba698-5740-4e32-a702-af61aa543bc1", boost.BoostOfURI) ctx2 := createTestContext(receivingAccount2, announcingAccount) announce2 := suite.testActivities["announce_forwarded_1_turtle"] -- cgit v1.3