Skip to content

Commit 458bbec

Browse files
authored
Merge pull request #5732 from maddieclayton/Kub
Update Kubernetes module
2 parents 6b5fd47 + 65f54ce commit 458bbec

File tree

87 files changed

+8255
-698434
lines changed

Some content is hidden

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

87 files changed

+8255
-698434
lines changed

Azure.PowerShell.Netcore.sln

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Network.Netcore", "s
4545
EndProject
4646
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.KeyVault.Netcore", "src\ResourceManager\KeyVault\Commands.KeyVault\Commands.KeyVault.Netcore.csproj", "{814E7BBB-3D69-410A-81CF-374C29CC5C6B}"
4747
EndProject
48-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Kubernetes.Netcore", "src\ResourceManager\Kubernetes\Commands.Kubernetes\Commands.Kubernetes.Netcore.csproj", "{80657644-11E5-435B-A3DB-DFBB7115089F}"
49-
EndProject
50-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Kubernetes.Test.Netcore", "src\ResourceManager\Kubernetes\Commands.Kubernetes.Test\Commands.Kubernetes.Test.Netcore.csproj", "{E52DCBCD-CCEF-46E1-880B-CAE04A06804A}"
48+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Commands.Aks.Netcore", "src\ResourceManager\Aks\Commands.Aks\Commands.Aks.Netcore.csproj", "{80657644-11E5-435B-A3DB-DFBB7115089F}"
5149
EndProject
5250
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.Strategies.Netcore", "src\ResourceManager\Common\Commands.Common.Strategies\Common.Strategies.Netcore.csproj", "{77492655-0086-49E8-B941-7C3E9D5448E9}"
5351
EndProject
@@ -315,18 +313,6 @@ Global
315313
{80657644-11E5-435B-A3DB-DFBB7115089F}.Release|x64.Build.0 = Release|Any CPU
316314
{80657644-11E5-435B-A3DB-DFBB7115089F}.Release|x86.ActiveCfg = Release|Any CPU
317315
{80657644-11E5-435B-A3DB-DFBB7115089F}.Release|x86.Build.0 = Release|Any CPU
318-
{E52DCBCD-CCEF-46E1-880B-CAE04A06804A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
319-
{E52DCBCD-CCEF-46E1-880B-CAE04A06804A}.Debug|Any CPU.Build.0 = Debug|Any CPU
320-
{E52DCBCD-CCEF-46E1-880B-CAE04A06804A}.Debug|x64.ActiveCfg = Debug|Any CPU
321-
{E52DCBCD-CCEF-46E1-880B-CAE04A06804A}.Debug|x64.Build.0 = Debug|Any CPU
322-
{E52DCBCD-CCEF-46E1-880B-CAE04A06804A}.Debug|x86.ActiveCfg = Debug|Any CPU
323-
{E52DCBCD-CCEF-46E1-880B-CAE04A06804A}.Debug|x86.Build.0 = Debug|Any CPU
324-
{E52DCBCD-CCEF-46E1-880B-CAE04A06804A}.Release|Any CPU.ActiveCfg = Release|Any CPU
325-
{E52DCBCD-CCEF-46E1-880B-CAE04A06804A}.Release|Any CPU.Build.0 = Release|Any CPU
326-
{E52DCBCD-CCEF-46E1-880B-CAE04A06804A}.Release|x64.ActiveCfg = Release|Any CPU
327-
{E52DCBCD-CCEF-46E1-880B-CAE04A06804A}.Release|x64.Build.0 = Release|Any CPU
328-
{E52DCBCD-CCEF-46E1-880B-CAE04A06804A}.Release|x86.ActiveCfg = Release|Any CPU
329-
{E52DCBCD-CCEF-46E1-880B-CAE04A06804A}.Release|x86.Build.0 = Release|Any CPU
330316
{77492655-0086-49E8-B941-7C3E9D5448E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
331317
{77492655-0086-49E8-B941-7C3E9D5448E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
332318
{77492655-0086-49E8-B941-7C3E9D5448E9}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -358,7 +344,6 @@ Global
358344
GlobalSection(NestedProjects) = preSolution
359345
{87246108-B555-4F5F-B916-A9C6FABB1971} = {4B187BE1-F8C4-4658-AD17-98AA087482AA}
360346
{624FE5CE-0F46-4A0A-9A1B-54D5724B7F96} = {4B187BE1-F8C4-4658-AD17-98AA087482AA}
361-
{E52DCBCD-CCEF-46E1-880B-CAE04A06804A} = {4B187BE1-F8C4-4658-AD17-98AA087482AA}
362347
{B0EF35E9-2D7A-4AAE-8A1A-728B6CC8524B} = {4B187BE1-F8C4-4658-AD17-98AA087482AA}
363348
EndGlobalSection
364349
GlobalSection(ExtensibilityGlobals) = postSolution

TestMappings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"src/Common/Commands.Common.Authentication.Test/": [
1212
".\\src\\Common\\Commands.Common.Authentication.Test\\bin\\Debug\\Microsoft.Azure.Commands.Common.Authentication.Test.dll"
1313
],
14+
"src/ResourceManager/Aks/": [
15+
".\\src\\ResourceManager\\Aks\\Commands.Aks.Test\\bin\\Debug\\Microsoft.Azure.Commands.Aks.Test.dll"
16+
],
1417
"src/ResourceManager/AnalysisServices/": [
1518
".\\src\\ResourceManager\\AnalysisServices\\Commands.AnalysisServices.Test\\bin\\Debug\\Microsoft.Azure.Commands.AnalysisServices.Test.dll"
1619
],

src/ResourceManager/Kubernetes/Kubernetes.sln renamed to src/ResourceManager/Aks/Aks.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
44
VisualStudioVersion = 14.0.25420.1
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Kubernetes", "Commands.Kubernetes\Commands.Kubernetes.csproj", "{8058D403-06E3-4BED-8924-D166CE303961}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Aks", "Commands.Aks\Commands.Aks.csproj", "{8058D403-06E3-4BED-8924-D166CE303961}"
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common", "..\..\Common\Commands.Common\Commands.Common.csproj", "{5EE72C53-1720-4309-B54B-5FB79703195F}"
99
EndProject
@@ -17,7 +17,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Common.Authorizati
1717
EndProject
1818
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{2FCD151C-4DC7-41A1-AF45-EF66C47EC6B3}"
1919
EndProject
20-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Kubernetes.Test", "Commands.Kubernetes.Test\Commands.Kubernetes.Test.csproj", "{D61726C4-A130-4CA1-A119-40BAC87ED761}"
20+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.Aks.Test", "Commands.Aks.Test\Commands.Aks.Test.csproj", "{D61726C4-A130-4CA1-A119-40BAC87ED761}"
2121
EndProject
2222
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.ScenarioTests.ResourceManager.Common", "..\Common\Commands.ScenarioTests.ResourceManager.Common\Commands.ScenarioTests.ResourceManager.Common.csproj", "{3436A126-EDC9-4060-8952-9A1BE34CDD95}"
2323
EndProject

src/ResourceManager/Kubernetes/AzureRM.Kubernetes.Netcore.psd1 renamed to src/ResourceManager/Aks/AzureRM.Aks.Netcore.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Module manifest for module 'PSGet_AzureRM.Resources'
2+
# Module manifest for module 'PSGet_AzureRM.Aks'
33
#
44
# Generated by: Microsoft Corporation
55
#
@@ -68,13 +68,13 @@ TypesToProcess = @()
6868
FormatsToProcess = @()
6969

7070
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
71-
NestedModules = @('.\Microsoft.Azure.Commands.Kubernetes.dll')
71+
NestedModules = @('.\Microsoft.Azure.Commands.Aks.dll')
7272

7373
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
7474
FunctionsToExport = @()
7575

7676
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
77-
CmdletsToExport = @('Get-AzureRmKubernetes', 'New-AzureRmKubernetes', 'Remove-AzureRmKubernetes', 'Import-AzureRmKubernetesCredential', 'Start-AzureRmKubernetesDashboard', 'Stop-AzureRmKubernetesDashboard', 'Set-AzureRmKubernetes')
77+
CmdletsToExport = @('Get-AzureRmAks', 'New-AzureRmAks', 'Remove-AzureRmAks', 'Import-AzureRmAksCredential', 'Start-AzureRmAksDashboard', 'Stop-AzureRmAksDashboard', 'Set-AzureRmAks')
7878

7979
# Variables to export from this module
8080
# VariablesToExport = @()

src/ResourceManager/Kubernetes/AzureRM.Kubernetes.psd1 renamed to src/ResourceManager/Aks/AzureRM.Aks.psd1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Module manifest for module 'PSGet_AzureRM.Kubernetes'
2+
# Module manifest for module 'PSGet_AzureRM.Aks'
33
#
44
# Generated by: Microsoft Corporation
55
#
@@ -66,16 +66,16 @@ RequiredAssemblies = '.\YamlDotNet.dll',
6666
# TypesToProcess = @()
6767

6868
# Format files (.ps1xml) to be loaded when importing this module
69-
# FormatsToProcess = '.\Microsoft.Azure.Commands.Kubernetes.Format.ps1xml'
69+
# FormatsToProcess = '.\Microsoft.Azure.Commands.Aks.Format.ps1xml'
7070

7171
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
72-
NestedModules = @('.\Microsoft.Azure.Commands.Kubernetes.dll')
72+
NestedModules = @('.\Microsoft.Azure.Commands.Aks.dll')
7373

7474
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
7575
FunctionsToExport = @()
7676

7777
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
78-
CmdletsToExport = @('Get-AzureRmKubernetes', 'New-AzureRmKubernetes', 'Remove-AzureRmKubernetes', 'Import-AzureRmKubernetesCredential', 'Start-AzureRmKubernetesDashboard', 'Stop-AzureRmKubernetesDashboard', 'Set-AzureRmKubernetes')
78+
CmdletsToExport = @('Get-AzureRmAks', 'New-AzureRmAks', 'Remove-AzureRmAks', 'Import-AzureRmAksCredential', 'Start-AzureRmAksDashboard', 'Stop-AzureRmAksDashboard', 'Set-AzureRmAks')
7979

8080
# Variables to export from this module
8181
# VariablesToExport = @()
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<ProjectGuid>{D61726C4-A130-4CA1-A119-40BAC87ED761}</ProjectGuid>
1010
<OutputType>Library</OutputType>
1111
<AppDesignerFolder>Properties</AppDesignerFolder>
12-
<RootNamespace>Microsoft.Azure.Commands.Kubernetes.Test</RootNamespace>
13-
<AssemblyName>Microsoft.Azure.Commands.Kubernetes.Test</AssemblyName>
12+
<RootNamespace>Microsoft.Azure.Commands.Aks.Test</RootNamespace>
13+
<AssemblyName>Microsoft.Azure.Commands.Aks.Test</AssemblyName>
1414
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
1515
<FileAlignment>512</FileAlignment>
1616
</PropertyGroup>
@@ -136,7 +136,7 @@
136136
<None Include="ScenarioTests\KubernetesTests.ps1">
137137
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
138138
</None>
139-
<None Include="SessionRecords\**\*.json">
139+
<None Include="SessionRecords\Commands.Aks.Test.ScenarioTests.KubernetesTests\TestAzureKubernetes.json">
140140
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
141141
</None>
142142
</ItemGroup>
@@ -162,6 +162,10 @@
162162
<Project>{5ee72c53-1720-4309-b54b-5fb79703195f}</Project>
163163
<Name>Commands.Common</Name>
164164
</ProjectReference>
165+
<ProjectReference Include="..\..\Common\Commands.Common.Authentication.ResourceManager\Commands.Common.Authentication.ResourceManager.csproj">
166+
<Project>{69C2EB6B-CD63-480A-89A0-C489706E9299}</Project>
167+
<Name>Commands.Common.Authentication.ResourceManager</Name>
168+
</ProjectReference>
165169
<ProjectReference Include="..\..\Common\Commands.ResourceManager.Common\Commands.ResourceManager.Common.csproj">
166170
<Project>{3819d8a7-c62c-4c47-8ddd-0332d9ce1252}</Project>
167171
<Name>Commands.ResourceManager.Common</Name>
@@ -170,12 +174,11 @@
170174
<Project>{3436a126-edc9-4060-8952-9a1be34cdd95}</Project>
171175
<Name>Commands.ScenarioTests.ResourceManager.Common</Name>
172176
</ProjectReference>
173-
<ProjectReference Include="..\Commands.Kubernetes\Commands.Kubernetes.csproj">
174-
<Project>{5243702C-E17A-4934-817F-2C91245C8509}</Project>
175-
<Name>Commands.Kubernetes</Name>
177+
<ProjectReference Include="..\Commands.Aks\Commands.Aks.csproj">
178+
<Project>{8058D403-06E3-4BED-8924-D166CE303961}</Project>
179+
<Name>Commands.Aks</Name>
176180
</ProjectReference>
177181
</ItemGroup>
178-
<ItemGroup />
179182
<ItemGroup>
180183
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
181184
</ItemGroup>

src/ResourceManager/Kubernetes/Commands.Kubernetes.Test/MergeKubeConfigTests.cs renamed to src/ResourceManager/Aks/Commands.Aks.Test/MergeKubeConfigTests.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
using System.Collections.Generic;
22
using System.IO;
33
using System.Linq;
4-
using Microsoft.Azure.Commands.Kubernetes;
4+
using Microsoft.Azure.Commands.Aks;
55
using Xunit;
66
using YamlDotNet.RepresentationModel;
77
using Microsoft.WindowsAzure.Commands.ScenarioTest;
88
using System;
9+
using System.Reflection;
910

10-
namespace Commands.Kubernetes.Test
11+
namespace Commands.Aks.Test
1112
{
1213
public class ConfigFixture
1314
{
1415
private readonly YamlNode _rootNode;
1516

1617
public ConfigFixture()
1718
{
18-
var merged = ImportAzureRmKubernetesCredential.MergeKubeConfig(File.ReadAllText("./Fixtures/config.yaml"), File.ReadAllText("./Fixtures/additional_kube_config.yaml"));
19+
var dir = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath);
20+
var merged = ImportAzureRmAksCredential.MergeKubeConfig(File.ReadAllText(dir + "/Fixtures/config.yaml"), File.ReadAllText(dir + "/Fixtures/additional_kube_config.yaml"));
1921
_rootNode = RootNodeFromString(merged);
2022
}
2123

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using Microsoft.Azure.Commands.ScenarioTest;
2+
using Microsoft.Azure.ServiceManagemenet.Common.Models;
3+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
4+
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
5+
using Xunit;
6+
using Xunit.Abstractions;
7+
8+
namespace Commands.Aks.Test.ScenarioTests
9+
{
10+
public class KubernetesTests : RMTestBase
11+
{
12+
public KubernetesTests(ITestOutputHelper output)
13+
{
14+
XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output));
15+
TestExecutionHelpers.SetUpSessionAndProfile();
16+
}
17+
18+
[Fact]
19+
[Trait(Category.AcceptanceType, Category.CheckIn)]
20+
public void TestAzureKubernetes()
21+
{
22+
TestController.NewInstance.RunPowerShellTest("Test-AzureRmKubernetes");
23+
}
24+
}
25+
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ function Test-AzureRmKubernetes
1515

1616
if (isLive) {
1717
$cred = $(createTestCredential "Unicorns" "Puppies")
18-
New-AzureRmKubernetes -ResourceGroupName $resourceGroupName -Name $kubeClusterName -ClientIdAndSecret $cred
18+
New-AzureRmAks -ResourceGroupName $resourceGroupName -Name $kubeClusterName -ClientIdAndSecret $cred
1919
} else {
20-
New-AzureRmKubernetes -ResourceGroupName $resourceGroupName -Name $kubeClusterName
20+
New-AzureRmAks -ResourceGroupName $resourceGroupName -Name $kubeClusterName
2121
}
22-
$cluster = Get-AzureRmKubernetes -ResourceGroupName $resourceGroupName -Name $kubeClusterName
22+
$cluster = Get-AzureRmAks -ResourceGroupName $resourceGroupName -Name $kubeClusterName
2323
Assert-NotNull $cluster.Fqdn
2424
Assert-NotNull $cluster.DnsPrefix
2525
Assert-AreEqual 1 $cluster.AgentPoolProfiles.Length
2626
Assert-AreEqual "1.8.1" $cluster.KubernetesVersion
2727
Assert-AreEqual 3 $cluster.AgentPoolProfiles[0].Count;
28-
$cluster = $cluster | Set-AzureRmKubernetes -NodeCount 2
28+
$cluster = $cluster | Set-AzureRmAks -NodeCount 2
2929
Assert-AreEqual 2 $cluster.AgentPoolProfiles[0].Count;
30-
$cluster | Import-AzureRmKubernetesCredential -Force
31-
$cluster | Remove-AzureRmKubernetes -Force
30+
$cluster | Import-AzureRmAksCredential -Force
31+
$cluster | Remove-AzureRmAks -Force
3232
}
3333
finally
3434
{
Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@
22
using System.Diagnostics;
33
using System.Linq;
44
using Microsoft.Azure.Commands.Common.Authentication;
5-
using Microsoft.Azure.Commands.Kubernetes.Generated;
5+
using Microsoft.Azure.Commands.Aks.Generated;
66
using Microsoft.WindowsAzure.Commands.ScenarioTest;
77
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
88
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
99
using Microsoft.Azure.Graph.RBAC.Version1_6;
1010
using System.Collections.Generic;
1111
using Microsoft.Azure.Test.HttpRecorder;
12+
using Microsoft.Azure.Commands.Common.Authentication.Models;
13+
using System.Reflection;
14+
using System.IO;
1215

13-
namespace Commands.Kubernetes.Test.ScenarioTests
16+
namespace Commands.Aks.Test.ScenarioTests
1417
{
1518
public class TestController : RMTestBase
1619
{
@@ -33,11 +36,18 @@ public TestController()
3336

3437
public void RunPowerShellTest(params string[] scripts)
3538
{
36-
var st = new StackTrace();
37-
var sf = st.GetFrame(1);
39+
var callingClassType = TestUtilities.GetCallingClass(2);
40+
var mockName = TestUtilities.GetCurrentMethodName(2);
3841

39-
var callingClassType = sf.GetMethod().ReflectedType.ToString();
40-
var mockName = st.GetFrame(2).GetMethod().Name;
42+
Dictionary<string, string> d = new Dictionary<string, string>();
43+
d.Add("Microsoft.Features", null);
44+
d.Add("Microsoft.Authorization", null);
45+
var providersToIgnore = new Dictionary<string, string>
46+
{
47+
{"Microsoft.Azure.Management.Resources.ResourceManagementClient", "2017-05-10"}
48+
};
49+
HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(false, d, providersToIgnore);
50+
HttpMockServer.RecordsDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SessionRecords");
4151

4252
using (var context = MockContext.Start(callingClassType, mockName))
4353
{
@@ -46,23 +56,25 @@ public void RunPowerShellTest(params string[] scripts)
4656
.Split(new[] { "." }, StringSplitOptions.RemoveEmptyEntries)
4757
.Last();
4858

49-
Dictionary<string, string> d = new Dictionary<string, string>();
50-
d.Add("Microsoft.Features", null);
51-
d.Add("Microsoft.Authorization", null);
52-
var providersToIgnore = new Dictionary<string, string>
53-
{
54-
{"Microsoft.Azure.Management.Resources.ResourceManagementClient", "2017-05-10"}
55-
};
56-
HttpMockServer.Matcher = new PermissiveRecordMatcherWithApiExclusion(false, d, providersToIgnore);
57-
5859
helper.SetupEnvironment(AzureModule.AzureResourceManager);
5960
helper.SetupModules(AzureModule.AzureResourceManager,
6061
helper.RMProfileModule,
6162
helper.RMResourceModule,
62-
helper.GetRMModulePath(@"AzureRM.Kubernetes.psd1"),
63+
helper.GetRMModulePath(@"AzureRM.Aks.psd1"),
6364
"ScenarioTests\\Common.ps1",
6465
"ScenarioTests\\" + callingClassName + ".ps1");
6566

67+
if (HttpMockServer.GetCurrentMode() == HttpRecorderMode.Playback)
68+
{
69+
AzureSession.Instance.DataStore = new MemoryDataStore();
70+
var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
71+
var dir = Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath);
72+
var subscription = HttpMockServer.Variables["SubscriptionId"];
73+
AzureSession.Instance.DataStore.WriteFile(Path.Combine(home, ".ssh", "id_rsa.pub"), File.ReadAllText(dir + "/Fixtures/id_rsa.pub"));
74+
string jsonOutput = @"{""" + subscription + @""":{ ""service_principal"":""foo"",""client_secret"":""bar""}}";
75+
AzureSession.Instance.DataStore.WriteFile(Path.Combine(home, ".azure", "acsServicePrincipal.json"), jsonOutput);
76+
}
77+
6678
helper.RunPowerShellTest(scripts);
6779
}
6880
}

src/ResourceManager/Aks/Commands.Aks.Test/SessionRecords/Commands.Aks.Test.ScenarioTests.KubernetesTests/TestAzureKubernetes.json

Lines changed: 7516 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
<Import Project="..\..\..\..\tools\Common.Netcore.Dependencies.targets" />
33
<PropertyGroup>
44
<TargetFramework>netcoreapp2.0</TargetFramework>
5-
<AssemblyName>Microsoft.Azure.Commands.Kubernetes</AssemblyName>
6-
<RootNamespace>Microsoft.Azure.Commands.Kubernetes</RootNamespace>
5+
<AssemblyName>Microsoft.Azure.Commands.Aks</AssemblyName>
6+
<RootNamespace>Microsoft.Azure.Commands.Aks</RootNamespace>
77
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
88
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
99
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
1010
</PropertyGroup>
1111
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
12-
<OutputPath>..\..\..\Package\Release\ResourceManager\AzureResourceManager\AzureRM.Kubernetes.Netcore\</OutputPath>
12+
<OutputPath>..\..\..\Package\Release\ResourceManager\AzureResourceManager\AzureRM.Aks.Netcore\</OutputPath>
1313
<SignAssembly>True</SignAssembly>
1414
<DelaySign>True</DelaySign>
1515
<AssemblyOriginatorKeyFile>MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
1616
<DefineConstants>TRACE;RELEASE;NETSTANDARD;SIGN</DefineConstants>
1717
</PropertyGroup>
1818
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
19-
<OutputPath>..\..\..\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Kubernetes.Netcore\</OutputPath>
19+
<OutputPath>..\..\..\Package\Debug\ResourceManager\AzureResourceManager\AzureRM.Aks.Netcore\</OutputPath>
2020
<DefineConstants>TRACE;DEBUG;NETSTANDARD</DefineConstants>
2121
<DelaySign>false</DelaySign>
2222
</PropertyGroup>
2323
<ItemGroup>
24-
<None Include="..\AzureRM.Kubernetes.Netcore.psd1" Link="AzureRM.Kubernetes.Netcore.psd1">
24+
<None Include="..\AzureRM.Aks.Netcore.psd1" Link="AzureRM.Aks.Netcore.psd1">
2525
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
2626
</None>
2727
</ItemGroup>
@@ -54,10 +54,10 @@
5454
</EmbeddedResource>
5555
</ItemGroup>
5656
<ItemGroup>
57-
<None Update="Microsoft.Azure.Commands.Kubernetes.Cmdlets.format.ps1xml">
57+
<None Update="Microsoft.Azure.Commands.Aks.Cmdlets.format.ps1xml">
5858
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
5959
</None>
60-
<None Update="Microsoft.Azure.Commands.Kubernetes.Cmdlets.Types.ps1xml">
60+
<None Update="Microsoft.Azure.Commands.Aks.Cmdlets.Types.ps1xml">
6161
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
6262
</None>
6363
</ItemGroup>

0 commit comments

Comments
 (0)