summaryrefslogtreecommitdiff
path: root/internal/api/s2s
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/s2s')
-rw-r--r--internal/api/s2s/user/user_test.go5
-rw-r--r--internal/api/s2s/webfinger/webfinger_test.go5
2 files changed, 8 insertions, 2 deletions
diff --git a/internal/api/s2s/user/user_test.go b/internal/api/s2s/user/user_test.go
index 3d4697b36..da305488f 100644
--- a/internal/api/s2s/user/user_test.go
+++ b/internal/api/s2s/user/user_test.go
@@ -28,6 +28,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/email"
"github.com/superseriousbusiness/gotosocial/internal/federation"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
+ "github.com/superseriousbusiness/gotosocial/internal/oauth"
"github.com/superseriousbusiness/gotosocial/internal/processing"
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
"github.com/superseriousbusiness/gotosocial/testrig"
@@ -43,6 +44,7 @@ type UserStandardTestSuite struct {
emailSender email.Sender
processor processing.Processor
storage *kv.KVStore
+ oauthServer oauth.Server
securityModule *security.Module
// standard suite models
@@ -80,7 +82,8 @@ func (suite *UserStandardTestSuite) SetupTest() {
suite.emailSender = testrig.NewEmailSender("../../../../web/template/", nil)
suite.processor = testrig.NewTestProcessor(suite.db, suite.storage, suite.federator, suite.emailSender)
suite.userModule = user.New(suite.config, suite.processor).(*user.Module)
- suite.securityModule = security.New(suite.config, suite.db).(*security.Module)
+ suite.oauthServer = testrig.NewTestOauthServer(suite.db)
+ suite.securityModule = security.New(suite.config, suite.db, suite.oauthServer).(*security.Module)
testrig.StandardDBSetup(suite.db, suite.testAccounts)
testrig.StandardStorageSetup(suite.storage, "../../../../testrig/media")
}
diff --git a/internal/api/s2s/webfinger/webfinger_test.go b/internal/api/s2s/webfinger/webfinger_test.go
index 26a47c861..679dbcd5d 100644
--- a/internal/api/s2s/webfinger/webfinger_test.go
+++ b/internal/api/s2s/webfinger/webfinger_test.go
@@ -33,6 +33,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/email"
"github.com/superseriousbusiness/gotosocial/internal/federation"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
+ "github.com/superseriousbusiness/gotosocial/internal/oauth"
"github.com/superseriousbusiness/gotosocial/internal/processing"
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
"github.com/superseriousbusiness/gotosocial/testrig"
@@ -48,6 +49,7 @@ type WebfingerStandardTestSuite struct {
emailSender email.Sender
processor processing.Processor
storage *kv.KVStore
+ oauthServer oauth.Server
securityModule *security.Module
// standard suite models
@@ -83,7 +85,8 @@ func (suite *WebfingerStandardTestSuite) SetupTest() {
suite.emailSender = testrig.NewEmailSender("../../../../web/template/", nil)
suite.processor = testrig.NewTestProcessor(suite.db, suite.storage, suite.federator, suite.emailSender)
suite.webfingerModule = webfinger.New(suite.config, suite.processor).(*webfinger.Module)
- suite.securityModule = security.New(suite.config, suite.db).(*security.Module)
+ suite.oauthServer = testrig.NewTestOauthServer(suite.db)
+ suite.securityModule = security.New(suite.config, suite.db, suite.oauthServer).(*security.Module)
testrig.StandardDBSetup(suite.db, suite.testAccounts)
testrig.StandardStorageSetup(suite.storage, "../../../../testrig/media")
}