Chore: Remove CreateOrg from alerting and use orgStore instead (#59440)

This commit is contained in:
Serge Zaitsev
2022-11-29 09:59:03 +01:00
committed by GitHub
parent 933879a347
commit 57fbe264ea
4 changed files with 20 additions and 81 deletions

View File

@@ -16,7 +16,6 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/models"
apimodels "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
ngmodels "github.com/grafana/grafana/pkg/services/ngalert/models"
ngstore "github.com/grafana/grafana/pkg/services/ngalert/store"
@@ -2540,14 +2539,6 @@ func createUser(t *testing.T, store *sqlstore.SQLStore, cmd user.CreateUserComma
return u.ID
}
func createOrg(t *testing.T, store *sqlstore.SQLStore, name string, userID int64) int64 {
cmd := &models.CreateOrgCommand{Name: name, UserId: userID}
err := store.CreateOrg(context.Background(), cmd)
require.NoError(t, err)
org := cmd.Result
return org.Id
}
func getLongString(t *testing.T, n int) string {
t.Helper()