Skip to content

Commit

Permalink
Update the version of cadl-ranch-specs to 0.38.0 (#5128)
Browse files Browse the repository at this point in the history
* update

* update

* Delete unnecessary code

* update

* update
  • Loading branch information
melina5656 authored Oct 31, 2024
1 parent fb93e00 commit 53d68c4
Show file tree
Hide file tree
Showing 95 changed files with 918 additions and 855 deletions.
4 changes: 2 additions & 2 deletions eng/testProjects.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"authentication/http/custom",
"authentication/oauth2",
"authentication/union",
"azure/resource-manager/models/resources",
"azure/resource-manager/resources",
"azure/core/basic",
"azure/core/lro/standard",
"azure/core/lro/rpc",
Expand All @@ -32,7 +32,7 @@
"azure/client-generator-core/access",
"azure/client-generator-core/flatten-property",
"azure/client-generator-core/usage",
"azure/resource-manager/models/common-types/managed-identity",
"azure/resource-manager/common-properties",
"azure/special-headers/client-request-id",
"encode/bytes",
"encode/datetime",
Expand Down
409 changes: 236 additions & 173 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"url": "https://github.com/Azure/autorest.csharp/issues"
},
"devDependencies": {
"@azure-tools/cadl-ranch-specs": "0.37.7",
"@azure-tools/cadl-ranch-specs": "0.38.0",
"@azure-tools/typespec-client-generator-core": "0.47.1",
"@azure-tools/typespec-azure-resource-manager": "0.47.0",
"@azure-tools/typespec-csharp": "file:src/TypeSpec.Extension/Emitter.Csharp",
Expand Down
8 changes: 4 additions & 4 deletions src/AutoRest.CSharp/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -652,13 +652,13 @@
"commandName": "Project",
"commandLineArgs": "--standalone $(SolutionDir)\\test\\CadlRanchProjects\\azure\\core\\traits\\src\\Generated -n"
},
"typespec-azure/resource-manager/models/common-types/managed-identity": {
"typespec-azure/resource-manager/common-properties": {
"commandName": "Project",
"commandLineArgs": "--standalone $(SolutionDir)\\test\\CadlRanchProjects\\azure\\resource-manager\\models\\common-types\\managed-identity\\src\\Generated -n"
"commandLineArgs": "--standalone $(SolutionDir)\\test\\CadlRanchProjects\\azure\\resource-manager\\common-properties\\src\\Generated -n"
},
"typespec-azure/resource-manager/models/resources": {
"typespec-azure/resource-manager/resources": {
"commandName": "Project",
"commandLineArgs": "--standalone $(SolutionDir)\\test\\CadlRanchProjects\\azure\\resource-manager\\models\\resources\\src\\Generated -n"
"commandLineArgs": "--standalone $(SolutionDir)\\test\\CadlRanchProjects\\azure\\resource-manager\\resources\\src\\Generated -n"
},
"typespec-azure/special-headers/client-request-id": {
"commandName": "Project",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using AutoRest.TestServer.Tests.Infrastructure;
using Azure.Core;
using Azure.ResourceManager;
using _Azure.ResourceManager.Models.CommonTypes.ManagedIdentity;
using _Azure.ResourceManager.CommonProperties;
using Azure.ResourceManager.Resources;
using NUnit.Framework;
using Azure.ResourceManager.Models;
Expand All @@ -13,7 +13,7 @@ namespace CadlRanchProjects.Tests
public class AzureManagedIdentityTest : CadlRanchTestBase
{
[Test]
public Task Azure_Managed_Identity_ManagedIdentityTrackedResource_get() => Test(async (host) =>
public Task Azure_CommonProperties_ManagedIdentity_get() => Test(async (host) =>
{
ArmClient client = MgmtTestHelper.CreateArmClientWithMockAuth(host);
var resourceId = ManagedIdentityTrackedResource.CreateResourceIdentifier("00000000-0000-0000-0000-000000000000", "test-rg", "identity");
Expand All @@ -29,7 +29,7 @@ public Task Azure_Managed_Identity_ManagedIdentityTrackedResource_get() => Test(
});

[Test]
public Task Azure_Managed_Identity_ManagedIdentityTrackedResourceCollection_createWithSystemAssigned() => Test(async (host) =>
public Task Azure_CommonProperties_ManagedIdentityCollection_createWithSystemAssigned() => Test(async (host) =>
{
ArmClient client = MgmtTestHelper.CreateArmClientWithMockAuth(host);
var resourceId = ResourceGroupResource.CreateResourceIdentifier("00000000-0000-0000-0000-000000000000", "test-rg");
Expand All @@ -41,15 +41,15 @@ public Task Azure_Managed_Identity_ManagedIdentityTrackedResourceCollection_crea
var response = await collection.CreateOrUpdateAsync(Azure.WaitUntil.Completed, "identity", inputData);
Assert.AreEqual(200, response.GetRawResponse().Status);
Assert.AreEqual(AzureLocation.EastUS, response.Value.Data.Location);
Assert.AreEqual(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.Models.CommonTypes.ManagedIdentity/managedIdentityTrackedResources/identity"), response.Value.Data.Id);
Assert.AreEqual(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Azure.ResourceManager.CommonProperties/managedIdentityTrackedResources/identity"), response.Value.Data.Id);
Assert.AreEqual("Succeeded", response.Value.Data.Properties.ProvisioningState);
Assert.AreEqual(ManagedServiceIdentityType.SystemAssigned, response.Value.Data.Identity.ManagedServiceIdentityType);
Assert.AreEqual(Guid.Empty, response.Value.Data.Identity.TenantId);
Assert.AreEqual(Guid.Empty, response.Value.Data.Identity.PrincipalId);
});

[Test]
public Task Azure_Managed_Identity_ManagedIdentityTrackedResource_updateWithUserAssignedAndSystemAssigned() => Test(async (host) =>
public Task Azure_CommonProperties_ManagedIdentity_updateWithUserAssignedAndSystemAssigned() => Test(async (host) =>
{
ArmClient client = MgmtTestHelper.CreateArmClientWithMockAuth(host);
var resourceId = ManagedIdentityTrackedResource.CreateResourceIdentifier("00000000-0000-0000-0000-000000000000", "test-rg", "identity");
Expand Down
Loading

0 comments on commit 53d68c4

Please sign in to comment.