samples(Storage): Update sample and test for compose object with delete source objects#3336
Conversation
…introduction of the new boolean flag delete source objects
There was a problem hiding this comment.
Code Review
This pull request updates the ComposeObject sample and its tests to support optionally deleting source objects after composition, alongside updating project dependencies. The review feedback highlights three key improvements: clarifying in the XML documentation that source deletion is optional, fixing a formatting and punctuation issue in the console output when source deletion is disabled, and materializing the file list in the test to prevent redundant API calls during assertions.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds support for deleting source objects after composition in the ComposeObject sample, updating the method signature, XML documentation, and console output. It also updates the Google.Cloud.Storage.V1 package and adds a dependency on Google.Apis.Storage.v1. Corresponding unit tests have been updated to verify this behavior. The review feedback points out that the ListFiles call in the test returns a lazy IEnumerable, which should be materialized into a list to avoid redundant and expensive API calls during multiple assertions.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request updates the ComposeObject sample to support deleting source objects after composition. It adds a deleteSourceObjects parameter to the ComposeObject method, updates the underlying ComposeRequest, and updates the corresponding tests to verify this behavior. A critical issue was identified in the test assertions where Assert.Contains and Assert.DoesNotContain are used with a predicate, which is not supported by xUnit and will cause a compilation error. Projecting the file list to names before asserting is recommended.
This PR contains updation of the sample and test for
ComposeObjectwith the introduction of booleandeleteSourceObjectsparameter.