mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Move team store implementation to a separate package (#55514)
* Chore: move team store implementation to a separate package * trying to fix more tests * fix tests in service accounts and access control * fix common tests * restore commented out test * add todos
This commit is contained in:
@@ -214,15 +214,6 @@ func createDummyUser(t *testing.T, sqlStore *SQLStore) *user.User {
|
||||
return user
|
||||
}
|
||||
|
||||
func createDummyTeam(t *testing.T, sqlStore *SQLStore) models.Team {
|
||||
t.Helper()
|
||||
|
||||
team, err := sqlStore.CreateTeam("test", "test@example.com", 1)
|
||||
require.NoError(t, err)
|
||||
|
||||
return team
|
||||
}
|
||||
|
||||
func createDummyDashboard(t *testing.T, sqlStore *SQLStore, dashboardProps DashboardProps) *models.Dashboard {
|
||||
t.Helper()
|
||||
|
||||
@@ -273,16 +264,8 @@ func createDummyACL(t *testing.T, sqlStore *SQLStore, dashboardPermission *Dashb
|
||||
}
|
||||
|
||||
if dashboardPermission.Team {
|
||||
t.Logf("Creating team")
|
||||
team := createDummyTeam(t, sqlStore)
|
||||
if search.UserFromACL {
|
||||
user = createDummyUser(t, sqlStore)
|
||||
err := sqlStore.AddTeamMember(user.ID, 1, team.Id, false, 0)
|
||||
require.NoError(t, err)
|
||||
t.Logf("Created team member with ID %d", user.ID)
|
||||
}
|
||||
|
||||
acl.TeamID = team.Id
|
||||
// TODO: Restore/refactor sqlBuilder tests after user, org and team services are split
|
||||
t.Skip("Creating team: skip, team service is moved")
|
||||
}
|
||||
|
||||
if len(string(dashboardPermission.Role)) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user