summaryrefslogtreecommitdiff
path: root/internal/api/client/media
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-03-03 16:03:36 +0100
committerLibravatar GitHub <noreply@github.com>2025-03-03 15:03:36 +0000
commit1b37944f8b8eccc2afcfb0f603786209a3b7402d (patch)
tree2bc0be27cf0405e16ac3e14efc3b6973eb096b8b /internal/api/client/media
parentbumps go-ffmpreg to v0.6.6 (#3866) (diff)
downloadgotosocial-1b37944f8b8eccc2afcfb0f603786209a3b7402d.tar.xz
[feature] Refactor tokens, allow multiple app redirect_uris (#3849)
* [feature] Refactor tokens, allow multiple app redirect_uris * move + tweak handlers a bit * return error for unset oauth2.ClientStore funcs * wrap UpdateToken with cache * panic handling * cheeky little time optimization * unlock on error
Diffstat (limited to 'internal/api/client/media')
-rw-r--r--internal/api/client/media/mediacreate_test.go4
-rw-r--r--internal/api/client/media/mediaupdate_test.go4
2 files changed, 2 insertions, 6 deletions
diff --git a/internal/api/client/media/mediacreate_test.go b/internal/api/client/media/mediacreate_test.go
index d26f2bb7a..fabff595b 100644
--- a/internal/api/client/media/mediacreate_test.go
+++ b/internal/api/client/media/mediacreate_test.go
@@ -62,7 +62,6 @@ type MediaCreateTestSuite struct {
// standard suite models
testTokens map[string]*gtsmodel.Token
- testClients map[string]*gtsmodel.Client
testApplications map[string]*gtsmodel.Application
testUsers map[string]*gtsmodel.User
testAccounts map[string]*gtsmodel.Account
@@ -101,7 +100,7 @@ func (suite *MediaCreateTestSuite) SetupTest() {
)
suite.mediaManager = testrig.NewTestMediaManager(&suite.state)
- suite.oauthServer = testrig.NewTestOauthServer(suite.db)
+ suite.oauthServer = testrig.NewTestOauthServer(&suite.state)
suite.federator = testrig.NewTestFederator(&suite.state, testrig.NewTestTransportController(&suite.state, testrig.NewMockHTTPClient(nil, "../../../../testrig/media")), suite.mediaManager)
suite.emailSender = testrig.NewEmailSender("../../../../web/template/", nil)
suite.processor = testrig.NewTestProcessor(
@@ -117,7 +116,6 @@ func (suite *MediaCreateTestSuite) SetupTest() {
// setup test data
suite.testTokens = testrig.NewTestTokens()
- suite.testClients = testrig.NewTestClients()
suite.testApplications = testrig.NewTestApplications()
suite.testUsers = testrig.NewTestUsers()
suite.testAccounts = testrig.NewTestAccounts()
diff --git a/internal/api/client/media/mediaupdate_test.go b/internal/api/client/media/mediaupdate_test.go
index dd115f465..8e033f367 100644
--- a/internal/api/client/media/mediaupdate_test.go
+++ b/internal/api/client/media/mediaupdate_test.go
@@ -60,7 +60,6 @@ type MediaUpdateTestSuite struct {
// standard suite models
testTokens map[string]*gtsmodel.Token
- testClients map[string]*gtsmodel.Client
testApplications map[string]*gtsmodel.Application
testUsers map[string]*gtsmodel.User
testAccounts map[string]*gtsmodel.Account
@@ -99,7 +98,7 @@ func (suite *MediaUpdateTestSuite) SetupTest() {
)
suite.mediaManager = testrig.NewTestMediaManager(&suite.state)
- suite.oauthServer = testrig.NewTestOauthServer(suite.db)
+ suite.oauthServer = testrig.NewTestOauthServer(&suite.state)
suite.federator = testrig.NewTestFederator(&suite.state, testrig.NewTestTransportController(&suite.state, testrig.NewMockHTTPClient(nil, "../../../../testrig/media")), suite.mediaManager)
suite.emailSender = testrig.NewEmailSender("../../../../web/template/", nil)
suite.processor = testrig.NewTestProcessor(
@@ -115,7 +114,6 @@ func (suite *MediaUpdateTestSuite) SetupTest() {
// setup test data
suite.testTokens = testrig.NewTestTokens()
- suite.testClients = testrig.NewTestClients()
suite.testApplications = testrig.NewTestApplications()
suite.testUsers = testrig.NewTestUsers()
suite.testAccounts = testrig.NewTestAccounts()