Chore: Move team models to models pkg (#61262)

* Chore: Move team models to models pkg

* Fix ACL tests

* More ACL tests

* Change Id to ID in conflict user command test

* Remove team from models

* Fix ac test lint
This commit is contained in:
idafurjes
2023-01-11 14:20:09 +01:00
committed by GitHub
parent 672b1711b0
commit f2ffce4351
31 changed files with 385 additions and 359 deletions
+5 -4
View File
@@ -9,6 +9,7 @@ import (
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/services/sqlstore/session"
"github.com/grafana/grafana/pkg/services/team"
"github.com/grafana/grafana/pkg/services/user"
)
@@ -20,7 +21,7 @@ type SQLStoreMock struct {
LastGetAlertsQuery *models.GetAlertsQuery
ExpectedUser *user.User
ExpectedTeamsByUser []*models.TeamDTO
ExpectedTeamsByUser []*team.TeamDTO
ExpectedAlert *models.Alert
ExpectedSystemStats *models.SystemStats
ExpectedDataSourceStats []*models.DataSourceStats
@@ -75,11 +76,11 @@ func (m *SQLStoreMock) GetUserProfile(ctx context.Context, query *user.GetUserPr
return m.ExpectedError
}
func (m *SQLStoreMock) CreateTeam(name string, email string, orgID int64) (models.Team, error) {
return models.Team{
func (m *SQLStoreMock) CreateTeam(name string, email string, orgID int64) (team.Team, error) {
return team.Team{
Name: name,
Email: email,
OrgId: orgID,
OrgID: orgID,
}, nil
}