Chore: Deprecate ID from Folder (#78281)

* Chore: Deprecate ID from Folder

* chore: add more linter comments

* chore: add missing lint comment
This commit is contained in:
Kat Yang
2023-11-20 15:44:51 -05:00
committed by GitHub
parent ae164df698
commit 2f2ce3edbb
34 changed files with 128 additions and 20 deletions

View File

@ -47,7 +47,7 @@ func TestFoldersCreateAPIEndpoint(t *testing.T) {
description: "folder creation succeeds given the correct request for creating a folder",
input: folderWithoutParentInput,
expectedCode: http.StatusOK,
expectedFolder: &folder.Folder{ID: 1, UID: "uid", Title: "Folder"},
expectedFolder: &folder.Folder{ID: 1, UID: "uid", Title: "Folder"}, // nolint:staticcheck
permissions: []accesscontrol.Permission{{Action: dashboards.ActionFoldersCreate}},
},
{
@ -169,7 +169,7 @@ func TestFoldersUpdateAPIEndpoint(t *testing.T) {
{
description: "folder updating succeeds given the correct request and permissions to update a folder",
expectedCode: http.StatusOK,
expectedFolder: &folder.Folder{ID: 1, UID: "uid", Title: "Folder upd"},
expectedFolder: &folder.Folder{ID: 1, UID: "uid", Title: "Folder upd"}, // nolint:staticcheck
permissions: []accesscontrol.Permission{{Action: dashboards.ActionFoldersWrite, Scope: dashboards.ScopeFoldersAll}},
},
{
@ -421,7 +421,7 @@ func TestFolderMoveAPIEndpoint(t *testing.T) {
func TestFolderGetAPIEndpoint(t *testing.T) {
folderService := &foldertest.FakeService{
ExpectedFolder: &folder.Folder{
ID: 1,
ID: 1, // nolint:staticcheck
UID: "uid",
Title: "uid title",
},