Add tests for:
- moveItemsToDirectory (success, same-parent precondition, conflicts)
- createDirectory errors (parent not found, not a directory, duplicate)
- bulk delete type validation (files vs directories)- listDirectory
pagination (limit, cursor, invalid inputs)
Also fix test setup to use httperr.ErrorHandler so HTTPErrorstatus codes
are properly returned.
Co-authored-by: Ona <no-reply@ona.com>
RenameNode was calling Resolve() which generated blob keys for
directories that don't have blobs, causing 'key not found' errors.
Added ResolveRenameOp to BlobKeyResolver interface:
- FlatKeyResolver returns nil (UUIDs don't change on rename)
- HierarchicalKeyResolver returns move op for files and directories
This allows directory renames to work correctly with flat storage,
and leverages os.Rename for atomic directory moves with hierarchical.
Co-authored-by: Ona <no-reply@ona.com>
Tests cover directory and file operations:
- List, fetch, create directories
- Fetch, download, rename files
- Trash and permanent delete (single and bulk)
- 404 for non-existent resources
- Verification that permanent deletes return 404
Directory rename test skipped due to VFS bug with blob
key resolution for directories.
Co-authored-by: Ona <no-reply@ona.com>