File tree Expand file tree Collapse file tree 3 files changed +2056
-2058
lines changed
src/ResourceManager/Compute/Commands.Compute.Test
SessionRecords/Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineScaleSetTests Expand file tree Collapse file tree 3 files changed +2056
-2058
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Commands.Compute.Test.ScenarioTests
19
19
{
20
20
public partial class VirtualMachineScaleSetTests
21
21
{
22
- [ Fact ( Skip = "TODO: need to re-record" ) ]
22
+ [ Fact ]
23
23
[ Trait ( Category . AcceptanceType , Category . CheckIn ) ]
24
24
public void TestVirtualMachineScaleSet ( )
25
25
{
Original file line number Diff line number Diff line change @@ -214,26 +214,13 @@ function Test-VirtualMachineScaleSet
214
214
$instanceListParam += $i.ToString ();
215
215
}
216
216
217
- $argList = New-AzureComputeArgumentList - MethodName VirtualMachineScaleSetPowerOffInstances;
218
- $argList [0 ].Value = $rgname ;
219
- $argList [1 ].Value = $vmss.Name ;
220
- $argList [2 ].Value = $instanceListParam ;
221
- $args = @ ()
222
- for ($i = 0 ; $i -lt $argList.Length ; $i ++ )
223
- {
224
- $args += , $argList [$i ].Value;
225
- }
226
-
227
- # $vmssResult = Invoke-AzureComputeMethod -MethodName VirtualMachineScaleSetPowerOffInstances -ArgumentList $args;
228
217
$st = Stop-AzureRmVmssInstances - ResourceGroupName $rgname - VMScaleSetName $vmss.Name - VMInstanceIDs $instanceListParam ;
229
218
$st = Stop-AzureRmVmssInstancesWithDeallocation - ResourceGroupName $rgname - VMScaleSetName $vmss.Name - VMInstanceIDs $instanceListParam ;
230
219
$st = Start-AzureRmVmssInstances - ResourceGroupName $rgname - VMScaleSetName $vmss.Name - VMInstanceIDs $instanceListParam ;
231
220
$st = Restart-AzureRmVmssInstances - ResourceGroupName $rgname - VMScaleSetName $vmss.Name - VMInstanceIDs $instanceListParam ;
232
221
233
222
# Remove
234
- $instanceListParam = New-AzureComputeParameterObject - FriendlyName VirtualMachineScaleSetVMInstanceIDs;
235
- $instanceListParam.InstanceIDs.Add (1 );
236
- $st = Remove-AzureRmVmssInstances - ResourceGroupName $rgname - VMScaleSetName $vmss.Name - VMInstanceIDs $instanceListParam ;
223
+ $st = Remove-AzureRmVmssInstances - ResourceGroupName $rgname - VMScaleSetName $vmss.Name - VMInstanceIDs 1 ;
237
224
Assert-ThrowsContains { $st = Remove-AzureRmVmssVM - ResourceGroupName $rgname - VMScaleSetName $vmss.Name - InstanceId 0 } " cannot be deleted because it is the last remaining" ;
238
225
$st = Remove-AzureRmVmss - ResourceGroupName $rgname - VMScaleSetName $vmss.Name ;
239
226
}
You can’t perform that action at this time.
0 commit comments