[storagemover] Add scenario tests for Storage Mover#49281
Merged
Conversation
…methods) Ports the cross-language Storage Mover scenario test suite from azure-sdk-for-net (Azure.ResourceManager.StorageMover/tests/Scenario, 9 files, 30 methods) to the Java SDK. Layout is 1:1 with the .NET source; assertions are adapted to the Java fluent API. Files: - StorageMoverManagementTestBase abstract base, extends ResourceManagerTestProxyTestBase. Provides MultiCloudConnector / AWS S3 well-known IDs from the .NET base, FAKE_STORAGE_ACCOUNT_ID, FIXED_SCHEDULE_START (2030-01-01T00:00:00Z so playback is deterministic and the date serialises with a Z suffix to avoid the RP +00:00 bug documented in the cross-language playbook), generateRandomResourceName, and an assertNotFound helper for the Java-no-Exists-API gap. - AgentTests 1 method, @disabled (agent VM required) - StorageMoverCollectionTests 1 method - StorageMoverResourceTests 5 methods, 1 @disabled - ProjectCollectionTests 1 method - ProjectResourceTests 1 method - JobDefinitionJobRunTests 1 method (startJob/stopJob assertThrows ManagementException) - JobDefinitionScheduleTests 3 methods (Weekly / Daily + preservePermissions / Onetime) - JobRunTests 1 method (combined empty list + 404 get) - EndpointTests 16 methods (omnibus + MultiCloudConnector + S3WithHmac activated + 7 valid endpointKind + 5 invalid endpointKind + NfsFileShare). SMB-update identity:None workaround applied per the cross-language playbook. assets.json added with empty Tag; will be populated on first test-proxy push. The pre-existing trivial smoke test StorageMoverManagerTests.java is removed; the README example is hard-coded (not embed-extracted) so this does not affect docs. Compile-checked under Java 21 + Java 8 baseline. All 120 generated mock tests still pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…agement assertions
…efinition with private source
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the Java port of the cross-language Storage Mover scenario test matrix to azure-resourcemanager-storagemover, including the new private-link Connection CRUD scenario (row #32) and the end-to-end private-source C2C scenario (row #31), with assets pinned for playback.
Changes:
- Replaces the prior ad-hoc live-only manager test with a scenario-based suite under
src/test/java/.../scenario/. - Introduces a shared scenario-test base that handles test-proxy sanitizers, shared pipeline setup, and cross-sub managers used by the new E2E scenarios.
- Adds test-scope dependencies needed for private endpoint approval, RBAC assignment, and blob container provisioning, plus an
assets.jsontag pin.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| sdk/storagemover/azure-resourcemanager-storagemover/src/test/java/com/azure/resourcemanager/storagemover/StorageMoverManagerTests.java | Removes the old live-only test in favor of scenario coverage. |
| sdk/storagemover/azure-resourcemanager-storagemover/src/test/java/com/azure/resourcemanager/storagemover/scenario/StorageMoverManagementTestBase.java | Adds shared scenario base (pipeline, sanitizers, helpers, cross-sub managers). |
| sdk/storagemover/azure-resourcemanager-storagemover/src/test/java/com/azure/resourcemanager/storagemover/scenario/StorageMoverResourceTests.java | Adds StorageMover resource CRUD/tagging scenarios (incl. disabled agent scenario placeholder). |
| sdk/storagemover/azure-resourcemanager-storagemover/src/test/java/com/azure/resourcemanager/storagemover/scenario/StorageMoverCollectionTests.java | Adds StorageMover collection create/update/get/list/existence scenarios. |
| sdk/storagemover/azure-resourcemanager-storagemover/src/test/java/com/azure/resourcemanager/storagemover/scenario/ProjectCollectionTests.java | Adds Project collection create/get/list scenario. |
| sdk/storagemover/azure-resourcemanager-storagemover/src/test/java/com/azure/resourcemanager/storagemover/scenario/ProjectResourceTests.java | Adds Project resource get/update/delete scenario. |
| sdk/storagemover/azure-resourcemanager-storagemover/src/test/java/com/azure/resourcemanager/storagemover/scenario/JobDefinitionJobRunTests.java | Adds JobDefinition CRUD and expected failure for start/stop without agent. |
| sdk/storagemover/azure-resourcemanager-storagemover/src/test/java/com/azure/resourcemanager/storagemover/scenario/JobDefinitionScheduleTests.java | Adds schedule scenarios with dynamic dates + sanitizer strategy for portable playback. |
| sdk/storagemover/azure-resourcemanager-storagemover/src/test/java/com/azure/resourcemanager/storagemover/scenario/JobRunTests.java | Adds JobRun list/get negative assertions for agentless environment. |
| sdk/storagemover/azure-resourcemanager-storagemover/src/test/java/com/azure/resourcemanager/storagemover/scenario/EndpointTests.java | Adds endpoint CRUD and endpoint-kind validation scenarios (incl. S3WithHmac activated). |
| sdk/storagemover/azure-resourcemanager-storagemover/src/test/java/com/azure/resourcemanager/storagemover/scenario/ConnectionTests.java | Adds Connection CRUD against shared private-link service (row #32). |
| sdk/storagemover/azure-resourcemanager-storagemover/src/test/java/com/azure/resourcemanager/storagemover/scenario/JobDefinitionPrivateSourceTests.java | Adds full private-source C2C E2E scenario with PE approval, RBAC, startJob polling, cleanup (row #31). |
| sdk/storagemover/azure-resourcemanager-storagemover/src/test/java/com/azure/resourcemanager/storagemover/scenario/AgentTests.java | Adds disabled agent scenario placeholder to match cross-language matrix. |
| sdk/storagemover/azure-resourcemanager-storagemover/pom.xml | Adds test-scope mgmt dependencies for network/authorization/storage used by new scenarios. |
| sdk/storagemover/azure-resourcemanager-storagemover/assets.json | Pins the azure-sdk-assets tag for deterministic playback. |
XiaofeiCao
reviewed
May 28, 2026
XiaofeiCao
reviewed
May 28, 2026
…ule tests for improved validation
…vider for StorageMoverManager LROs - Remove unused STORAGE_BLOB_DATA_CONTRIBUTOR_ROLE_ID constant. - Build StorageMoverManager via reflection on its 3-arg constructor so defaultPollInterval is sourced from InternalRuntimeContext, letting TestDelayProvider collapse LRO polling delays in playback. Cuts full-module playback from ~7 min to ~1 min. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
alzimmermsft
approved these changes
May 29, 2026
XiaofeiCao
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adding Scenario tests for suite in Java
(
sdk/storagemover/azure-resourcemanager-storagemover). Mirrors the.NET source-of-truth 1:1 across all 32 rows of the language-agnostic
matrix shared with .NET, Python, JS, Go, and the CLI extension.
Net layout: 10 files under
src/test/java/com/azure/resourcemanager/storagemover/scenario/—StorageMoverManagementTestBase+ 9*Tests.javaclasses.Release Plan Details