feat(C++): add deleteFolderRecursive sample#16153
Conversation
This adds a sample demonstrating how to recursively delete a folder in a hierarchical namespace bucket. Fixes: b/521168740
There was a problem hiding this comment.
Code Review
This pull request adds a new sample function DeleteFolderRecursive to demonstrate recursive folder deletion, registers it in the command-line interface, and adds a test case in AutoRun. The reviewer suggested enhancing the test case by creating a nested subfolder structure to properly demonstrate and verify the recursive deletion behavior of the API.
| CreateFolder(client, {bucket_name, folder_id}); | ||
| DeleteFolderRecursive(client, {bucket_name, folder_id}); |
There was a problem hiding this comment.
To properly test and demonstrate the recursive deletion behavior of DeleteFolderRecursive, it is recommended to create a nested subfolder structure inside the target folder. Otherwise, the test only deletes an empty folder, which does not fully exercise the recursive aspect of the API.
CreateFolder(client, {bucket_name, folder_id});
CreateFolder(client, {bucket_name, folder_id + "/subfolder"});
DeleteFolderRecursive(client, {bucket_name, folder_id});
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #16153 +/- ##
==========================================
- Coverage 92.20% 92.19% -0.01%
==========================================
Files 2264 2264
Lines 208864 208864
==========================================
- Hits 192579 192567 -12
- Misses 16285 16297 +12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
[Generated-by: AI]
[Generated-by: AI]
This adds a sample demonstrating how to recursively delete a folder in a hierarchical namespace bucket.
Fixes: b/521168740