summaryrefslogtreecommitdiff
path: root/testrig
diff options
context:
space:
mode:
authorLibravatar Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com>2021-07-07 15:46:42 +0200
committerLibravatar GitHub <noreply@github.com>2021-07-07 15:46:42 +0200
commitc71e55ecc4c2381785b5f8ae10af74d8a537d6c3 (patch)
treed58bfed57b7232a9b254f8582f9725e2583f8ecd /testrig
parentBlocklist import (#77) (diff)
downloadgotosocial-c71e55ecc4c2381785b5f8ae10af74d8a537d6c3.tar.xz
clean up some weirdness in the router (#80)
Diffstat (limited to 'testrig')
-rw-r--r--testrig/db.go1
-rw-r--r--testrig/router.go9
2 files changed, 7 insertions, 3 deletions
diff --git a/testrig/db.go b/testrig/db.go
index 5fa019adc..01cf93934 100644
--- a/testrig/db.go
+++ b/testrig/db.go
@@ -47,6 +47,7 @@ var testModels []interface{} = []interface{}{
&gtsmodel.Emoji{},
&gtsmodel.Instance{},
&gtsmodel.Notification{},
+ &gtsmodel.RouterSession{},
&oauth.Token{},
&oauth.Client{},
}
diff --git a/testrig/router.go b/testrig/router.go
index 83ce7b602..5770191ea 100644
--- a/testrig/router.go
+++ b/testrig/router.go
@@ -18,11 +18,14 @@
package testrig
-import "github.com/superseriousbusiness/gotosocial/internal/router"
+import (
+ "github.com/superseriousbusiness/gotosocial/internal/db"
+ "github.com/superseriousbusiness/gotosocial/internal/router"
+)
// NewTestRouter returns a Router suitable for testing
-func NewTestRouter() router.Router {
- r, err := router.New(NewTestConfig(), NewTestLog())
+func NewTestRouter(db db.DB) router.Router {
+ r, err := router.New(NewTestConfig(), db, NewTestLog())
if err != nil {
panic(err)
}