Folders: Do not allow modifying the folder UID via the API (#74684)

* Folders: Do not allow changing the folder UID via the API

* Update Swagger/OpenAPI docs

* Update HTTP API docs
This commit is contained in:
Sofia Papagiannaki
2023-09-12 14:28:33 +03:00
committed by GitHub
parent 2fac3bd41e
commit 376f9a75db
7 changed files with 162 additions and 76 deletions

View File

@@ -286,30 +286,6 @@ func TestIntegrationUpdate(t *testing.T) {
f = updated
})
t.Run("updating folder UID should succeed", func(t *testing.T) {
newUID := "new"
existingTitle := f.Title
existingDesc := f.Description
updated, err := folderStore.Update(context.Background(), folder.UpdateFolderCommand{
UID: f.UID,
OrgID: f.OrgID,
NewUID: &newUID,
})
require.NoError(t, err)
assert.Equal(t, newUID, updated.UID)
updated, err = folderStore.Get(context.Background(), folder.GetFolderQuery{
UID: &updated.UID,
OrgID: orgID,
})
require.NoError(t, err)
assert.Equal(t, newUID, updated.UID)
assert.Equal(t, existingTitle, updated.Title)
assert.Equal(t, existingDesc, updated.Description)
assert.NotEmpty(t, updated.URL)
})
t.Run("updating folder parent UID", func(t *testing.T) {
testCases := []struct {
desc string