Skip to content

Commit 10da9f3

Browse files
author
Hovsep
committed
Merge pull request Azure#2358 from hyonholee/dev
[Release 1.5.0][Hotfix] Fix Add-AzureRmVhd
2 parents b39a812 + 0b0a783 commit 10da9f3

File tree

6 files changed

+6429
-7
lines changed

6 files changed

+6429
-7
lines changed

src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,9 @@
459459
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachineWithEmptyAuc.json">
460460
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
461461
</None>
462+
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachineWithPremiumStorageAccount.json">
463+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
464+
</None>
462465
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachineWithVMAgentAutoUpdate.json">
463466
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
464467
</None>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ function Test-AddVhd
4343

4444
foreach ($testItem in $testData)
4545
{
46-
$vhdLocalPath = 'e:\vhdstore\' + $testItem.vhdName;
46+
$vhdLocalPath = 'f:\vhdstore\' + $testItem.vhdName;
4747
$vhdName = GetFileNameWithoutExtension $testItem.vhdName;
48-
$vhdDestUri = [System.String]::Format("{0}{1}/{2}{3}.vhd", $stoaccount.PrimaryEndpoints.Blob.AbsoluteUri, $vhdContainerName, $vhdName, $rgname);
48+
$vhdDestUri = [System.String]::Format("{0}{1}/{2}{3}.vhd", $stoaccount.PrimaryEndpoints.Blob, $vhdContainerName, $vhdName, $rgname);
4949
Write-Output ("Start Uploading... : " + $testItem.vhdName);
5050

5151
$vhdUploadContext = Add-AzureRmVhd -ResourceGroupName $rgname -Destination $vhdDestUri -LocalFilePath $vhdLocalPath -NumberOfUploaderThreads 1;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public void TestVirtualMachineWithDifferentStorageResource()
157157
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineWithDifferentStorageResource");
158158
}
159159

160-
[Fact (Skip="Record the test after storage account ps1 fix")]
160+
[Fact]
161161
[Trait(Category.AcceptanceType, Category.CheckIn)]
162162
public void TestVirtualMachineWithPremiumStorageAccount()
163163
{

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ function Test-VirtualMachineWithPremiumStorageAccount
20472047
$stoaccount = Get-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname;
20482048

20492049
# VM Profile & Hardware
2050-
$vmsize = 'Standard_A4';
2050+
$vmsize = 'Standard_DS1';
20512051
$vmname = 'vm' + $rgname;
20522052
$p = New-AzureRmVMConfig -VMName $vmname -VMSize $vmsize;
20532053
Assert-AreEqual $p.HardwareProfile.VmSize $vmsize;
@@ -2079,7 +2079,6 @@ function Test-VirtualMachineWithPremiumStorageAccount
20792079
$osDiskVhdUri = "https://$stoname.blob.core.windows.net/test/os.vhd";
20802080
$dataDiskVhdUri1 = "https://$stoname.blob.core.windows.net/test/data1.vhd";
20812081
$dataDiskVhdUri2 = "https://$stoname.blob.core.windows.net/test/data2.vhd";
2082-
$dataDiskVhdUri3 = "https://$stoname.blob.core.windows.net/test/data3.vhd";
20832082

20842083
$p = Set-AzureRmVMOSDisk -VM $p -Name $osDiskName -VhdUri $osDiskVhdUri -Caching $osDiskCaching -CreateOption FromImage;
20852084

@@ -2141,7 +2140,7 @@ function Test-VirtualMachineWithPremiumStorageAccount
21412140
Assert-AreEqual $vm1.HardwareProfile.VmSize $vmsize;
21422141

21432142
Assert-AreEqual $true $vm1.DiagnosticsProfile.BootDiagnostics.Enabled;
2144-
#Assert-AreEqual $stoaccount.PrimaryEndpoints.Blob $vm1.DiagnosticsProfile.BootDiagnostics.StorageUri;
2143+
Assert-AreNotEqual $stoaccount.PrimaryEndpoints.Blob $vm1.DiagnosticsProfile.BootDiagnostics.StorageUri;
21452144
}
21462145
finally
21472146
{

0 commit comments

Comments
 (0)