Skip to content

Commit 7b3b084

Browse files
committed
Fixed Bot comments, Deleted -> Renamed + Recreated Session Test Records, Matched Logic in VM Strategy with VMSS
1 parent c4a15e5 commit 7b3b084

File tree

10 files changed

+1627
-6270
lines changed

10 files changed

+1627
-6270
lines changed

src/Compute/Compute.Test/ScenarioTests/VirtualMachineScaleSetTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,9 +482,9 @@ public void TestProxyAgentSetting()
482482

483483
[Fact]
484484
[Trait(Category.AcceptanceType, Category.CheckIn)]
485-
public void TestVMSSAddProxyAgentExtension()
485+
public void TestVirtualMachineScaleSetAddProxyAgentExtension()
486486
{
487-
TestRunner.RunTestScript("Test-VMSSAddProxyAgentExtension");
487+
TestRunner.RunTestScript("Test-VirtualMachineScaleSetAddProxyAgentExtension");
488488
}
489489
}
490490
}

src/Compute/Compute.Test/ScenarioTests/VirtualMachineScaleSetTests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5969,9 +5969,9 @@ function Test-ProxyAgentSetting
59695969

59705970
<#
59715971
.SYNOPSIS
5972-
Test-VMSSAddProxyAgentExtension creates a VMSS with Enabled ProxyAgent and added ProxyAgentExtension
5972+
Test-VirtualMachineScaleSetAddProxyAgentExtension creates a VMSS with Enabled ProxyAgent and added ProxyAgentExtension
59735973
#>
5974-
function Test-VMSSAddProxyAgentExtension
5974+
function Test-VirtualMachineScaleSetAddProxyAgentExtension
59755975
{
59765976
# Setup
59775977
$rgname = Get-ComputeTestResourceName;

src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,9 +692,9 @@ public void TestVirtualMachinePlacement()
692692

693693
[Fact]
694694
[Trait(Category.AcceptanceType, Category.CheckIn)]
695-
public void TestVMAddProxyAgentExtension()
695+
public void TestVirtualMachineAddProxyAgentExtension()
696696
{
697-
TestRunner.RunTestScript("Test-VMAddProxyAgentExtension");
697+
TestRunner.RunTestScript("Test-VirtualMachineAddProxyAgentExtension");
698698
}
699699
}
700700
}

src/Compute/Compute.Test/ScenarioTests/VirtualMachineTests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7942,9 +7942,9 @@ function Test-VirtualMachinePlacement
79427942

79437943
<#
79447944
.SYNOPSIS
7945-
Test-VMAddProxyAgentExtension creates a VM with Enabled ProxyAgent and added ProxyAgentExtension
7945+
Test-VirtualMachineAddProxyAgentExtension creates a VM with Enabled ProxyAgent and added ProxyAgentExtension
79467946
#>
7947-
function Test-VMAddProxyAgentExtension
7947+
function Test-VirtualMachineAddProxyAgentExtension
79487948
{
79497949
# Setup
79507950
$resourceGroupName = Get-ComputeTestResourceName;

src/Compute/Compute.Test/SessionRecords/Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineScaleSetTests/TestVMSSAddProxyAgentExtension.json

Lines changed: 0 additions & 2309 deletions
This file was deleted.

src/Compute/Compute.Test/SessionRecords/Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineScaleSetTests/TestVirtualMachineScaleSetAddProxyAgentExtension.json

Lines changed: 709 additions & 550 deletions
Large diffs are not rendered by default.

src/Compute/Compute.Test/SessionRecords/Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests/TestVMSSAddProxyAgentExtension.json

Lines changed: 0 additions & 2972 deletions
This file was deleted.
Lines changed: 909 additions & 429 deletions
Large diffs are not rendered by default.

src/Compute/Compute/Strategies/ComputeRp/VirtualMachineStrategy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public static ResourceConfig<VirtualMachine> CreateVirtualMachineConfig(
164164
EncryptionAtHost = encryptionAtHostPresent,
165165
UefiSettings = (enableVtpm != null || enableSecureBoot != null) ? new UefiSettings(enableSecureBoot, enableVtpm) : null,
166166
SecurityType = securityType,
167-
ProxyAgentSettings = (enableProxyAgent == true || addProxyAgentExtension == true) ? new ProxyAgentSettings(enableProxyAgent) { AddProxyAgentExtension = addProxyAgentExtension } : null,
167+
ProxyAgentSettings = (enableProxyAgent != null || addProxyAgentExtension != null) ? new ProxyAgentSettings(enableProxyAgent) { AddProxyAgentExtension = addProxyAgentExtension } : null,
168168
},
169169
CapacityReservation = string.IsNullOrEmpty(capacityReservationGroupId) ? null : new CapacityReservationProfile
170170
{

src/Compute/Compute/VirtualMachine/Config/SetAzVMProxyAgentSetting.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ public override void ExecuteCmdlet()
106106
this.VM.SecurityProfile.ProxyAgentSettings.AddProxyAgentExtension = this.AddProxyAgentExtension;
107107
}
108108

109-
110109
WriteObject(this.VM);
111110
}
112111
}

0 commit comments

Comments
 (0)