summaryrefslogtreecommitdiff
path: root/testrig/mediahandler.go
diff options
context:
space:
mode:
Diffstat (limited to 'testrig/mediahandler.go')
-rw-r--r--testrig/mediahandler.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/testrig/mediahandler.go b/testrig/mediahandler.go
index cb87b598e..a1863218c 100644
--- a/testrig/mediahandler.go
+++ b/testrig/mediahandler.go
@@ -21,14 +21,15 @@ package testrig
import (
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/media"
+ "github.com/superseriousbusiness/gotosocial/internal/state"
"github.com/superseriousbusiness/gotosocial/internal/storage"
)
// NewTestMediaManager returns a media handler with the default test config, and the given db and storage.
func NewTestMediaManager(db db.DB, storage *storage.Driver) media.Manager {
- m, err := media.NewManager(db, storage)
- if err != nil {
- panic(err)
- }
- return m
+ var state state.State
+ state.DB = db
+ state.Storage = storage
+ state.Workers.Start()
+ return media.NewManager(&state)
}