Skip to content

Commit 6d78a52

Browse files
authored
Merge pull request #5087 from devigned/feature/aks
AzureRmKubernetes cmdlets for managed Kubernetes
2 parents 521c689 + 7cd89fb commit 6d78a52

File tree

109 files changed

+709216
-47
lines changed

Some content is hidden

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

109 files changed

+709216
-47
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,5 @@ groupMapping*.json
217217
/tools/AutomationTestFramework/TestHelpers/TestHelpers.zip
218218
Results
219219
Package
220+
.DS_Store
221+
.idea

Azure.PowerShell.Netcore.sln

Lines changed: 221 additions & 5 deletions
Large diffs are not rendered by default.

src/Common/Commands.Common.Authentication.Abstractions/Common.Authentication.Abstractions.Netcore.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<PropertyGroup>
66
<TargetFramework>netcoreapp2.0</TargetFramework>
77
<AssemblyName>Microsoft.Azure.Commands.Common.Authentication.Abstractions</AssemblyName>
8-
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
98
<RootNamespace>Microsoft.Azure.Commands.Common.Authentication.Abstractions</RootNamespace>
109
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1110
</PropertyGroup>
@@ -22,7 +21,7 @@
2221
<DelaySign>false</DelaySign>
2322
</PropertyGroup>
2423

25-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
24+
<ItemGroup>
2625
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication" Version="2.2.12" />
2726
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
2827
<PackageReference Include="System.Reflection" Version="4.3.0" />

src/Common/Commands.Common.Authentication/Common.Authentication.Netcore.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<PropertyGroup>
66
<TargetFramework>netcoreapp2.0</TargetFramework>
77
<AssemblyName>Microsoft.Azure.Commands.Common.Authentication</AssemblyName>
8-
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
98
<RootNamespace>Microsoft.Azure.Commands.Common.Authentication</RootNamespace>
109
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1110
</PropertyGroup>
@@ -22,7 +21,7 @@
2221
<DelaySign>false</DelaySign>
2322
</PropertyGroup>
2423

25-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
24+
<ItemGroup>
2625
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
2726
<PackageReference Include="System.Reflection" Version="4.3.0" />
2827
<PackageReference Include="System.Security.SecureString" Version="4.3.0" />

src/Common/Commands.Common.Authorization/Common.Authorization.Netcore.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<PropertyGroup>
66
<TargetFramework>netcoreapp2.0</TargetFramework>
77
<AssemblyName>Microsoft.Azure.Commands.Common.Authorization</AssemblyName>
8-
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
98
<RootNamespace>Microsoft.Azure.Commands.Common.Authorization</RootNamespace>
109
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1110
</PropertyGroup>
@@ -22,7 +21,7 @@
2221
<DelaySign>false</DelaySign>
2322
</PropertyGroup>
2423

25-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
24+
<ItemGroup>
2625
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
2726
<PackageReference Include="System.Reflection" Version="4.3.0" />
2827
<PackageReference Include="System.Security.SecureString" Version="4.3.0" />

src/Common/Commands.Common.Graph.RBAC/Common.Rbac.Netcore.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<PropertyGroup>
66
<TargetFramework>netcoreapp2.0</TargetFramework>
77
<AssemblyName>Microsoft.Azure.Commands.Common.Graph.RBAC</AssemblyName>
8-
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
98
<RootNamespace>Microsoft.Azure.Commands.Common.Graph.RBAC</RootNamespace>
109
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1110
</PropertyGroup>
@@ -22,7 +21,7 @@
2221
<DelaySign>false</DelaySign>
2322
</PropertyGroup>
2423

25-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
24+
<ItemGroup >
2625
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
2726
<PackageReference Include="System.Reflection" Version="4.3.0" />
2827
<PackageReference Include="System.Security.SecureString" Version="4.3.0" />

src/Common/Commands.Common.Network/Common.Network.Netcore.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<PropertyGroup>
66
<TargetFramework>netcoreapp2.0</TargetFramework>
77
<AssemblyName>Microsoft.Azure.Commands.Common.Network</AssemblyName>
8-
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
98
<RootNamespace>Microsoft.Azure.Commands.Common.Network</RootNamespace>
109
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1110
</PropertyGroup>
@@ -22,7 +21,7 @@
2221
<DelaySign>false</DelaySign>
2322
</PropertyGroup>
2423

25-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
24+
<ItemGroup >
2625
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
2726
<PackageReference Include="System.Reflection" Version="4.3.0" />
2827
<PackageReference Include="System.Security.SecureString" Version="4.3.0" />

src/Common/Commands.Common.Storage/Common.Storage.Netcore.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<PropertyGroup>
66
<TargetFramework>netcoreapp2.0</TargetFramework>
77
<AssemblyName>Microsoft.WindowsAzure.Commands.Common.Storage</AssemblyName>
8-
<RuntimeIdentifiers>win10-x64</RuntimeIdentifiers>
98
<RootNamespace>Microsoft.WindowsAzure.Commands.Common.Storage</RootNamespace>
109
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
1110
</PropertyGroup>
@@ -22,7 +21,7 @@
2221
<DelaySign>false</DelaySign>
2322
</PropertyGroup>
2423

25-
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.0' ">
24+
<ItemGroup>
2625
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure.Authentication" Version="2.2.12" />
2726
<PackageReference Include="Microsoft.Azure.Management.Storage" Version="6.5.0-preview" />
2827
<PackageReference Include="WindowsAzure.Storage" Version="8.1.1" />
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp2.0</TargetFramework>
5+
6+
<IsPackable>false</IsPackable>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
11+
<PackageReference Include="xunit" Version="2.3.1" />
12+
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
13+
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
14+
</ItemGroup>
15+
16+
<ItemGroup>
17+
<ProjectReference Include="..\..\ResourceManager\Common\Commands.ScenarioTests.ResourceManager.Common\Common.ResourceManager.ScenarioTests.Netcore.csproj" />
18+
<ProjectReference Include="..\Commands.Common\Common.Netcore.csproj" />
19+
</ItemGroup>
20+
21+
</Project>
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
2+
using Microsoft.WindowsAzure.Commands.Utilities.Common;
3+
using System;
4+
using System.Linq;
5+
using System.Runtime.InteropServices;
6+
using Xunit;
7+
8+
namespace Commands.Common.Tests
9+
{
10+
public class ProbeTests
11+
{
12+
private readonly string _pwsh;
13+
14+
public ProbeTests()
15+
{
16+
_pwsh = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "powershell" : "pwsh";
17+
}
18+
19+
[Fact]
20+
[Trait(Category.AcceptanceType, Category.CheckIn)]
21+
public void FalseWhenProgramDoesNotExistTest()
22+
{
23+
Assert.False(GeneralUtilities.Probe("foo"));
24+
}
25+
26+
[Fact]
27+
[Trait(Category.AcceptanceType, Category.CheckIn)]
28+
public void TrueWhenProgramDoesExistTest()
29+
{
30+
Assert.True(GeneralUtilities.Probe(_pwsh, " -c 'echo hello world!'"));
31+
}
32+
33+
[Fact]
34+
[Trait(Category.AcceptanceType, Category.CheckIn)]
35+
public void FailIfStdOutDoesNotMatchTest()
36+
{
37+
Assert.False(
38+
GeneralUtilities.Probe(
39+
_pwsh, " -c 'echo foo'",
40+
criterion: (processExitInfo) =>
41+
{
42+
return processExitInfo.StdOut.Any(x => x.Contains("bar"));
43+
}));
44+
}
45+
46+
[Fact]
47+
[Trait(Category.AcceptanceType, Category.CheckIn)]
48+
public void TrueIfStdOutDoesMatchTest()
49+
{
50+
Assert.True(
51+
GeneralUtilities.Probe(
52+
_pwsh, " -c 'echo foo'",
53+
criterion: (processExitInfo) =>
54+
{
55+
return processExitInfo.StdOut.Any(x => x.Contains("foo"));
56+
}));
57+
}
58+
59+
[Fact]
60+
[Trait(Category.AcceptanceType, Category.CheckIn)]
61+
public void FailIfProcessTakesTooLongToRespondTest()
62+
{
63+
Assert.False(GeneralUtilities.Probe(_pwsh, "-c \"sleep 4\""));
64+
}
65+
}
66+
}

0 commit comments

Comments
 (0)