Chore: Remove folders from models pkg (#61853)

This commit is contained in:
idafurjes
2023-01-25 09:14:32 +01:00
committed by GitHub
parent 6bf1d06dba
commit 421976e919
17 changed files with 184 additions and 190 deletions

View File

@@ -7,7 +7,7 @@ import (
"testing"
"time"
grafana_models "github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/folder"
"github.com/grafana/grafana/pkg/services/ngalert/models"
"github.com/grafana/grafana/pkg/services/ngalert/tests/fakes"
"github.com/grafana/grafana/pkg/util"
@@ -194,7 +194,7 @@ func TestCalculateChanges(t *testing.T) {
groupKey := models.AlertRuleGroupKey{
OrgID: orgId,
NamespaceUID: namespace.Uid,
NamespaceUID: namespace.UID,
RuleGroup: groupName,
}
@@ -442,12 +442,12 @@ func withUIDs(uids map[string]*models.AlertRule) func(rule *models.AlertRule) {
}
}
func randFolder() *grafana_models.Folder {
return &grafana_models.Folder{
Id: rand.Int63(),
Uid: util.GenerateShortUID(),
func randFolder() *folder.Folder {
return &folder.Folder{
ID: rand.Int63(),
UID: util.GenerateShortUID(),
Title: "TEST-FOLDER-" + util.GenerateShortUID(),
Url: "",
URL: "",
Version: 0,
Created: time.Time{},
Updated: time.Time{},