Make sure annotations are kept when updating a folder (#98321)

* Make sure annotations are kept when updating a folder

* Remove pointer

* Mock get on update tests
This commit is contained in:
Leonor Oliveira
2024-12-27 13:51:10 +01:00
committed by GitHub
parent d05ef49016
commit fec5c0ec19
3 changed files with 31 additions and 31 deletions
+5
View File
@@ -570,6 +570,11 @@ func TestUpdateFolderLegacyAndUnifiedStorage(t *testing.T) {
}
mux := http.NewServeMux()
mux.HandleFunc("GET /apis/folder.grafana.app/v0alpha1/namespaces/default/folders/ady4yobv315a8e", func(w http.ResponseWriter, req *http.Request) {
err := json.NewEncoder(w).Encode(unifiedStorageFolder)
require.NoError(t, err)
})
mux.HandleFunc("PUT /apis/folder.grafana.app/v0alpha1/namespaces/default/folders/ady4yobv315a8e", func(w http.ResponseWriter, req *http.Request) {
err := json.NewEncoder(w).Encode(unifiedStorageFolder)
require.NoError(t, err)