File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Compute.Test/ScenarioTests Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2971,12 +2971,16 @@ function Test-VirtualMachineGetStatus
2971
2971
Assert-True {$a.Contains (" Statuses" );}
2972
2972
2973
2973
$vms = Get-AzVM - ResourceGroupName $rgname - Status;
2974
+ Assert-AreEqual " VM running" ($vms | ? {$_.Name -eq $vmname }).PowerState;
2974
2975
$a = $vms | Out-String ;
2975
2976
Write-Verbose ($a );
2977
+ Assert-True {$a.Contains (" VM running" )};
2976
2978
2977
2979
$vms = Get-AzVM - Status;
2980
+ Assert-AreEqual " VM running" ($vms | ? {$_.Name -eq $vmname }).PowerState;
2978
2981
$a = $vms | Out-String ;
2979
2982
Write-Verbose ($a );
2983
+ Assert-True {$a.Contains (" VM running" )};
2980
2984
2981
2985
# VM Compact output
2982
2986
$a = $vms [0 ] | Format-Custom | Out-String ;
@@ -3685,13 +3689,13 @@ function Test-VirtualMachineStop
3685
3689
# Get VM
3686
3690
$vm = Get-AzVM - ResourceGroupName $rgname - Name $vmname ;
3687
3691
$vmstate = Get-AzVM - ResourceGroupName $rgname - Name $vmname - Status;
3688
- Assert-AreEqual " PowerState/running" $vmstate.Statuses [1 ].Code
3692
+ Assert-AreEqual " PowerState/running" $vmstate.Statuses [1 ].Code;
3689
3693
3690
3694
# Stop the VM
3691
3695
Stop-AzVM - ResourceGroupName $rgname - Name $vmname - StayProvisioned - SkipShutdown - Force;
3692
3696
$vm = Get-AzVM - ResourceGroupName $rgname - Name $vmname ;
3693
3697
$vmstate = Get-AzVM - ResourceGroupName $rgname - Name $vmname - Status;
3694
- Assert-AreEqual " PowerState/stopped" $vmstate.Statuses [1 ].Code
3698
+ Assert-AreEqual " PowerState/stopped" $vmstate.Statuses [1 ].Code;
3695
3699
3696
3700
Remove-AzVM - ResourceGroupName $rgname - Name $vmname - Force;
3697
3701
}
Original file line number Diff line number Diff line change 19
19
- Additional information about change #1
20
20
-->
21
21
## Upcoming Release
22
-
22
+ * Show the exact string value for VM PowerState in the table format.
23
23
## Version 3.5.0
24
24
* Allowed empty value for ProximityPlacementGroupId during update
25
25
Original file line number Diff line number Diff line change 729
729
<ScriptBlock >$_.Zones</ScriptBlock >
730
730
</TableColumnItem >
731
731
<TableColumnItem >
732
- <ScriptBlock >$_.PowerState.Replace("VM ", "") </ScriptBlock >
732
+ <ScriptBlock >$_.PowerState</ScriptBlock >
733
733
</TableColumnItem >
734
734
<TableColumnItem >
735
735
<ScriptBlock >$_.MaintenanceRedeployStatus.IsCustomerInitiatedMaintenanceAllowed</ScriptBlock >
You can’t perform that action at this time.
0 commit comments