Skip to content

Commit 28715bd

Browse files
committed
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
2 parents 64f6321 + df9a0ce commit 28715bd

File tree

131 files changed

+27870
-3936
lines changed

Some content is hidden

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

131 files changed

+27870
-3936
lines changed

AzurePowershell.Test.targets

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,35 @@
3232
<AzureRTSeqAllFilter>"AzureRTUpload|Sequential|Network"</AzureRTSeqAllFilter>
3333
</PropertyGroup>
3434

35+
<ItemGroup>
36+
<XUnitTests Include=".\src\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll"/>
37+
<XUnitTests Include=".\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll"/>
38+
<XUnitTests Include=".\src\ServiceManagement\Services\Commands.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Test.dll"/>
39+
<XUnitTests Include=".\src\ResourceManager\Resources\Commands.Resources.Test\bin\Debug\Microsoft.Azure.Commands.Resources.Test.dll"/>
40+
<XUnitTests Include=".\src\ResourceManager\DataFactories\Commands.DataFactories.Test\bin\Debug\Microsoft.Azure.Commands.DataFactories.Test.dll"/>
41+
<XUnitTests Include=".\src\ResourceManager\StreamAnalytics\Commands.StreamAnalytics.Test\bin\Debug\Microsoft.Azure.Commands.StreamAnalytics.Test.dll"/>
42+
<XUnitTests Include=".\src\ResourceManager\Batch\Commands.Batch.Test\bin\Debug\Microsoft.Azure.Commands.Batch.Test.dll"/>
43+
<XUnitTests Include=".\src\ResourceManager\KeyVault\Commands.KeyVault.Test\bin\Debug\Microsoft.Azure.Commands.KeyVault.Test.dll"/>
44+
<XUnitTests Include=".\src\ServiceManagement\ManagedCache\Commands.ManagedCache.Test\bin\Debug\Microsoft.Azure.Commands.ManagedCache.Test.dll"/>
45+
<XUnitTests Include=".\src\Common\Commands.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Commands.ScenarioTest.dll"/>
46+
<XUnitTests Include=".\src\ServiceManagement\RecoveryServices\Commands.RecoveryServices.Test\bin\Debug\Microsoft.Azure.Commands.RecoveryServices.Test.dll"/>
47+
<XUnitTests Include=".\src\ServiceManagement\StorSimple\Commands.StorSimple.Test\bin\Debug\Microsoft.WindowsAzure.Commands.StorSimple.Test.dll"/>
48+
</ItemGroup>
49+
3550
<Target Name="InvokeMSTest">
3651
<!--Remove existing test result; otherwsie mstest will error-->
3752
<Delete Files="$(_testResult)"/>
3853
<Exec
3954
Command="MSTest.exe /testcontainer:$(_testAssembly) /testsettings:$(_testSettings) /category:$(_testFilter) /resultsfile:$(_testResult)"
4055
ContinueOnError="false" />
4156
</Target>
57+
58+
<Target Name="InvokeXUnit">
59+
<Message Importance="high" Text="Running XUnit tests" />
60+
<MakeDir Directories="$(TestOutputDirectory)" ContinueOnError="false" />
61+
<Xunit.Runner.MSBuild.xunit Assemblies="@(XUnitTests)" Html="$(TestOutputDirectory)\xunit.tests.dll.html" Verbose="true"
62+
ExcludeTraits="$(XUnitExcludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false"/>
63+
</Target>
4264

4365
<Target Name="BeforeRunTests">
4466
<Message Importance="high" Text="You are required to have installed a version of Visual Studio with support for MSTest (and MSTest on your path)." />

build.proj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<TestOutputDirectory>$(PublishDirectory)\TestResults</TestOutputDirectory>
1818
<DebugBuildConfig>Configuration=Debug;Platform=Any CPU</DebugBuildConfig>
1919
<ReleaseBuildConfig>Configuration=Release;Platform=Any CPU</ReleaseBuildConfig>
20+
<BuildInParallel Condition="'$(BuildInParallel)' == ''">true</BuildInParallel>
2021
</PropertyGroup>
2122
<ItemGroup>
2223
<AzurePowerShellSln Include=".\src\AzurePowerShell.sln" />
@@ -104,11 +105,13 @@
104105
Projects="@(AzurePowerShellSln)"
105106
Targets="Build"
106107
Properties="$(DebugBuildConfig)"
108+
BuildInParallel="$(BuildInParallel)"
107109
ContinueOnError="false" />
108110
<MSBuild
109111
Projects="@(AzurePowerShellSln)"
110112
Targets="Build"
111113
Properties="$(ReleaseBuildConfig)"
114+
BuildInParallel="$(BuildInParallel)"
112115
ContinueOnError="false" />
113116
</Target>
114117

@@ -160,6 +163,7 @@
160163
Projects="@(AzurePowerShellSln)"
161164
Targets="Build"
162165
Properties="$(ReleaseBuildConfig)"
166+
BuildInParallel="$(BuildInParallel)"
163167
ContinueOnError="false" />
164168
</Target>
165169

@@ -170,6 +174,7 @@
170174
Projects="@(AzurePowerShellSln)"
171175
Targets="Build"
172176
Properties="$(DebugBuildConfig)"
177+
BuildInParallel="$(BuildInParallel)"
173178
ContinueOnError="false" />
174179
</Target>
175180

@@ -183,7 +188,7 @@
183188
<!-- Run checkin tests for each pull request -->
184189
<Target Name="Test" DependsOnTargets="BuildDebug;BeforeRunTests">
185190
<Message Importance="high" Text="Running check in tests..." />
186-
<CallTarget Targets="KeyVaultTests; SqlTests; CommonTests; TestManagement; TestHDInsight; TestManagedCache; TestServiceManagement; TestServiceManagementExtensions; TestSqlDatabase; TestStorage; TestResourceManager; MockedScenarioTests; TestDSCExtension_x64; TestBatch; TestDataFactoryManager; TestRecoveryServices; TestStreamAnalyticsManager; TestStorSimple"/>
191+
<CallTarget Targets="InvokeXUnit; TestHDInsight; TestServiceManagement; TestServiceManagementExtensions; TestSqlDatabase; TestStorage; TestDSCExtension_x64"/>
187192
</Target>
188193

189194
<!-- Run Full switch with scenario tests -->

setup/azurecmdfiles.wxi

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,15 +1527,24 @@
15271527
<Component Id="cmp8CDB44BA783FF24C94CDFC5D12066BB1" Guid="*">
15281528
<File Id="fil2C73256F76E79B695523A2B3C4C845E9" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RecoveryServices\Microsoft.WindowsAzure.Commands.Common.dll" />
15291529
</Component>
1530-
<Component Id="cmpD7A9F76B2346156CA8F83F41A302B714" Guid="*">
1531-
<File Id="fil0218D7505353104A9DB742A55A839351" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RecoveryServices\Microsoft.WindowsAzure.Management.dll" />
1530+
<Component Id="cmpA0A697DEB7822A0EC30F3D359EE930A6" Guid="*">
1531+
<File Id="fil528A48BB87B57E0D131C279CAD156D2B" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RecoveryServices\Microsoft.WindowsAzure.Common.dll" />
1532+
</Component>
1533+
<Component Id="cmpBE209ED6509A7E857FD9F9078051DC6A" Guid="*">
1534+
<File Id="fil96FD7FA0CBEE96E0C0239408CD5651A9" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RecoveryServices\Microsoft.WindowsAzure.Common.NetFramework.dll" />
15321535
</Component>
15331536
<Component Id="cmp4D3E383B38EF4392E70E981B7CA033D7" Guid="*">
15341537
<File Id="fil3D6B846AC421D38C5A9CB40A58B058B6" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RecoveryServices\Microsoft.WindowsAzure.Management.SiteRecovery.dll" />
15351538
</Component>
1539+
<Component Id="cmp50D44814DFFEA762A53D9DEDCE48F689" Guid="*">
1540+
<File Id="fil80C14207B99E14F4567B92038EDC8715" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RecoveryServices\Microsoft.WindowsAzure.Management.Storage.dll" />
1541+
</Component>
15361542
<Component Id="cmp439E7C155DEEFC3877653E4ED11F66AC" Guid="*">
15371543
<File Id="filE3D7ECC5C92739687FAA34CCE9DFB4A3" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RecoveryServices\Newtonsoft.Json.dll" />
15381544
</Component>
1545+
<Component Id="cmp9B4CB06D327ECA8FA60032F98004D8BA" Guid="*">
1546+
<File Id="filC935CDA00FB3E840369825B599C84E28" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RecoveryServices\Security.Cryptography.dll" />
1547+
</Component>
15391548
<Component Id="cmp5278A11908DC26651A78E55522C71DF3" Guid="*">
15401549
<File Id="fil3C9995984C13EAB542D813B85C917916" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RecoveryServices\System.Net.Http.Extensions.dll" />
15411550
</Component>
@@ -1545,6 +1554,11 @@
15451554
<Component Id="cmp2A0B3E88742D800F88F70A714BAC94B5" Guid="*">
15461555
<File Id="fil8B5C2678B7FAC0061799DCBFF4AFE27E" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RecoveryServices\System.Net.Http.Primitives.dll" />
15471556
</Component>
1557+
<Directory Id="dirB2E733E5A07F5CBD9FFA437A83782545" Name="lib">
1558+
<Component Id="cmpE3495C0DD75A31199E40EAA7E5128E6C" Guid="*">
1559+
<File Id="fil269C9C56525316A4AB13CC9240BF5FE6" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\RecoveryServices\lib\Security.Cryptography.dll" />
1560+
</Component>
1561+
</Directory>
15481562
</Directory>
15491563
<Directory Id="dir5A14F7172D6373ACE47493BAD054EEF3" Name="Services">
15501564
<Component Id="cmp5F55270F607737A772BFBE2D8F6B76E4" Guid="*">
@@ -2953,12 +2967,16 @@
29532967
<ComponentRef Id="cmpFFEE4D9645AEA846AF41897FD2135E02" />
29542968
<ComponentRef Id="cmp2F6E4C6B8006898EFE87C88921C1B6BA" />
29552969
<ComponentRef Id="cmp8CDB44BA783FF24C94CDFC5D12066BB1" />
2956-
<ComponentRef Id="cmpD7A9F76B2346156CA8F83F41A302B714" />
2970+
<ComponentRef Id="cmpA0A697DEB7822A0EC30F3D359EE930A6" />
2971+
<ComponentRef Id="cmpBE209ED6509A7E857FD9F9078051DC6A" />
29572972
<ComponentRef Id="cmp4D3E383B38EF4392E70E981B7CA033D7" />
2973+
<ComponentRef Id="cmp50D44814DFFEA762A53D9DEDCE48F689" />
29582974
<ComponentRef Id="cmp439E7C155DEEFC3877653E4ED11F66AC" />
2975+
<ComponentRef Id="cmp9B4CB06D327ECA8FA60032F98004D8BA" />
29592976
<ComponentRef Id="cmp5278A11908DC26651A78E55522C71DF3" />
29602977
<ComponentRef Id="cmp4ED39EDE761ED68263635882802FB1B5" />
29612978
<ComponentRef Id="cmp2A0B3E88742D800F88F70A714BAC94B5" />
2979+
<ComponentRef Id="cmpE3495C0DD75A31199E40EAA7E5128E6C" />
29622980
<ComponentRef Id="cmp5F55270F607737A772BFBE2D8F6B76E4" />
29632981
<ComponentRef Id="cmp9EF03D7C53CEE400751AD1905625B82B" />
29642982
<ComponentRef Id="cmpC4F524A9EBF63DAC78B9678CF113D652" />

src/AzurePowershell.sln

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 2013
3-
VisualStudioVersion = 12.0.30723.0
3+
VisualStudioVersion = 12.0.31101.0
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8531411A-0137-4E27-9C5E-49E07C245048}"
66
ProjectSection(SolutionItems) = preProject
@@ -16,9 +16,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands", "ServiceManageme
1616
EndProjectSection
1717
EndProject
1818
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Test", "ServiceManagement\Services\Commands.Test\Commands.Test.csproj", "{B7FD03F6-98BC-4F54-9A14-0455E579FCD4}"
19-
ProjectSection(ProjectDependencies) = postProject
20-
{C1BDA476-A5CC-4394-914D-48B0EC31A710} = {C1BDA476-A5CC-4394-914D-48B0EC31A710}
21-
EndProjectSection
2219
EndProject
2320
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.SqlDatabase", "ServiceManagement\Sql\Commands.SqlDatabase\Commands.SqlDatabase.csproj", "{DDF5D225-C9C5-42B7-BDB5-2C3646E479AA}"
2421
EndProject
@@ -166,12 +163,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Insights", "Resour
166163
EndProject
167164
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Insights.Test", "ResourceManager\Insights\Commands.Insights.Test\Commands.Insights.Test.csproj", "{469F20E0-9D40-41AD-94C3-B47AD15A4C00}"
168165
EndProject
169-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RemoteApp.Test", "ServiceManagement\RemoteApp\Commands.RemoteApp.Tests\Commands.RemoteApp.Test.csproj", "{CA82D500-1940-4068-A076-D7A8AD459FB0}"
170-
ProjectSection(ProjectDependencies) = postProject
171-
{A3965B66-5A3E-4B8C-9574-28E5958D4828} = {A3965B66-5A3E-4B8C-9574-28E5958D4828}
172-
EndProjectSection
173-
EndProject
174-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.RemoteApp", "ServiceManagement\RemoteApp\Commands.RemoteApp\Commands.RemoteApp.csproj", "{492D2AF2-950B-4F2E-8079-8794305313FD}"
166+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Websites", "ResourceManager\Websites\Commands.Websites\Commands.Websites.csproj", "{80A92297-7C92-456B-8EE7-9FB6CE30149D}"
175167
EndProject
176168
Global
177169
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -407,14 +399,10 @@ Global
407399
{469F20E0-9D40-41AD-94C3-B47AD15A4C00}.Debug|Any CPU.Build.0 = Debug|Any CPU
408400
{469F20E0-9D40-41AD-94C3-B47AD15A4C00}.Release|Any CPU.ActiveCfg = Release|Any CPU
409401
{469F20E0-9D40-41AD-94C3-B47AD15A4C00}.Release|Any CPU.Build.0 = Release|Any CPU
410-
{CA82D500-1940-4068-A076-D7A8AD459FB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
411-
{CA82D500-1940-4068-A076-D7A8AD459FB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
412-
{CA82D500-1940-4068-A076-D7A8AD459FB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
413-
{CA82D500-1940-4068-A076-D7A8AD459FB0}.Release|Any CPU.Build.0 = Release|Any CPU
414-
{492D2AF2-950B-4F2E-8079-8794305313FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
415-
{492D2AF2-950B-4F2E-8079-8794305313FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
416-
{492D2AF2-950B-4F2E-8079-8794305313FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
417-
{492D2AF2-950B-4F2E-8079-8794305313FD}.Release|Any CPU.Build.0 = Release|Any CPU
402+
{80A92297-7C92-456B-8EE7-9FB6CE30149D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
403+
{80A92297-7C92-456B-8EE7-9FB6CE30149D}.Debug|Any CPU.Build.0 = Debug|Any CPU
404+
{80A92297-7C92-456B-8EE7-9FB6CE30149D}.Release|Any CPU.ActiveCfg = Release|Any CPU
405+
{80A92297-7C92-456B-8EE7-9FB6CE30149D}.Release|Any CPU.Build.0 = Release|Any CPU
418406
EndGlobalSection
419407
GlobalSection(SolutionProperties) = preSolution
420408
HideSolutionNode = FALSE
@@ -448,6 +436,5 @@ Global
448436
{0FA676D5-1349-4086-B33F-65EC2CB7DA41} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
449437
{7E6683BE-ECFF-4709-89EB-1325E9E70512} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
450438
{469F20E0-9D40-41AD-94C3-B47AD15A4C00} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
451-
{CA82D500-1940-4068-A076-D7A8AD459FB0} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
452439
EndGlobalSection
453440
EndGlobal

src/Common/Commands.Common/Properties/Resources.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/Insights/Commands.Insights.Test/Commands.Insights.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
5959
</Reference>
6060
<Reference Include="Microsoft.Azure.Insights">
61-
<HintPath>..\..\..\packages\Microsoft.Azure.Insights.0.7.0-preview\lib\net45\Microsoft.Azure.Insights.dll</HintPath>
61+
<HintPath>..\..\..\packages\Microsoft.Azure.Insights.0.7.1-preview\lib\net45\Microsoft.Azure.Insights.dll</HintPath>
6262
</Reference>
6363
<Reference Include="Microsoft.Azure.Test.Framework, Version=1.0.5513.27084, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6464
<SpecificVersion>False</SpecificVersion>

src/ResourceManager/Insights/Commands.Insights.Test/Events/Utilities.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,15 @@ public static void ExecuteVerifications(EventCmdletBase cmdlet, Mock<IEventOpera
214214
Assert.True(string.Equals(PSEventDataNoDetails.SelectedFieldsForQuery, selected, StringComparison.OrdinalIgnoreCase), "Incorrect selected clause without optional parameters");
215215

216216
// Calling with only start date
217-
cmdlet.StartTime = startDate.ToString("O");
217+
cmdlet.StartTime = startDate;
218218
cmdlet.ExecuteCmdlet();
219219

220220
VerifyFilterIsUsable(filter: filter);
221221
VerifyStartDateInFilter(filter: filter, startDate: startDate);
222222
VerifyConditionInFilter(filter: filter, field: requiredFieldName, value: requiredFieldValue);
223223

224224
// Calling with only start and end date
225-
cmdlet.EndTime = startDate.AddSeconds(2).ToString("O");
225+
cmdlet.EndTime = startDate.AddSeconds(2);
226226
cmdlet.ExecuteCmdlet();
227227

228228
VerifyFilterIsUsable(filter: filter);
@@ -245,6 +245,18 @@ public static void ExecuteVerifications(EventCmdletBase cmdlet, Mock<IEventOpera
245245

246246
VerifyDetailedOutput(cmdlet: cmdlet, selected: ref selected);
247247
VerifyContinuationToken(response: response, insinsightsEventOperationsMockightsClientMock: insinsightsEventOperationsMockightsClientMock, cmdlet: cmdlet);
248+
249+
// Execute negative tests
250+
cmdlet.StartTime = DateTime.Now.AddSeconds(1);
251+
Assert.Throws<ArgumentException>(() => cmdlet.ExecuteCmdlet());
252+
253+
cmdlet.StartTime = DateTime.Now.Subtract(TimeSpan.FromSeconds(20));
254+
cmdlet.EndTime = DateTime.Now.Subtract(TimeSpan.FromSeconds(21));
255+
Assert.Throws<ArgumentException>(() => cmdlet.ExecuteCmdlet());
256+
257+
cmdlet.StartTime = DateTime.Now.Subtract(TimeSpan.FromDays(30));
258+
cmdlet.EndTime = DateTime.Now.Subtract(TimeSpan.FromDays(14));
259+
Assert.Throws<ArgumentException>(() => cmdlet.ExecuteCmdlet());
248260
}
249261
}
250262
}

src/ResourceManager/Insights/Commands.Insights/Commands.Insights.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
5959
</Reference>
6060
<Reference Include="Microsoft.Azure.Insights">
61-
<HintPath>..\..\..\packages\Microsoft.Azure.Insights.0.7.0-preview\lib\net45\Microsoft.Azure.Insights.dll</HintPath>
61+
<HintPath>..\..\..\packages\Microsoft.Azure.Insights.0.7.1-preview\lib\net45\Microsoft.Azure.Insights.dll</HintPath>
6262
</Reference>
6363
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.12.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6464
<SpecificVersion>False</SpecificVersion>

0 commit comments

Comments
 (0)