-
Notifications
You must be signed in to change notification settings - Fork 280
[Storage] Improve Storage test utilities and refactor navigation methods #2525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Storage] Improve Storage test utilities and refactor navigation methods #2525
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR improves test utilities and refactors navigation methods for Azure Storage by updating helper functions and client constructions to better support asynchronous container creation and pipeline persistence.
- Adds new utility functions (get_blob_name and get_container_name) to generate consistent names.
- Refactors get_container_client into an async function with an optional flag to create the container.
- Updates tests and client constructors in BlobServiceClient, BlobContainerClient, and BlobClient to align with these changes.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
sdk/storage/azure_storage_blob_test/src/lib.rs | Added get_blob_name and get_container_name; refactored get_container_client to support async container creation and removed the legacy get_blob_client. |
sdk/storage/azure_storage_blob/tests/blob_container_client.rs | Updated usage of get_container_client to use the async API with an explicit creation flag. |
sdk/storage/azure_storage_blob/tests/blob_client.rs | Adjusted blob client retrieval by using container_client.blob_client with the new naming utilities and async container creation. |
sdk/storage/azure_storage_blob/src/clients/blob_service_client.rs | Refactored to expose internal fields and update blob_container_client construction for improved pipeline persistence. |
sdk/storage/azure_storage_blob/src/clients/blob_container_client.rs | Refactored to expose internal fields and update blob_client creation via a generated client instance. |
sdk/storage/azure_storage_blob/src/clients/blob_client.rs | Refactored to expose internal fields representing the endpoint and client. |
Files not reviewed (1)
- sdk/storage/assets.json: Language not supported
Comments suppressed due to low confidence (1)
sdk/storage/azure_storage_blob_test/src/lib.rs:66
- [nitpick] The function documentation could be enhanced to clearly explain the behavior of the 'create' flag, including its asynchronous container creation and any error propagation.
pub async fn get_container_client(
API change check APIView has identified API level changes in this PR and created following API reviews. |
This PR contains the following: