diff options
| author | 2023-03-01 18:26:53 +0000 | |
|---|---|---|
| committer | 2023-03-01 18:26:53 +0000 | |
| commit | baf933cb9f3e1053bdb61b90d7027efe9fad1bc2 (patch) | |
| tree | 3f2a76851d58517ca3dece2bacd6aceefd8dfb96 /testrig/transportcontroller.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 'testrig/transportcontroller.go')
| -rw-r--r-- | testrig/transportcontroller.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/testrig/transportcontroller.go b/testrig/transportcontroller.go index 7565a741c..9657205f6 100644 --- a/testrig/transportcontroller.go +++ b/testrig/transportcontroller.go @@ -30,12 +30,10 @@ import ( "github.com/superseriousbusiness/activity/streams" "github.com/superseriousbusiness/activity/streams/vocab" apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model" - "github.com/superseriousbusiness/gotosocial/internal/concurrency" - "github.com/superseriousbusiness/gotosocial/internal/db" "github.com/superseriousbusiness/gotosocial/internal/federation" "github.com/superseriousbusiness/gotosocial/internal/gtsmodel" "github.com/superseriousbusiness/gotosocial/internal/log" - "github.com/superseriousbusiness/gotosocial/internal/messages" + "github.com/superseriousbusiness/gotosocial/internal/state" "github.com/superseriousbusiness/gotosocial/internal/transport" ) @@ -53,8 +51,8 @@ const ( // Unlike the other test interfaces provided in this package, you'll probably want to call this function // PER TEST rather than per suite, so that the do function can be set on a test by test (or even more granular) // basis. -func NewTestTransportController(client pub.HttpClient, db db.DB, fedWorker *concurrency.WorkerPool[messages.FromFederator]) transport.Controller { - return transport.NewController(db, NewTestFederatingDB(db, fedWorker), &federation.Clock{}, client) +func NewTestTransportController(state *state.State, client pub.HttpClient) transport.Controller { + return transport.NewController(state.DB, NewTestFederatingDB(state), &federation.Clock{}, client) } type MockHTTPClient struct { |
