Skip to content

Commit 90c8b9e

Browse files
committed
update test
1 parent d205136 commit 90c8b9e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,8 @@ function Test-VirtualMachinePIRv2
633633
$p.StorageProfile.SourceImage = $null;
634634
$imgRef = Get-DefaultCRPImage;
635635
$p = Set-AzureVMSourceImage -VM $p -ImageReference $imgRef;
636+
Assert-True { $p.ImageReference -ne $null };
637+
Assert-True { $p.SourceImageId -eq $null };
636638

637639
# TODO: Remove Data Disks for now
638640
$p.StorageProfile.DataDisks = $null;

src/ResourceManager/Compute/Commands.Compute/Models/PSVirtualMachine.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public ImageReference ImageReference
7676
{
7777
get
7878
{
79-
if (this.StorageProfile != null && this.StorageProfile.SourceImage != null)
79+
if (this.StorageProfile != null)
8080
{
8181
return this.StorageProfile.ImageReference;
8282
}
@@ -89,7 +89,7 @@ public OSDisk OSDisk
8989
{
9090
get
9191
{
92-
if (this.StorageProfile != null && this.StorageProfile.OSDisk != null)
92+
if (this.StorageProfile != null)
9393
{
9494
return this.StorageProfile.OSDisk;
9595
}

0 commit comments

Comments
 (0)