Remove folderid service test (#80433)
* Remove FolderID from service tests * Add models * Add folderID pack to publicdashboard tests * Remove folderID from dashboard tests * Remove folderID from folders * Remove folderID from ngalert tests * Remove nolint comment * Add back some tests after rebase
This commit is contained in:
@@ -763,7 +763,7 @@ func TestGetDashboardByFolder(t *testing.T) {
|
||||
pubdashStore := ProvideStore(sqlStore, cfg, featuremgmt.WithFeatures())
|
||||
dashboard := insertTestDashboard(t, dashboardStore, "title", 1, 1, "1", true, PublicShareType)
|
||||
pubdash := insertPublicDashboard(t, pubdashStore, dashboard.UID, dashboard.OrgID, true, PublicShareType)
|
||||
dashboard2 := insertTestDashboard(t, dashboardStore, "title", 1, 2, "2", true, PublicShareType)
|
||||
dashboard2 := insertTestDashboard(t, dashboardStore, "title2", 1, 2, "2", true, PublicShareType)
|
||||
_ = insertPublicDashboard(t, pubdashStore, dashboard2.UID, dashboard2.OrgID, true, PublicShareType)
|
||||
|
||||
pubdashes, err := pubdashStore.FindByDashboardFolder(context.Background(), dashboard)
|
||||
@@ -838,12 +838,12 @@ func TestGetMetrics(t *testing.T) {
|
||||
}
|
||||
|
||||
// helper function to insert a dashboard
|
||||
func insertTestDashboard(t *testing.T, dashboardStore dashboards.Store, title string, orgId int64,
|
||||
folderId int64, folderUID string, isFolder bool, tags ...any) *dashboards.Dashboard {
|
||||
func insertTestDashboard(t *testing.T, dashboardStore dashboards.Store, title string, orgID int64,
|
||||
folderID int64, folderUID string, isFolder bool, tags ...any) *dashboards.Dashboard {
|
||||
t.Helper()
|
||||
cmd := dashboards.SaveDashboardCommand{
|
||||
OrgID: orgId,
|
||||
FolderID: folderId, // nolint:staticcheck
|
||||
OrgID: orgID,
|
||||
FolderID: folderID, // nolint:staticcheck
|
||||
FolderUID: folderUID,
|
||||
IsFolder: isFolder,
|
||||
Dashboard: simplejson.NewFromAny(map[string]any{
|
||||
|
||||
Reference in New Issue
Block a user