From 685a6ce6d195b97c2e459183ebf2140b9432a6c8 Mon Sep 17 00:00:00 2001 From: Alon Yeshurun Date: Sun, 26 Jun 2022 11:27:27 +0300 Subject: [PATCH] fix large sku scale test and revert sln --- .../ScenarioTests/PowerBITests.ps1 | 9 +++------ .../TestPBIECapacityLargeSku.json | 8 ++++---- src/PowerBIEmbedded/PowerBIEmbedded.sln | 18 +++--------------- 3 files changed, 10 insertions(+), 25 deletions(-) diff --git a/src/PowerBIEmbedded/PowerBI.Test/ScenarioTests/PowerBITests.ps1 b/src/PowerBIEmbedded/PowerBI.Test/ScenarioTests/PowerBITests.ps1 index 8eabcdf32cd8..1897529c2b1b 100644 --- a/src/PowerBIEmbedded/PowerBI.Test/ScenarioTests/PowerBITests.ps1 +++ b/src/PowerBIEmbedded/PowerBI.Test/ScenarioTests/PowerBITests.ps1 @@ -270,24 +270,21 @@ function Test-PowerBIEmbeddedCapacityLargeSku # Test it without specifying a resource group Assert-True {Test-AzPowerBIEmbeddedCapacity -Name $capacityName} - # Updating capacity and Scale up A7 -> A5 - # scaling to A7/A8 is not supported in this region since the list of skus returns A1-A6. + # Updating capacity and Scale up A7 -> A8 $tagsToUpdate = @{"TestTag" = "TestUpdate"} - $capacityUpdated = Update-AzPowerBIEmbeddedCapacity -ResourceGroupName $resourceGroupName -Name $capacityName -Tag $tagsToUpdate -Sku 'A5' -Administrator 'aztest1@stabletest.ccsctp.net' -PassThru + $capacityUpdated = Update-AzPowerBIEmbeddedCapacity -ResourceGroupName $resourceGroupName -Name $capacityName -Tag $tagsToUpdate -Sku 'A8' -Administrator 'aztest1@stabletest.ccsctp.net' -PassThru Assert-NotNull $capacityUpdated.Tag "Tag do not exists" Assert-NotNull $capacityUpdated.Tag["TestTag"] "The updated tag 'TestTag' does not exist" Assert-AreEqual $capacityUpdated.Administrator.Count 1 - Assert-AreEqual A5 $capacityUpdated.Sku + Assert-AreEqual A8 $capacityUpdated.Sku Assert-NotNull $capacityUpdated.Administrator "Capacity Administrator list is empty" # Suspend PowerBI Embedded capacity $capacityGetItem = Suspend-AzPowerBIEmbeddedCapacity -ResourceGroupName $resourceGroupName -Name $capacityName -PassThru - # this is to ensure backward compatibility compatibility. The servie side would make change to differenciate state and provisioningState in future [array]$capacityGet = Get-AzPowerBIEmbeddedCapacity -ResourceId $capacityGetItem.Id $capacityGetItem = $capacityGet[0] Assert-AreEqual $capacityGetItem.Name $capacityGetItem.Name Assert-True {$capacityGetItem.State -like "Paused"} - Assert-AreEqual $resourceGroupName $capacityGetItem.ResourceGroup # Resume PowerBI Embedded capacity $capacityGetItem = Resume-AzPowerBIEmbeddedCapacity -ResourceGroupName $resourceGroupName -Name $capacityName -PassThru diff --git a/src/PowerBIEmbedded/PowerBI.Test/SessionRecords/Microsoft.Azure.Commands.PowerBI.Test.ScenarioTests.PowerBITests/TestPBIECapacityLargeSku.json b/src/PowerBIEmbedded/PowerBI.Test/SessionRecords/Microsoft.Azure.Commands.PowerBI.Test.ScenarioTests.PowerBITests/TestPBIECapacityLargeSku.json index ea9f8d5d0aac..e1f8631eb802 100644 --- a/src/PowerBIEmbedded/PowerBI.Test/SessionRecords/Microsoft.Azure.Commands.PowerBI.Test.ScenarioTests.PowerBITests/TestPBIECapacityLargeSku.json +++ b/src/PowerBIEmbedded/PowerBI.Test/SessionRecords/Microsoft.Azure.Commands.PowerBI.Test.ScenarioTests.PowerBITests/TestPBIECapacityLargeSku.json @@ -1984,7 +1984,7 @@ "Microsoft.Azure.Management.PowerBIDedicated.PowerBIDedicatedManagementClient/0.10.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A7\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A2\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A3\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A4\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A5\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A6\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A7\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A2\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A3\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A4\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A8\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A6\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ "593" @@ -2059,7 +2059,7 @@ "Microsoft.Azure.Management.PowerBIDedicated.PowerBIDedicatedManagementClient/0.10.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A7\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A2\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A3\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A4\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A5\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A6\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n }\r\n ]\r\n}", + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A7\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A2\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A3\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A4\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A8\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n },\r\n {\r\n \"resourceType\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"sku\": {\r\n \"name\": \"A6\",\r\n \"tier\": \"PBIE_Azure\"\r\n }\r\n }\r\n ]\r\n}", "ResponseHeaders": { "Content-Length": [ "593" @@ -2119,7 +2119,7 @@ "RequestUri": "/subscriptions/2680339a-9c9f-4b37-9468-a3de1f19f74f/resourceGroups/ps1260/providers/Microsoft.PowerBIDedicated/capacities/ps9531?api-version=2017-10-01", "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMjY4MDMzOWEtOWM5Zi00YjM3LTk0NjgtYTNkZTFmMTlmNzRmL3Jlc291cmNlR3JvdXBzL3BzMTI2MC9wcm92aWRlcnMvTWljcm9zb2Z0LlBvd2VyQklEZWRpY2F0ZWQvY2FwYWNpdGllcy9wczk1MzE/YXBpLXZlcnNpb249MjAxNy0xMC0wMQ==", "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"A5\",\r\n \"tier\": \"PBIE_Azure\"\r\n },\r\n \"tags\": {\r\n \"TestTag\": \"TestUpdate\"\r\n },\r\n \"properties\": {\r\n \"administration\": {\r\n \"members\": [\r\n \"aztest1@stabletest.ccsctp.net\"\r\n ]\r\n }\r\n }\r\n}", + "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"A8\",\r\n \"tier\": \"PBIE_Azure\"\r\n },\r\n \"tags\": {\r\n \"TestTag\": \"TestUpdate\"\r\n },\r\n \"properties\": {\r\n \"administration\": {\r\n \"members\": [\r\n \"aztest1@stabletest.ccsctp.net\"\r\n ]\r\n }\r\n }\r\n}", "RequestHeaders": { "Content-Type": [ "application/json; charset=utf-8" @@ -2140,7 +2140,7 @@ "Microsoft.Azure.Management.PowerBIDedicated.PowerBIDedicatedManagementClient/0.10.0.0" ] }, - "ResponseBody": "{\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"state\": \"Succeeded\",\r\n \"administration\": {\r\n \"members\": [\r\n \"aztest1@stabletest.ccsctp.net\"\r\n ]\r\n }\r\n },\r\n \"id\": \"/subscriptions/2680339a-9c9f-4b37-9468-a3de1f19f74f/resourceGroups/ps1260/providers/Microsoft.PowerBIDedicated/capacities/ps9531\",\r\n \"name\": \"ps9531\",\r\n \"type\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"location\": \"West Central US\",\r\n \"sku\": {\r\n \"name\": \"A5\",\r\n \"tier\": \"PBIE_Azure\"\r\n },\r\n \"tags\": {\r\n \"TestTag\": \"TestUpdate\"\r\n }\r\n}", + "ResponseBody": "{\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"state\": \"Succeeded\",\r\n \"administration\": {\r\n \"members\": [\r\n \"aztest1@stabletest.ccsctp.net\"\r\n ]\r\n }\r\n },\r\n \"id\": \"/subscriptions/2680339a-9c9f-4b37-9468-a3de1f19f74f/resourceGroups/ps1260/providers/Microsoft.PowerBIDedicated/capacities/ps9531\",\r\n \"name\": \"ps9531\",\r\n \"type\": \"Microsoft.PowerBIDedicated/capacities\",\r\n \"location\": \"West Central US\",\r\n \"sku\": {\r\n \"name\": \"A8\",\r\n \"tier\": \"PBIE_Azure\"\r\n },\r\n \"tags\": {\r\n \"TestTag\": \"TestUpdate\"\r\n }\r\n}", "ResponseHeaders": { "Content-Length": [ "431" diff --git a/src/PowerBIEmbedded/PowerBIEmbedded.sln b/src/PowerBIEmbedded/PowerBIEmbedded.sln index 9339b5c2c582..5da23dbc3533 100644 --- a/src/PowerBIEmbedded/PowerBIEmbedded.sln +++ b/src/PowerBIEmbedded/PowerBIEmbedded.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.32602.291 +# Visual Studio 15 +VisualStudioVersion = 15.0.27703.2042 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerBIEmbedded", "PowerBIEmbedded\PowerBIEmbedded.csproj", "{50C2BA13-7203-4A70-9058-19FB15C730DA}" EndProject @@ -94,18 +94,6 @@ Global {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|x64.Build.0 = Release|Any CPU {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|x86.ActiveCfg = Release|Any CPU {142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|x86.Build.0 = Release|Any CPU - {6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|x64.ActiveCfg = Debug|Any CPU - {6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|x64.Build.0 = Debug|Any CPU - {6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|x86.ActiveCfg = Debug|Any CPU - {6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|x86.Build.0 = Debug|Any CPU - {6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|Any CPU.Build.0 = Release|Any CPU - {6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|x64.ActiveCfg = Release|Any CPU - {6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|x64.Build.0 = Release|Any CPU - {6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|x86.ActiveCfg = Release|Any CPU - {6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|x86.Build.0 = Release|Any CPU {FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.Build.0 = Debug|Any CPU {FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -165,4 +153,4 @@ Global GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {DB4F6337-206E-4CC4-9940-C24794336EEB} EndGlobalSection -EndGlobal +EndGlobal \ No newline at end of file