Skip to content

Commit 3a3c93e

Browse files
committed
Merge pull request #155 from markcowl/rt44
Azure RT Changes for Sprint 44
2 parents b775fea + 2df3239 commit 3a3c93e

File tree

42 files changed

+561
-115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+561
-115
lines changed

AzurePowershell.Test.targets

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<HDInsightTestDebug>.\src\ServiceManagement\HDInsight\Commands.HDInsight.Test\bin\Debug\Microsoft.WindowsAzure.Commands.HDInsight.Test.dll</HDInsightTestDebug>
2323
<StorageTestDebug>.\src\ServiceManagement\Storage\Commands.Storage.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Storage.Test.dll</StorageTestDebug>
2424
<KeyVaultTestDebug>.\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll</KeyVaultTestDebug>
25-
<TestFilter>"!Functional&#x26;!Scenario&#x26;!AzureRTScenario&#x26;!Sequential&#x26;!PIRTest&#x26;!Preview&#x26;!ADDomain&#x26;!Network&#x26;!AzureRTUpload"</TestFilter>
25+
<TestFilter>"!Functional&#x26;!Scenario&#x26;!AzureRTScenario&#x26;!Sequential&#x26;!PIRTest&#x26;!Preview&#x26;!ADDomain&#x26;!Network&#x26;!AzureRTUpload&#x26;!AzureRTCleanUp"</TestFilter>
2626
<ScenarioTestFilter>All</ScenarioTestFilter>
2727
<OneSDKCITFilter>"OneSDK&#x26;CIT"</OneSDKCITFilter>
2828
<AzureRTAllTestFilter>"Functional|AzureRTScenario|Sequential|AzureRTUpload|Network"</AzureRTAllTestFilter>
@@ -307,6 +307,14 @@
307307
ContinueOnError="false" />
308308
</Target>
309309

310+
<Target Name="AzureRTCleanUp" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
311+
<Message Importance="high" Text="Running AzureRT clean up tests..." />
312+
<Delete Files="$(TestOutputDirectory)\RTCleanUpDebug.trx" />
313+
<Exec
314+
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:AzureRTCleanUp /resultsfile:$(TestOutputDirectory)\RTCleanUpDebug.trx"
315+
ContinueOnError="false" />
316+
</Target>
317+
310318
<!-- DSC extension related targets -->
311319
<Target Name="TestDSCExtension_x64">
312320
<Message Importance="high" Text="Running DSC extension BVT x64 tests..." />

src/Common/Commands.Common.Test/Commands.Common.Test.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@
105105
<SpecificVersion>False</SpecificVersion>
106106
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.4.0.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
107107
</Reference>
108-
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
109-
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
108+
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
109+
<SpecificVersion>False</SpecificVersion>
110+
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
110111
</Reference>
111112
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
112113
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>

src/Common/Commands.Common.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1717
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
1818
<package id="Microsoft.WindowsAzure.Management" version="4.0.1" targetFramework="net45" />
19-
<package id="Microsoft.WindowsAzure.Management.Compute" version="8.0.0" targetFramework="net45" />
19+
<package id="Microsoft.WindowsAzure.Management.Compute" version="9.0.0" targetFramework="net45" />
2020
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.0.0" targetFramework="net45" />
2121
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
2222
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />

src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@
101101
<SpecificVersion>False</SpecificVersion>
102102
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.4.0.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
103103
</Reference>
104-
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
105-
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
104+
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
105+
<SpecificVersion>False</SpecificVersion>
106+
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
106107
</Reference>
107108
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
108109
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>

src/Common/Commands.ScenarioTest/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1818
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
1919
<package id="Microsoft.WindowsAzure.Management" version="4.0.1" targetFramework="net45" />
20-
<package id="Microsoft.WindowsAzure.Management.Compute" version="8.0.0" targetFramework="net45" />
20+
<package id="Microsoft.WindowsAzure.Management.Compute" version="9.0.0" targetFramework="net45" />
2121
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.0.0" targetFramework="net45" />
2222
<package id="Microsoft.WindowsAzure.Management.WebSites" version="4.4.0-prerelease" targetFramework="net45" />
2323
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />

src/ServiceManagement/Compute/Commands.ServiceManagement.Extensions.Test/Commands.ServiceManagement.Extensions.Test.csproj

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@
4646
<Reference Include="Microsoft.Azure.Common">
4747
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll</HintPath>
4848
</Reference>
49-
<Reference Include="Microsoft.Azure.Common.Extensions, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
50-
<SpecificVersion>False</SpecificVersion>
49+
<Reference Include="Microsoft.Azure.Common.Extensions">
5150
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Extensions.0.14.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll</HintPath>
5251
</Reference>
5352
<Reference Include="Microsoft.Azure.Common.NetFramework">
@@ -73,14 +72,14 @@
7372
<Reference Include="Microsoft.Threading.Tasks.Extensions.Desktop">
7473
<HintPath>..\..\..\packages\Microsoft.Bcl.Async.1.0.168\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll</HintPath>
7574
</Reference>
76-
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
77-
<SpecificVersion>False</SpecificVersion>
78-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
79-
</Reference>
8075
<Reference Include="Microsoft.WindowsAzure.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
8176
<SpecificVersion>False</SpecificVersion>
8277
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
8378
</Reference>
79+
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
80+
<SpecificVersion>False</SpecificVersion>
81+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
82+
</Reference>
8483
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
8584
<SpecificVersion>False</SpecificVersion>
8685
<HintPath>..\..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>

src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/Commands.ServiceManagement.PlatformImageRepository.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,8 @@
111111
<SpecificVersion>False</SpecificVersion>
112112
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
113113
</Reference>
114-
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
115-
<SpecificVersion>False</SpecificVersion>
116-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
114+
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
115+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
117116
</Reference>
118117
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
119118
<SpecificVersion>False</SpecificVersion>

src/ServiceManagement/Compute/Commands.ServiceManagement.PlatformImageRepository/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1717
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
1818
<package id="Microsoft.WindowsAzure.Management" version="4.0.1" targetFramework="net45" />
19-
<package id="Microsoft.WindowsAzure.Management.Compute" version="8.0.0" targetFramework="net45" />
19+
<package id="Microsoft.WindowsAzure.Management.Compute" version="9.0.0" targetFramework="net45" />
2020
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.0.0" targetFramework="net45" />
2121
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
2222
<package id="System.Spatial" version="5.6.0" targetFramework="net45" />

src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,8 @@
111111
<SpecificVersion>False</SpecificVersion>
112112
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
113113
</Reference>
114-
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
115-
<SpecificVersion>False</SpecificVersion>
116-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
114+
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
115+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
117116
</Reference>
118117
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
119118
<SpecificVersion>False</SpecificVersion>

src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
1717
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
1818
<package id="Microsoft.WindowsAzure.Management" version="4.0.1" targetFramework="net45" />
19-
<package id="Microsoft.WindowsAzure.Management.Compute" version="8.0.0" targetFramework="net45" />
19+
<package id="Microsoft.WindowsAzure.Management.Compute" version="9.0.0" targetFramework="net45" />
2020
<package id="Microsoft.WindowsAzure.Management.Network" version="6.0.0" targetFramework="net45" />
2121
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.0.0" targetFramework="net45" />
2222
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />

src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@
5959
<Reference Include="Microsoft.Azure.Common">
6060
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.0.1\lib\net45\Microsoft.Azure.Common.dll</HintPath>
6161
</Reference>
62-
<Reference Include="Microsoft.Azure.Common.Extensions, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
63-
<SpecificVersion>False</SpecificVersion>
62+
<Reference Include="Microsoft.Azure.Common.Extensions">
6463
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Extensions.0.14.0-preview\lib\net45\Microsoft.Azure.Common.Extensions.dll</HintPath>
6564
</Reference>
6665
<Reference Include="Microsoft.Azure.Common.NetFramework">
@@ -106,7 +105,7 @@
106105
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.4.0.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
107106
</Reference>
108107
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
109-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
108+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
110109
</Reference>
111110
<Reference Include="Microsoft.WindowsAzure.Management.Network">
112111
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.6.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
@@ -176,6 +175,7 @@
176175
<Compile Include="FunctionalTests\AzureServiceExtensionTests.cs" />
177176
<Compile Include="FunctionalTests\AzureVhdTest.cs" />
178177
<Compile Include="FunctionalTests\BVTTest.cs" />
178+
<Compile Include="FunctionalTests\CleanUp.cs" />
179179
<Compile Include="FunctionalTests\ConfigDataInfo\ACLAction.cs" />
180180
<Compile Include="FunctionalTests\ConfigDataInfo\HostCaching.cs" />
181181
<Compile Include="FunctionalTests\ConfigDataInfo\InstanceSize.cs" />
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Microsoft.VisualStudio.TestTools.UnitTesting;
16+
17+
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Test.FunctionalTests
18+
{
19+
[TestClass]
20+
public class ServiceManagementCleanUp : ServiceManagementTest
21+
{
22+
23+
/// <summary>
24+
/// Clean up any resouces left from tests
25+
/// </summary>
26+
[TestMethod(), TestCategory(Category.CleanUp), Priority(1), Owner("hylee"), Description("Clean up any resouces left from tests")]
27+
public void CleanUp()
28+
{
29+
vmPowershellCmdlets = new ServiceManagementCmdletTestHelper();
30+
try
31+
{
32+
vmPowershellCmdlets.RunPSScript("Get-AzureService | Remove-AzureService -Force");
33+
}
34+
catch
35+
{
36+
}
37+
38+
try
39+
{
40+
vmPowershellCmdlets.RunPSScript("Get-AzureDisk | Remove-AzureDisk");
41+
}
42+
catch
43+
{
44+
}
45+
46+
try
47+
{
48+
vmPowershellCmdlets.RunPSScript(@"Get-AzureVMImage | where {$_.Category -eq 'User'} | Remove-AzureVMImage");
49+
}
50+
catch
51+
{
52+
}
53+
54+
try
55+
{
56+
vmPowershellCmdlets.RunPSScript("Remove-AzureVNetConfig");
57+
}
58+
catch
59+
{
60+
}
61+
62+
try
63+
{
64+
vmPowershellCmdlets.RunPSScript("Get-AzureAffinityGroup | Remove-AzureAffinityGroup");
65+
}
66+
catch
67+
{
68+
}
69+
70+
try
71+
{
72+
vmPowershellCmdlets.RunPSScript("Get-AzureReservedIP | Remove-AzureReservedIP -Force");
73+
}
74+
catch
75+
{
76+
}
77+
}
78+
}
79+
}

src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/Constants.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class Category
2323
public const string Sequential = "Sequential";
2424
public const string Network = "Network";
2525
public const string Upload = "AzureRTUpload";
26+
public const string CleanUp = "AzureRTCleanUp";
2627
}
2728

2829
public class LoadBalancerDistribution

src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/CredentialHelper.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public static string DefaultStorageName
239239
}
240240
}
241241

242-
public static void CopyTestData(string srcContainer, string srcBlob, string destContainer, string destBlob)
242+
public static void CopyTestData(string srcContainer, string srcBlob, string destContainer, string destBlob = null)
243243
{
244244
ServiceManagementCmdletTestHelper vmPowershellCmdlets = new ServiceManagementCmdletTestHelper();
245245
Process currentProcess = Process.GetCurrentProcess();
@@ -262,7 +262,15 @@ public static void CopyTestData(string srcContainer, string srcBlob, string dest
262262
// Make SAS Uri for the source blob.
263263
string srcSasUri = Utilities.GenerateSasUri(CredentialHelper.CredentialBlobUriFormat, storageAccount, storageAccountKey, srcContainer, srcBlob);
264264

265-
vmPowershellCmdlets.RunPSScript(string.Format("Start-AzureStorageBlobCopy -SrcUri \"{0}\" -DestContainer {1} -DestBlob {2} -Force", srcSasUri, destContainer, destBlob));
265+
if (string.IsNullOrEmpty(destBlob))
266+
{
267+
vmPowershellCmdlets.RunPSScript(string.Format("Start-AzureStorageBlobCopy -SrcContainer {0} -SrcBlob {1} -DestContainer {2} -Force", srcContainer, srcBlob, destContainer));
268+
destBlob = srcBlob;
269+
}
270+
else
271+
{
272+
vmPowershellCmdlets.RunPSScript(string.Format("Start-AzureStorageBlobCopy -SrcUri \"{0}\" -DestContainer {1} -DestBlob {2} -Force", srcSasUri, destContainer, destBlob));
273+
}
266274

267275
for (int i = 0; i < 60; i++)
268276
{

0 commit comments

Comments
 (0)