Skip to content

Add e2e tests for azure.resourcemanager.methodsubscriptionid.operations and nonresource.nonresourceoperations.create#9977

Merged
weidongxu-microsoft merged 2 commits intomainfrom
copilot/add-e2e-test-azure-resourcemanager
Mar 10, 2026
Merged

Add e2e tests for azure.resourcemanager.methodsubscriptionid.operations and nonresource.nonresourceoperations.create#9977
weidongxu-microsoft merged 2 commits intomainfrom
copilot/add-e2e-test-azure-resourcemanager

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

Adds missing e2e test coverage for two ARM Spector scenarios in the http-client-java test suite.

Changes

  • MethodSubscriptionIdTest.java — adds testOperationsList() to cover the azure.resourcemanager.methodsubscriptionid.operations scenario: calls manager.operations().list() and asserts the returned operation name, isDataAction, and display fields against the expected Spector mock response.

  • NonResourceTests.java — adds testNonResourceCreate() to cover the azure.resourcemanager.nonresource.nonresourceoperations.create scenario: uses the low-level fluent client (manager.serviceClient().getNonResourceOperations().create(...)) directly, since the high-level model mistakenly treats NonResource as an ARM resource (same reason the existing testNonResourcePut() is @Disabled).

// NonResource create — goes via low-level client to bypass incorrect resource treatment
NonResourceInner body = new NonResourceInner().withId("id").withName("hello").withType("nonResource");
NonResourceInner result = manager.serviceClient().getNonResourceOperations().create("eastus", "hello", body);
Assertions.assertEquals("id", result.id());
Assertions.assertEquals("hello", result.name());
Assertions.assertEquals("nonResource", result.type());

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…ns and nonresource.create

Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com>
Copilot AI changed the title [WIP] Add end-to-end test for Azure resource manager operations Add e2e tests for azure.resourcemanager.methodsubscriptionid.operations and nonresource.nonresourceoperations.create Mar 10, 2026
@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:java Issue for the Java client emitter: @typespec/http-client-java label Mar 10, 2026
@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@weidongxu-microsoft weidongxu-microsoft added this pull request to the merge queue Mar 10, 2026
Merged via the queue into main with commit 8c91b9d Mar 10, 2026
31 checks passed
@weidongxu-microsoft weidongxu-microsoft deleted the copilot/add-e2e-test-azure-resourcemanager branch March 10, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:java Issue for the Java client emitter: @typespec/http-client-java

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants