diff options
author | 2023-03-01 18:26:53 +0000 | |
---|---|---|
committer | 2023-03-01 18:26:53 +0000 | |
commit | baf933cb9f3e1053bdb61b90d7027efe9fad1bc2 (patch) | |
tree | 3f2a76851d58517ca3dece2bacd6aceefd8dfb96 /internal/federation/federatingdb/announce_test.go | |
parent | [feature] Federate pinned posts (aka `featuredCollection`) in and out (#1560) (diff) | |
download | gotosocial-baf933cb9f3e1053bdb61b90d7027efe9fad1bc2.tar.xz |
[chore] move client/federator workerpools to Workers{} (#1575)
* replace concurrency worker pools with base models in State.Workers, update code and tests accordingly
* improve code comment
* change back testrig default log level
* un-comment-out TestAnnounceTwice() and fix
---------
Signed-off-by: kim <grufwub@gmail.com>
Reviewed-by: tobi
Diffstat (limited to 'internal/federation/federatingdb/announce_test.go')
-rw-r--r-- | internal/federation/federatingdb/announce_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/federation/federatingdb/announce_test.go b/internal/federation/federatingdb/announce_test.go index 6c0d969f4..d9158f383 100644 --- a/internal/federation/federatingdb/announce_test.go +++ b/internal/federation/federatingdb/announce_test.go @@ -25,6 +25,7 @@ import ( "github.com/superseriousbusiness/activity/streams/vocab" "github.com/superseriousbusiness/gotosocial/internal/ap" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" + "github.com/superseriousbusiness/gotosocial/internal/id" ) type AnnounceTestSuite struct { @@ -74,6 +75,13 @@ func (suite *AnnounceTestSuite) TestAnnounceTwice() { suite.True(ok) suite.Equal(announcingAccount.ID, boost.AccountID) + // Insert the boost-of status into the + // DB cache to emulate processor handling + boost.ID, _ = id.NewULIDFromTime(boost.CreatedAt) + suite.state.Caches.GTS.Status().Store(boost, func() error { + return nil + }) + // only the URI will be set on the boosted status because it still needs to be dereferenced suite.NotEmpty(boost.BoostOf.URI) |