summaryrefslogtreecommitdiff
path: root/internal/api/client/status/status_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-04-29 15:05:13 +0200
committerLibravatar GitHub <noreply@github.com>2022-04-29 15:05:13 +0200
commit63f84da3e45d4e1cace427c6d30f19ba7e621618 (patch)
treec99679350b1b3ed64451f894fd485cc3dc9c8b0a /internal/api/client/status/status_test.go
parent[feature] allow absolute path to templates (#507) (diff)
downloadgotosocial-63f84da3e45d4e1cace427c6d30f19ba7e621618.tar.xz
[chore] Inboxes for iri test (#508)
* tidy up some federation tests * add missing license to following.go * give zork some followers, as a treat * test InboxesForIRI * Go fmt * update timeline tests
Diffstat (limited to 'internal/api/client/status/status_test.go')
-rw-r--r--internal/api/client/status/status_test.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/internal/api/client/status/status_test.go b/internal/api/client/status/status_test.go
index 92466645b..a4a56aa0b 100644
--- a/internal/api/client/status/status_test.go
+++ b/internal/api/client/status/status_test.go
@@ -63,6 +63,7 @@ type StatusStandardTestSuite struct {
testAccounts map[string]*gtsmodel.Account
testAttachments map[string]*gtsmodel.MediaAttachment
testStatuses map[string]*gtsmodel.Status
+ testFollows map[string]*gtsmodel.Follow
// module being tested
statusModule *status.Module
@@ -76,25 +77,27 @@ func (suite *StatusStandardTestSuite) SetupSuite() {
suite.testAccounts = testrig.NewTestAccounts()
suite.testAttachments = testrig.NewTestAttachments()
suite.testStatuses = testrig.NewTestStatuses()
+ suite.testFollows = testrig.NewTestFollows()
}
func (suite *StatusStandardTestSuite) SetupTest() {
testrig.InitTestConfig()
testrig.InitTestLog()
- fedWorker := worker.New[messages.FromFederator](-1, -1)
- clientWorker := worker.New[messages.FromClientAPI](-1, -1)
-
suite.db = testrig.NewTestDB()
suite.tc = testrig.NewTestTypeConverter(suite.db)
suite.storage = testrig.NewTestStorage()
+ testrig.StandardDBSetup(suite.db, nil)
+ testrig.StandardStorageSetup(suite.storage, "../../../../testrig/media")
+
+ fedWorker := worker.New[messages.FromFederator](-1, -1)
+ clientWorker := worker.New[messages.FromClientAPI](-1, -1)
+
suite.mediaManager = testrig.NewTestMediaManager(suite.db, suite.storage)
suite.federator = testrig.NewTestFederator(suite.db, testrig.NewTestTransportController(suite.testHttpClient(), suite.db, fedWorker), suite.storage, suite.mediaManager, fedWorker)
suite.emailSender = testrig.NewEmailSender("../../../../web/template/", nil)
suite.processor = testrig.NewTestProcessor(suite.db, suite.storage, suite.federator, suite.emailSender, suite.mediaManager, clientWorker, fedWorker)
suite.statusModule = status.New(suite.processor).(*status.Module)
- testrig.StandardDBSetup(suite.db, nil)
- testrig.StandardStorageSetup(suite.storage, "../../../../testrig/media")
}
func (suite *StatusStandardTestSuite) TearDownTest() {