mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
committed by
GitHub
parent
2fac3bd41e
commit
376f9a75db
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user