Nested Folders: More API fixes (#59316)

* Nested Folder: Fix create, use camel case for JSON properties

* Fix get parents if the folder does not exist

* Add store test for get parents
This commit is contained in:
Sofia Papagiannaki
2022-11-24 13:28:53 -05:00
committed by GitHub
parent 5a3f0e8696
commit f5c41ea497
7 changed files with 310 additions and 288 deletions
@@ -397,6 +397,11 @@ func TestIntegrationGetParents(t *testing.T) {
require.NoError(t, err)
})
t.Run("get parents of unknown folder should return an error", func(t *testing.T) {
_, err := folderStore.GetParents(context.Background(), folder.GetParentsQuery{})
require.ErrorIs(t, err, folder.ErrFolderNotFound)
})
t.Run("get parents of 1-st level folder should be empty", func(t *testing.T) {
parents, err := folderStore.GetParents(context.Background(), folder.GetParentsQuery{
UID: f.UID,