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:
idafurjes
2024-01-12 16:43:39 +01:00
committed by GitHub
parent e553d4b796
commit cb419e799b
18 changed files with 105 additions and 273 deletions

View File

@@ -134,16 +134,16 @@ func populateDB(folderCount, dashboardsPerFolder int, sqlStore *sqlstore.SQLStor
for u := start; u < end; u++ {
dashID := int64(u + offset)
folderID := int64((u+offset)%folderCount + 1)
folderUID := fmt.Sprintf("folder%v", int64((u+offset)%folderCount+1))
dbs = append(dbs, dashboards.Dashboard{
ID: dashID,
UID: fmt.Sprintf("dashboard%v", dashID),
Title: fmt.Sprintf("dashboard%v", dashID),
IsFolder: false,
FolderID: folderID, // nolint:staticcheck
OrgID: 1,
Created: now,
Updated: now,
ID: dashID,
UID: fmt.Sprintf("dashboard%v", dashID),
Title: fmt.Sprintf("dashboard%v", dashID),
IsFolder: false,
FolderUID: folderUID,
OrgID: 1,
Created: now,
Updated: now,
})
}