Skip to content

[storagemover] Add scenario tests for Storage Mover#49281

Merged
sssash18 merged 8 commits into
mainfrom
fix/storagemover-java-v2
Jun 1, 2026
Merged

[storagemover] Add scenario tests for Storage Mover#49281
sssash18 merged 8 commits into
mainfrom
fix/storagemover-java-v2

Conversation

@sssash18

@sssash18 sssash18 commented May 27, 2026

Copy link
Copy Markdown
Member

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.java classes.

Release Plan Details

Suyash Choudhary and others added 4 commits May 26, 2026 16:58
…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>
Copilot AI review requested due to automatic review settings May 27, 2026 11:16
@github-actions github-actions Bot added the Mgmt This issue is related to a management-plane library. label May 27, 2026

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.

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.json tag 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.

@sssash18 sssash18 changed the title [storagemover] Add cross-language scenario test matrix (32 rows: #31 private-source C2C E2E + #32 Connection CRUD) [storagemover] Add scenario tests for Storage Mover May 27, 2026
Suyash Choudhary and others added 3 commits May 29, 2026 12:42
…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>
@sssash18 sssash18 enabled auto-merge (squash) May 29, 2026 08:05

@XiaofeiCao XiaofeiCao 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.

LGTM

@sssash18 sssash18 disabled auto-merge May 29, 2026 11:34
@sssash18 sssash18 enabled auto-merge (squash) June 1, 2026 05:01
@sssash18 sssash18 merged commit c8a68da into main Jun 1, 2026
17 checks passed
@sssash18 sssash18 deleted the fix/storagemover-java-v2 branch June 1, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Mgmt This issue is related to a management-plane library.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants