Chore: Reduce the usage of sqlstore.createorg and use orgservice instead (#59356)

* remove legacy createorg from org service

* remove another createorg from orgimpl

* remove createorg from api pref tests

* remove createorg from api org tests

* fix tests

* remove createorg from annotations test

* remove createorg from team tests

* remove createorg from service accounts

* remove createorg from accesscontrol tests

* remove createorg from provisioning

* Use quotaservice from sc.hs
This commit is contained in:
Serge Zaitsev
2022-11-28 12:05:46 +01:00
committed by GitHub
parent 92e3ee7d89
commit 5b861faec3
11 changed files with 112 additions and 114 deletions
+2 -2
View File
@@ -385,7 +385,7 @@ func deleteAnnotationsScenario(t *testing.T, desc string, url string, routePatte
func TestAPI_Annotations_AccessControl(t *testing.T) {
sc := setupHTTPServer(t, true)
setInitCtxSignedInEditor(sc.initCtx)
err := sc.db.CreateOrg(context.Background(), &models.CreateOrgCommand{Name: "TestOrg", UserId: testUserID})
_, err := sc.hs.orgService.CreateWithMember(context.Background(), &org.CreateOrgCommand{Name: "TestOrg", UserID: testUserID})
require.NoError(t, err)
dashboardAnnotation := &annotations.Item{Id: 1, DashboardId: 1}
@@ -787,7 +787,7 @@ func TestService_AnnotationTypeScopeResolver(t *testing.T) {
func TestAPI_MassDeleteAnnotations_AccessControl(t *testing.T) {
sc := setupHTTPServer(t, true)
setInitCtxSignedInEditor(sc.initCtx)
err := sc.db.CreateOrg(context.Background(), &models.CreateOrgCommand{Name: "TestOrg", UserId: testUserID})
_, err := sc.hs.orgService.CreateWithMember(context.Background(), &org.CreateOrgCommand{Name: "TestOrg", UserID: testUserID})
require.NoError(t, err)
type args struct {