move oauth models into gtsmodel

This commit is contained in:
tsmethurst
2021-09-01 11:45:01 +02:00
parent 464e3d1324
commit 684bd56528
39 changed files with 1060 additions and 96 deletions

View File

@@ -41,7 +41,7 @@ type AuthTestSuite struct {
testAccount *gtsmodel.Account
testApplication *gtsmodel.Application
testUser *gtsmodel.User
testClient *oauth.Client
testClient *gtsmodel.Client
config *config.Config
}
@@ -83,7 +83,7 @@ func (suite *AuthTestSuite) SetupSuite() {
Email: "user@example.org",
AccountID: acctID,
}
suite.testClient = &oauth.Client{
suite.testClient = &gtsmodel.Client{
ID: "a-known-client-id",
Secret: "some-secret",
Domain: fmt.Sprintf("%s://%s", c.Protocol, c.Host),
@@ -112,8 +112,8 @@ func (suite *AuthTestSuite) SetupTest() {
suite.db = db
models := []interface{}{
&oauth.Client{},
&oauth.Token{},
&gtsmodel.Client{},
&gtsmodel.Token{},
&gtsmodel.User{},
&gtsmodel.Account{},
&gtsmodel.Application{},
@@ -145,8 +145,8 @@ func (suite *AuthTestSuite) SetupTest() {
// TearDownTest drops the oauth_clients table and closes the pg connection after each test
func (suite *AuthTestSuite) TearDownTest() {
models := []interface{}{
&oauth.Client{},
&oauth.Token{},
&gtsmodel.Client{},
&gtsmodel.Token{},
&gtsmodel.User{},
&gtsmodel.Account{},
&gtsmodel.Application{},