feat(storage): add dotnet deleteFolderRecursive sample - #3340
Conversation
This adds a sample demonstrating how to recursively delete a folder in a hierarchical namespace bucket. Fixes: b/521168740 [Generated-by: AI]
- Update Google.Cloud.Storage.Control.V2 to 1.8.0 to resolve DeleteFolderRecursive method - Use fixture.GenerateName() instead of hardcoded folder name in tests - Assert with predicate instead of on the full Folder object to prevent flaky tests [Generated-by: AI]
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
…iveTest Add using System.Linq and replace invalid Assert.DoesNotContain predicate call with Assert.False(folders.Any(...)). [Generated-by: AI]
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
| StorageControlCreateFolderSample createSample = new StorageControlCreateFolderSample(); | ||
| var folder = createSample.StorageControlCreateFolder(_fixture.BucketNameHns, folderName); | ||
|
|
||
| StorageControlDeleteFolderRecursiveSample deleteSample = new StorageControlDeleteFolderRecursiveSample(); |
There was a problem hiding this comment.
Could you create a subfolder also and check when deleting the sample deletes both of them?
There was a problem hiding this comment.
Done
Co-authored by AI Agent
Resolved PR review feedback on recursive folder delete test by adding subfolder check. [Generated-by: AI]
…ests Re-enable recursive delete folder integration tests and resolve GCS billing project limitations. [Generated-by: AI]
|
Private 🛠️⚡🧩👻U |
[Generated-by: AI]
| @@ -1,4 +1,4 @@ | |||
| // Copyright 2020 Google Inc. | |||
| // Copyright 2020 Google Inc. | |||
There was a problem hiding this comment.
Might have added a space here. Check and remove it if not necessary.
There was a problem hiding this comment.
Done
Co-authored by AI Agent
| @@ -1,11 +1,11 @@ | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
There was a problem hiding this comment.
Same here. Check if it is unnecessary.
There was a problem hiding this comment.
Done
Co-authored by AI Agent
| StorageControlClientBuilder builder = new StorageControlClientBuilder | ||
| { | ||
| QuotaProject = "" | ||
| }; | ||
| StorageControlClient storageControl = builder.Build(); |
There was a problem hiding this comment.
Any reason we are using storage builder instead of simple StorageControlClient storageControl = StorageControlClient.Create();
There was a problem hiding this comment.
Done
Co-authored by AI Agent
| StorageControlClientBuilder builder = new StorageControlClientBuilder | ||
| { | ||
| QuotaProject = "" | ||
| }; | ||
| StorageControlClient storageControl = builder.Build(); |
There was a problem hiding this comment.
Done
Co-authored by AI Agent
[Generated-by: AI]
Adds a .NET code sample demonstrating hierarchical namespace recursive folder delete.
Fixes: b/530059315