Skip to content

Commit 4c278a2

Browse files
committed
Made changes necessary to build and run Resources tests on netcore. Some tests are skipped due to certain issues, primarily test parallelization.
1 parent 3a51fe7 commit 4c278a2

File tree

9 files changed

+197
-210
lines changed

9 files changed

+197
-210
lines changed

src/Azure.PowerShell.Netcore.Test.sln

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Insights.Test.Netc
4141
EndProject
4242
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Batch.Test.Netcore", "ResourceManager\AzureBatch\Commands.Batch.Test\Commands.Batch.Test.Netcore.csproj", "{154A5A95-6977-4DC5-BB65-EC669069DC07}"
4343
EndProject
44+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Resources.Test.Netcore", "ResourceManager\Resources\Commands.Resources.Test\Commands.Resources.Test.Netcore.csproj", "{4730676B-E63C-441A-9BB9-1FB0FD0BBC24}"
45+
EndProject
4446
Global
4547
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4648
Debug|Any CPU = Debug|Any CPU
@@ -279,6 +281,18 @@ Global
279281
{154A5A95-6977-4DC5-BB65-EC669069DC07}.Release|x64.Build.0 = Release|Any CPU
280282
{154A5A95-6977-4DC5-BB65-EC669069DC07}.Release|x86.ActiveCfg = Release|Any CPU
281283
{154A5A95-6977-4DC5-BB65-EC669069DC07}.Release|x86.Build.0 = Release|Any CPU
284+
{4730676B-E63C-441A-9BB9-1FB0FD0BBC24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
285+
{4730676B-E63C-441A-9BB9-1FB0FD0BBC24}.Debug|Any CPU.Build.0 = Debug|Any CPU
286+
{4730676B-E63C-441A-9BB9-1FB0FD0BBC24}.Debug|x64.ActiveCfg = Debug|Any CPU
287+
{4730676B-E63C-441A-9BB9-1FB0FD0BBC24}.Debug|x64.Build.0 = Debug|Any CPU
288+
{4730676B-E63C-441A-9BB9-1FB0FD0BBC24}.Debug|x86.ActiveCfg = Debug|Any CPU
289+
{4730676B-E63C-441A-9BB9-1FB0FD0BBC24}.Debug|x86.Build.0 = Debug|Any CPU
290+
{4730676B-E63C-441A-9BB9-1FB0FD0BBC24}.Release|Any CPU.ActiveCfg = Release|Any CPU
291+
{4730676B-E63C-441A-9BB9-1FB0FD0BBC24}.Release|Any CPU.Build.0 = Release|Any CPU
292+
{4730676B-E63C-441A-9BB9-1FB0FD0BBC24}.Release|x64.ActiveCfg = Release|Any CPU
293+
{4730676B-E63C-441A-9BB9-1FB0FD0BBC24}.Release|x64.Build.0 = Release|Any CPU
294+
{4730676B-E63C-441A-9BB9-1FB0FD0BBC24}.Release|x86.ActiveCfg = Release|Any CPU
295+
{4730676B-E63C-441A-9BB9-1FB0FD0BBC24}.Release|x86.Build.0 = Release|Any CPU
282296
EndGlobalSection
283297
GlobalSection(SolutionProperties) = preSolution
284298
HideSolutionNode = FALSE

src/ResourceManager/Resources/Commands.Resources.Test/Commands.Resources.Test.Netcore.csproj

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
</PropertyGroup>
2323

2424
<ItemGroup>
25-
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
26-
<PackageReference Include="Microsoft.Azure.Insights" Version="0.10.0-preview" />
27-
<PackageReference Include="Microsoft.WindowsAzure.Configuration" Version="3.2.0" />
28-
<PackageReference Include="Moq" Version="4.2.1510.2205" />
25+
<PackageReference Include="Microsoft.Azure.Management.Authorization" Version="2.8.0-preview" />
2926
</ItemGroup>
3027

3128
<ItemGroup>
@@ -36,13 +33,28 @@
3633
<ProjectReference Include="..\..\Common\Commands.ScenarioTests.ResourceManager.Common\Common.ResourceManager.ScenarioTests.Netcore.csproj" />
3734
</ItemGroup>
3835

36+
<ItemGroup>
37+
<Reference Include="Microsoft.Azure.Commands.Resources">
38+
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\AzureRM.Resources.Netcore\Microsoft.Azure.Commands.Resources.dll</HintPath>
39+
</Reference>
40+
<Reference Include="Microsoft.Azure.Commands.ResourceManager.Cmdlets">
41+
<HintPath>..\..\..\Package\$(Configuration)\ResourceManager\AzureResourceManager\AzureRM.Resources.Netcore\Microsoft.Azure.Commands.ResourceManager.Cmdlets.dll</HintPath>
42+
</Reference>
43+
</ItemGroup>
44+
3945
<ItemGroup>
4046
<None Update="SessionRecords\**\*.json">
4147
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4248
</None>
4349
<None Update="ScenarioTests\*.ps1">
4450
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4551
</None>
52+
<None Update="Resources\*.json">
53+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
54+
</None>
55+
<None Update="*.json">
56+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
57+
</None>
4658
</ItemGroup>
4759

4860
</Project>

src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ExtensionsTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
#if !NETSTANDARD
1516
using Microsoft.Azure.Commands.Resources.Models;
1617
using Microsoft.Azure.Commands.Resources.Models.Gallery;
1718
using Microsoft.Azure.ServiceManagemenet.Common.Models;
@@ -74,3 +75,4 @@ public void ToPSGalleryItemCreatesANewItemWithNullDeploymentTemplates()
7475
}
7576
}
7677
}
78+
#endif

src/ResourceManager/Resources/Commands.Resources.Test/Models.ResourceGroups/ResourceClientTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,11 @@ private void SetupClass()
214214
};
215215
serializedProperties = JsonConvert.SerializeObject(properties, new JsonSerializerSettings
216216
{
217+
#if NETSTANDARD
218+
TypeNameAssemblyFormatHandling = TypeNameAssemblyFormatHandling.Simple,
219+
#else
217220
TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple,
221+
#endif
218222
TypeNameHandling = TypeNameHandling.None
219223
});
220224
templateFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Resources\sampleTemplateFile.json");

0 commit comments

Comments
 (0)