mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-07 09:09:30 -06:00
wowee some serious moving stuff around
This commit is contained in:
parent
cc424df169
commit
41e6e8ed10
35 changed files with 611 additions and 459 deletions
|
|
@ -50,10 +50,7 @@ var Run action.GTSAction = func(ctx context.Context, _ *config.Config, log *logr
|
|||
dbService := NewTestDB()
|
||||
router := NewTestRouter()
|
||||
storageBackend := NewTestStorage()
|
||||
processor := NewTestProcessor(dbService, storageBackend)
|
||||
if err := processor.Start(); err != nil {
|
||||
return fmt.Errorf("error starting processor: %s", err)
|
||||
}
|
||||
|
||||
typeConverter := NewTestTypeConverter(dbService)
|
||||
transportController := NewTestTransportController(NewMockHTTPClient(func(req *http.Request) (*http.Response, error) {
|
||||
r := ioutil.NopCloser(bytes.NewReader([]byte{}))
|
||||
|
|
@ -62,13 +59,17 @@ var Run action.GTSAction = func(ctx context.Context, _ *config.Config, log *logr
|
|||
Body: r,
|
||||
}, nil
|
||||
}))
|
||||
federator := federation.NewFederator(dbService, transportController, c, log, processor, typeConverter)
|
||||
federator := federation.NewFederator(dbService, transportController, c, log, typeConverter)
|
||||
processor := NewTestProcessor(dbService, storageBackend, federator)
|
||||
if err := processor.Start(); err != nil {
|
||||
return fmt.Errorf("error starting processor: %s", err)
|
||||
}
|
||||
|
||||
StandardDBSetup(dbService)
|
||||
StandardStorageSetup(storageBackend, "./testrig/media")
|
||||
|
||||
// build client api modules
|
||||
authModule := auth.New(c, processor, log)
|
||||
authModule := auth.New(c, dbService, NewTestOauthServer(dbService), log)
|
||||
accountModule := account.New(c, processor, log)
|
||||
appsModule := app.New(c, processor, log)
|
||||
mm := mediaModule.New(c, processor, log)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue