Skip to content

{Storage} Update live-test fixtures to StorageV2 and refresh copy recordings - #34245

Merged
YangAn-microsoft merged 2 commits into
devfrom
storage/live-test-fixtures-recordings
Oct 21, 2026
Merged

YangAn-microsoft merged 2 commits into
devfrom
storage/live-test-fixtures-recordings

Conversation

@YangAn-microsoft

@YangAn-microsoft YangAn-microsoft commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ️✔️ All clear

Breaking Changes Tests
️✔️ None ️✔️ 130/130

Related command

az storage copy, az storage remove, az storage blob sync, az storage blob copy start, az storage blob copy start-batch, and az storage fs directory upload/download

Description

Test-maintenance follow-up to #34230, #34171, and #34138. No production-code changes.

  • Explicitly use StorageV2 for nine selected storage account fixtures across the blob-copy, batch-operation, and AzCopy test files. Live runs using the legacy default Storage kind failed during setup with AccountKindNotSupported.
  • Refresh test_storage_blob_batch_copy.yaml and test_storage_blob_copy_rehydrate_priority.yaml against current development sources.
  • The recordings retain 381 and 8 HTTP interactions, respectively, with unchanged HTTP-method and response-status counts. Most recording churn is refreshed SDK/API metadata, timestamps, request IDs, and generated values.
  • Redact SAS signatures and tenant/user identifiers from the refreshed recordings.

AzCopy and ADLS scenarios inherit from LiveScenarioTest and do not generate replay recordings. The two replayable scenarios were re-recorded with their standard resource-group preparers and replayed without development-resource overrides.

Testing Guide

Validation used Python 3.13 on Windows, the latest API profile, and development source revision ce030fb498a93991794067989bd2d06e0eddc404 plus these test-fixture changes.

Focused regressions:

azdev test test_storage_validators test_storage_url_helpers test_storage_azcopy_util StorageAzcopyEndpointTests StorageBlobCopySecurityTests --series --no-exitfirst

Result: 77 passed, 1 skipped, 103 subtests passed. The skip is for POSIX-only symlink semantics.

Targeted live scenarios:

azdev test test_storage_blob_copy_same_account_sas test_storage_blob_copy_requires_sync test_storage_azcopy_blob_source_with_credential test_storage_azcopy_blob_account test_storage_blob_azcopy_sync_sas test_adls_directory_upload test_adls_directory_download test_storage_blob_copy_rehydrate_priority test_storage_blob_batch_copy --live --series --no-exitfirst

Result: 9 passed.

The live run used a dedicated temporary resource group with an explicitly approved Storage Blob Data Contributor assignment for the signed-in identity, scoped only to that group, to exercise the mixed OAuth/key/SAS ADLS scenarios. The temporary role assignment and all test resource groups were confirmed deleted afterward.

Additional storage remove live coverage, using standard resource-group preparers:

azdev test test_storage_blob_azcopy_remove test_storage_file_azcopy_remove test_storage_azcopy_remove_sas --live --series --no-exitfirst

Result: 3 passed, covering blob removal, Azure Files removal, and supplied SAS credentials. Combined with the initial run, 12 distinct targeted live scenarios passed.

storage_fs_directory_copy is an internal handler registered for storage fs directory upload and storage fs directory download, both covered by the initial live run. There is no separately exposed az storage fs directory copy command in this source revision.

Portable recording generation and replay, without resource-group overrides:

azdev test test_storage_blob_copy_rehydrate_priority test_storage_blob_batch_copy --live --series --no-exitfirst
azdev test test_storage_blob_copy_rehydrate_priority test_storage_blob_batch_copy --series --no-exitfirst

Results: 2 passed live, then 2 passed offline after recording sanitization.

git diff --check: passed.

The full storage live suite was not run. These results cover the selected paths relevant to the three merged PRs, not the entire storage module.

History Notes

None. Test-only maintenance; no customer-facing command behavior changes.


…ordings

Use StorageV2 for six selected account fixtures after legacy Storage creation failed. Refresh and sanitize batch-copy and rehydration-copy recordings; validate nine focused live scenarios and offline replay.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@yonzhan

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! We will review the pull request and get back to you soon.

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Hi YangAn-microsoft,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

Validate blob, Azure Files and SAS remove paths against live storage accounts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@YangAn-microsoft
YangAn-microsoft marked this pull request as ready for review October 20, 2026 06:14
@YangAn-microsoft
YangAn-microsoft requested a review from a team as a code owner October 20, 2026 06:14
Copilot AI balanced review requested due to automatic review settings October 20, 2026 06:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The batch-copy recording refresh described in the PR was not included in the supplied diff, preventing complete validation.

No open issues 🎉

What changed in this PR

Test-only maintenance supporting earlier storage security fixes, with no production behavior changes.

Changes:

  • Set nine storage account fixtures to StorageV2 to avoid setup failures.
  • Refresh copy recordings and sanitize recorded credentials and identifiers.
File Description
src/​azure-cli/​azure/​cli/​command_modules/​storage/​tests/​latest/​test_storage_blob_copy_scenarios.py Updates the same-account SAS fixture.
src/​azure-cli/​azure/​cli/​command_modules/​storage/​tests/​latest/​test_storage_batch_operations.py Updates both batch-copy account fixtures.
src/​azure-cli/​azure/​cli/​command_modules/​storage/​tests/​latest/​test_storage_azcopy_scenarios.py Updates six AzCopy account fixtures.
src/​azure-cli/​azure/​cli/​command_modules/​storage/​tests/​latest/​recordings/​test_storage_blob_copy_rehydrate_priority.yaml Refreshes recording metadata and redacts identity fields.

Review effort: Balanced

@YangAn-microsoft
YangAn-microsoft merged commit 356de06 into dev Oct 21, 2026
107 checks passed
@YangAn-microsoft
YangAn-microsoft deleted the storage/live-test-fixtures-recordings branch October 21, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants