From 10f6ad0c6416ee7b84427b30a3068fec2005e6aa Mon Sep 17 00:00:00 2001 From: YalinLi0312 Date: Wed, 24 Mar 2021 16:18:02 -0700 Subject: [PATCH 1/4] Change the accessbility to virtual for Resource.Id --- .../Azure.ResourceManager.Core/src/Resources/Resource.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/Resources/Resource.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/Resources/Resource.cs index 86a35ac05cf7..a8638d1c689b 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/Resources/Resource.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/Resources/Resource.cs @@ -14,7 +14,7 @@ public abstract class Resource : IEquatable, IEquatable, IComp /// /// Gets or sets the resource identifier. /// - public abstract ResourceIdentifier Id { get; protected set; } + public virtual ResourceIdentifier Id { get; protected set; } /// /// Gets the name. From 89edf8868d1734bb1ac825297a68943ce7d754fd Mon Sep 17 00:00:00 2001 From: YalinLi0312 Date: Tue, 15 Jun 2021 18:24:50 -0700 Subject: [PATCH 2/4] Add ResourceGroupBuilder tests --- .../Scenario/ResourceGroupBuilderTests.cs | 34 ++++++++++++ .../CreateOrUpdate(% %).json | 54 +++++++++++++++++++ .../CreateOrUpdate(% %)Async.json | 54 +++++++++++++++++++ .../CreateOrUpdate(null).json | 53 ++++++++++++++++++ .../CreateOrUpdate(null)Async.json | 53 ++++++++++++++++++ .../StartCreateOrUpdate(% %).json | 54 +++++++++++++++++++ .../StartCreateOrUpdate(% %)Async.json | 54 +++++++++++++++++++ .../StartCreateOrUpdate(null).json | 54 +++++++++++++++++++ .../StartCreateOrUpdate(null)Async.json | 54 +++++++++++++++++++ 9 files changed, 464 insertions(+) create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %).json create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %)Async.json create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null).json create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null)Async.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs new file mode 100644 index 000000000000..08ed2d4cabb8 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs @@ -0,0 +1,34 @@ +using System; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.ResourceManager.Core.Tests +{ + public class ResourceGroupBuilderTests : ResourceManagerTestBase + { + public ResourceGroupBuilderTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) + { + } + + [TestCase(null)] + [TestCase(" ")] + [RecordedTest] + public void CreateOrUpdate(string value) + { + Assert.ThrowsAsync(async () => _ = await Client.DefaultSubscription.GetResourceGroups().Construct(LocationData.WestUS2).CreateOrUpdateAsync(value)); + } + + [TestCase(null)] + [TestCase(" ")] + [RecordedTest] + public void StartCreateOrUpdate(string value) + { + Assert.ThrowsAsync(async () => + { + var createOp = await Client.DefaultSubscription.GetResourceGroups().Construct(LocationData.WestUS2).StartCreateOrUpdateAsync(value); + _ = await createOp.WaitForCompletionAsync(); + }); + } + } +} diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json new file mode 100644 index 000000000000..c7460deca67d --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json @@ -0,0 +1,54 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-9e830120622efd4ca48916403e678965-d04c418808164f48-00", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "5da32cdbee442f53ad78aa1728c3cddc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 01:20:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1e944d50-797a-497c-a3ed-48c38dee520c", + "x-ms-ratelimit-remaining-subscription-reads": "11938", + "x-ms-request-id": "1e944d50-797a-497c-a3ed-48c38dee520c", + "x-ms-routing-request-id": "WESTUS2:20210616T012056Z:1e944d50-797a-497c-a3ed-48c38dee520c" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "608171253", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json new file mode 100644 index 000000000000..05dae6267df3 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json @@ -0,0 +1,54 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-0745e56c623c0c4aaa25078ca2221547-71195125c1879840-00", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "5da32cdbee442f53ad78aa1728c3cddc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 01:20:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c2fa8bf6-6af8-43ac-87d2-19061f9a6846", + "x-ms-ratelimit-remaining-subscription-reads": "11937", + "x-ms-request-id": "c2fa8bf6-6af8-43ac-87d2-19061f9a6846", + "x-ms-routing-request-id": "WESTUS2:20210616T012057Z:c2fa8bf6-6af8-43ac-87d2-19061f9a6846" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "608171253", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json new file mode 100644 index 000000000000..4fd072c72838 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json @@ -0,0 +1,53 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "487be0b0ab2f46a52df414be3ca55843", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 01:20:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b2db9e15-b99f-4106-ad86-f1638ae1ac59", + "x-ms-ratelimit-remaining-subscription-reads": "11939", + "x-ms-request-id": "b2db9e15-b99f-4106-ad86-f1638ae1ac59", + "x-ms-routing-request-id": "WESTUS2:20210616T012056Z:b2db9e15-b99f-4106-ad86-f1638ae1ac59" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "451162049", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json new file mode 100644 index 000000000000..f39253c895dc --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json @@ -0,0 +1,53 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "487be0b0ab2f46a52df414be3ca55843", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 01:20:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f9d534d9-5f7b-496b-9517-94462189eae9", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "f9d534d9-5f7b-496b-9517-94462189eae9", + "x-ms-routing-request-id": "WESTUS2:20210616T012056Z:f9d534d9-5f7b-496b-9517-94462189eae9" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "451162049", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %).json new file mode 100644 index 000000000000..193724b45b34 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %).json @@ -0,0 +1,54 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-6f7bae901097a94cbc7fc6bebf3356f9-c8cd8c94c816314e-00", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e844ae4d35c20df28b6f9ab57c0f8770", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 01:20:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "46d786e0-715d-4436-998b-4f46efe1527e", + "x-ms-ratelimit-remaining-subscription-reads": "11934", + "x-ms-request-id": "46d786e0-715d-4436-998b-4f46efe1527e", + "x-ms-routing-request-id": "WESTUS2:20210616T012057Z:46d786e0-715d-4436-998b-4f46efe1527e" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1484004923", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %)Async.json new file mode 100644 index 000000000000..c52428b2917b --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %)Async.json @@ -0,0 +1,54 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-50fe7f7058a7614998acd51376aaabcc-99bb22ad491af947-00", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "2bab98b8eb01e162943c21199833f4e4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 01:20:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5e3150dc-7ad9-4153-83ab-c2bd283c4644", + "x-ms-ratelimit-remaining-subscription-reads": "11933", + "x-ms-request-id": "5e3150dc-7ad9-4153-83ab-c2bd283c4644", + "x-ms-routing-request-id": "WESTUS2:20210616T012057Z:5e3150dc-7ad9-4153-83ab-c2bd283c4644" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1371608248", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null).json new file mode 100644 index 000000000000..6c2cfa794bd7 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null).json @@ -0,0 +1,54 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-b4605b7fbaed1e418af9b0ae90028b3c-cb08c0be93843746-00", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e7e4706570751cc2779b2c148b3b8840", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 01:20:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "749c65b3-8986-4426-bc4e-5b22d00b5267", + "x-ms-ratelimit-remaining-subscription-reads": "11936", + "x-ms-request-id": "749c65b3-8986-4426-bc4e-5b22d00b5267", + "x-ms-routing-request-id": "WESTUS2:20210616T012057Z:749c65b3-8986-4426-bc4e-5b22d00b5267" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "952452211", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null)Async.json new file mode 100644 index 000000000000..98120ae743e6 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null)Async.json @@ -0,0 +1,54 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-a6ed159fce2741449c04d1d09be6f69f-bf7613da38affe4a-00", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "193c427039055be3a4ab23b30c9e6068", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 01:20:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "de211af6-4cc5-42d0-906f-72e7aeec6784", + "x-ms-ratelimit-remaining-subscription-reads": "11935", + "x-ms-request-id": "de211af6-4cc5-42d0-906f-72e7aeec6784", + "x-ms-routing-request-id": "WESTUS2:20210616T012057Z:de211af6-4cc5-42d0-906f-72e7aeec6784" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "720567928", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file From 831972ec107ae7fc27cf81fcb5fb03cb275b7f13 Mon Sep 17 00:00:00 2001 From: YalinLi0312 Date: Tue, 15 Jun 2021 18:42:50 -0700 Subject: [PATCH 3/4] Address comment --- .../tests/Scenario/ResourceGroupBuilderTests.cs | 4 ++++ .../CreateOrUpdate(% %).json | 12 ++++++------ .../CreateOrUpdate(% %)Async.json | 12 ++++++------ .../CreateOrUpdate(null).json | 10 +++++----- .../CreateOrUpdate(null)Async.json | 8 ++++---- 5 files changed, 25 insertions(+), 21 deletions(-) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs index 08ed2d4cabb8..4324fec8804f 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs @@ -17,6 +17,10 @@ public ResourceGroupBuilderTests(bool isAsync) public void CreateOrUpdate(string value) { Assert.ThrowsAsync(async () => _ = await Client.DefaultSubscription.GetResourceGroups().Construct(LocationData.WestUS2).CreateOrUpdateAsync(value)); + + var location = LocationData.WestUS2; + var rgData = Client.DefaultSubscription.GetResourceGroups().Construct(location).Build(); + Assert.AreEqual(location, rgData.Location); } [TestCase(null)] diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json index c7460deca67d..5ce51650ea43 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json @@ -6,7 +6,7 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-9e830120622efd4ca48916403e678965-d04c418808164f48-00", + "traceparent": "00-8441a0420ac0e34d82c4f532255e5c5c-3d0cf4bcf8752342-00", "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "5da32cdbee442f53ad78aa1728c3cddc", "x-ms-return-client-request-id": "true" @@ -17,15 +17,15 @@ "Cache-Control": "no-cache", "Content-Length": "450", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 16 Jun 2021 01:20:56 GMT", + "Date": "Wed, 16 Jun 2021 01:39:18 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "1e944d50-797a-497c-a3ed-48c38dee520c", - "x-ms-ratelimit-remaining-subscription-reads": "11938", - "x-ms-request-id": "1e944d50-797a-497c-a3ed-48c38dee520c", - "x-ms-routing-request-id": "WESTUS2:20210616T012056Z:1e944d50-797a-497c-a3ed-48c38dee520c" + "x-ms-correlation-request-id": "2c646c76-f174-44d3-b868-49147135d1de", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "2c646c76-f174-44d3-b868-49147135d1de", + "x-ms-routing-request-id": "WESTUS2:20210616T013918Z:2c646c76-f174-44d3-b868-49147135d1de" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json index 05dae6267df3..505de926d885 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json @@ -6,7 +6,7 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-0745e56c623c0c4aaa25078ca2221547-71195125c1879840-00", + "traceparent": "00-fe752f24896e374ca5ad9ab9cb2210ad-3c0b2f4462e38640-00", "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "5da32cdbee442f53ad78aa1728c3cddc", "x-ms-return-client-request-id": "true" @@ -17,15 +17,15 @@ "Cache-Control": "no-cache", "Content-Length": "450", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 16 Jun 2021 01:20:56 GMT", + "Date": "Wed, 16 Jun 2021 01:39:17 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c2fa8bf6-6af8-43ac-87d2-19061f9a6846", - "x-ms-ratelimit-remaining-subscription-reads": "11937", - "x-ms-request-id": "c2fa8bf6-6af8-43ac-87d2-19061f9a6846", - "x-ms-routing-request-id": "WESTUS2:20210616T012057Z:c2fa8bf6-6af8-43ac-87d2-19061f9a6846" + "x-ms-correlation-request-id": "c625ca20-4fc6-4053-876f-995f269bd93b", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "c625ca20-4fc6-4053-876f-995f269bd93b", + "x-ms-routing-request-id": "WESTUS2:20210616T013918Z:c625ca20-4fc6-4053-876f-995f269bd93b" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json index 4fd072c72838..fc158bca48ab 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json @@ -16,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "450", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 16 Jun 2021 01:20:56 GMT", + "Date": "Wed, 16 Jun 2021 01:39:17 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b2db9e15-b99f-4106-ad86-f1638ae1ac59", - "x-ms-ratelimit-remaining-subscription-reads": "11939", - "x-ms-request-id": "b2db9e15-b99f-4106-ad86-f1638ae1ac59", - "x-ms-routing-request-id": "WESTUS2:20210616T012056Z:b2db9e15-b99f-4106-ad86-f1638ae1ac59" + "x-ms-correlation-request-id": "2023d432-37d1-424b-a688-5413bfa74fea", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "2023d432-37d1-424b-a688-5413bfa74fea", + "x-ms-routing-request-id": "WESTUS2:20210616T013918Z:2023d432-37d1-424b-a688-5413bfa74fea" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json index f39253c895dc..a6b2a2b0821d 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json @@ -16,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "450", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 16 Jun 2021 01:20:56 GMT", + "Date": "Wed, 16 Jun 2021 01:39:18 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f9d534d9-5f7b-496b-9517-94462189eae9", + "x-ms-correlation-request-id": "662aecd3-ffc5-4894-aa29-ea194910eb2a", "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "f9d534d9-5f7b-496b-9517-94462189eae9", - "x-ms-routing-request-id": "WESTUS2:20210616T012056Z:f9d534d9-5f7b-496b-9517-94462189eae9" + "x-ms-request-id": "662aecd3-ffc5-4894-aa29-ea194910eb2a", + "x-ms-routing-request-id": "WESTUS2:20210616T013918Z:662aecd3-ffc5-4894-aa29-ea194910eb2a" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", From 7ea58d20e82cedf11aba8e718e7bc4af304a8bae Mon Sep 17 00:00:00 2001 From: YalinLi0312 Date: Tue, 15 Jun 2021 19:33:52 -0700 Subject: [PATCH 4/4] Extract the test for Build() to a seperate method --- .../Scenario/ResourceGroupBuilderTests.cs | 21 ++++++-- .../ResourceGroupBuilderTests/Build().json | 53 +++++++++++++++++++ .../Build()Async.json | 53 +++++++++++++++++++ .../CreateOrUpdate(% %).json | 9 ++-- .../CreateOrUpdate(% %)Async.json | 9 ++-- .../CreateOrUpdate(null).json | 8 +-- .../CreateOrUpdate(null)Async.json | 8 +-- 7 files changed, 139 insertions(+), 22 deletions(-) create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build().json create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build()Async.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs index 4324fec8804f..dd77990b9dde 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using Azure.Core.TestFramework; using NUnit.Framework; @@ -17,10 +18,6 @@ public ResourceGroupBuilderTests(bool isAsync) public void CreateOrUpdate(string value) { Assert.ThrowsAsync(async () => _ = await Client.DefaultSubscription.GetResourceGroups().Construct(LocationData.WestUS2).CreateOrUpdateAsync(value)); - - var location = LocationData.WestUS2; - var rgData = Client.DefaultSubscription.GetResourceGroups().Construct(location).Build(); - Assert.AreEqual(location, rgData.Location); } [TestCase(null)] @@ -34,5 +31,21 @@ public void StartCreateOrUpdate(string value) _ = await createOp.WaitForCompletionAsync(); }); } + + [TestCase] + [RecordedTest] + public void Build() + { + var location = LocationData.WestUS2; + var tags = new Dictionary() + { + { "key", "value"} + }; + var managedBy = "managedBy"; + var rgData = Client.DefaultSubscription.GetResourceGroups().Construct(location, tags, managedBy).Build(); + Assert.AreEqual(location, rgData.Location); + Assert.AreEqual(tags, rgData.Tags); + Assert.AreEqual(managedBy, rgData.ManagedBy); + } } } diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build().json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build().json new file mode 100644 index 000000000000..e1e0bca0b888 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build().json @@ -0,0 +1,53 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "cbbc56e8898ecfb1ef80d7b8c3666698", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:30:13 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5e82d327-8c17-42bd-92f2-d94962e2ce18", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "5e82d327-8c17-42bd-92f2-d94962e2ce18", + "x-ms-routing-request-id": "WESTUS2:20210616T023014Z:5e82d327-8c17-42bd-92f2-d94962e2ce18" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1689414197", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build()Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build()Async.json new file mode 100644 index 000000000000..99c5b0a1f770 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build()Async.json @@ -0,0 +1,53 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "87fb2e950f020a11d2dee2b4b46efaf4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:30:13 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "701f1e03-28cc-4b41-807d-ca95898a77af", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "701f1e03-28cc-4b41-807d-ca95898a77af", + "x-ms-routing-request-id": "WESTUS2:20210616T023014Z:701f1e03-28cc-4b41-807d-ca95898a77af" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1270258160", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json index 5ce51650ea43..ac973b09f082 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json @@ -6,7 +6,6 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-8441a0420ac0e34d82c4f532255e5c5c-3d0cf4bcf8752342-00", "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "5da32cdbee442f53ad78aa1728c3cddc", "x-ms-return-client-request-id": "true" @@ -17,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "450", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 16 Jun 2021 01:39:18 GMT", + "Date": "Wed, 16 Jun 2021 02:30:39 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "2c646c76-f174-44d3-b868-49147135d1de", + "x-ms-correlation-request-id": "e16896e2-8e1a-44b4-b76b-8b76e9926a48", "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-request-id": "2c646c76-f174-44d3-b868-49147135d1de", - "x-ms-routing-request-id": "WESTUS2:20210616T013918Z:2c646c76-f174-44d3-b868-49147135d1de" + "x-ms-request-id": "e16896e2-8e1a-44b4-b76b-8b76e9926a48", + "x-ms-routing-request-id": "WESTUS2:20210616T023039Z:e16896e2-8e1a-44b4-b76b-8b76e9926a48" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json index 505de926d885..d977a5819138 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json @@ -6,7 +6,6 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-fe752f24896e374ca5ad9ab9cb2210ad-3c0b2f4462e38640-00", "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", "x-ms-client-request-id": "5da32cdbee442f53ad78aa1728c3cddc", "x-ms-return-client-request-id": "true" @@ -17,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "450", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 16 Jun 2021 01:39:17 GMT", + "Date": "Wed, 16 Jun 2021 02:30:39 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c625ca20-4fc6-4053-876f-995f269bd93b", + "x-ms-correlation-request-id": "09bb05b8-10d9-4180-855c-7adc75458c96", "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "c625ca20-4fc6-4053-876f-995f269bd93b", - "x-ms-routing-request-id": "WESTUS2:20210616T013918Z:c625ca20-4fc6-4053-876f-995f269bd93b" + "x-ms-request-id": "09bb05b8-10d9-4180-855c-7adc75458c96", + "x-ms-routing-request-id": "WESTUS2:20210616T023039Z:09bb05b8-10d9-4180-855c-7adc75458c96" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json index fc158bca48ab..f866a40b4d46 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json @@ -16,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "450", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 16 Jun 2021 01:39:17 GMT", + "Date": "Wed, 16 Jun 2021 02:30:39 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "2023d432-37d1-424b-a688-5413bfa74fea", + "x-ms-correlation-request-id": "7583e0db-b578-47a9-98de-11f86e26c639", "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "2023d432-37d1-424b-a688-5413bfa74fea", - "x-ms-routing-request-id": "WESTUS2:20210616T013918Z:2023d432-37d1-424b-a688-5413bfa74fea" + "x-ms-request-id": "7583e0db-b578-47a9-98de-11f86e26c639", + "x-ms-routing-request-id": "WESTUS2:20210616T023039Z:7583e0db-b578-47a9-98de-11f86e26c639" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json index a6b2a2b0821d..a137c4b67ede 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json @@ -16,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "450", "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 16 Jun 2021 01:39:18 GMT", + "Date": "Wed, 16 Jun 2021 02:30:38 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "662aecd3-ffc5-4894-aa29-ea194910eb2a", + "x-ms-correlation-request-id": "58573bc2-44f5-4b29-820a-4f26b35e69b1", "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "662aecd3-ffc5-4894-aa29-ea194910eb2a", - "x-ms-routing-request-id": "WESTUS2:20210616T013918Z:662aecd3-ffc5-4894-aa29-ea194910eb2a" + "x-ms-request-id": "58573bc2-44f5-4b29-820a-4f26b35e69b1", + "x-ms-routing-request-id": "WESTUS2:20210616T023039Z:58573bc2-44f5-4b29-820a-4f26b35e69b1" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c",