Skip to content

Commit 5766694

Browse files
authored
Merge pull request #3223 from zapepin/stack-dev
Fix issues in the stack-dev branch which prevent the compute test cases from running against live Azure
2 parents f439cc3 + 72710d3 commit 5766694

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function Test-VirtualMachineExtension
116116
$extver = '1.1';
117117

118118
# Set extension settings by raw strings
119-
$settingstr = '{"fileUris":[],"commandToExecute":""}';
119+
$settingstr = '{"fileUris":[],"commandToExecute":"powershell Get-Process"}';
120120
$protectedsettingstr = '{"storageAccountName":"' + $stoname + '","storageAccountKey":"' + $stokey + '"}';
121121
Set-AzureRmVMExtension -ResourceGroupName $rgname -Location $loc -VMName $vmname -Name $extname -Publisher $publisher -ExtensionType $exttype -TypeHandlerVersion $extver -SettingString $settingstr -ProtectedSettingString $protectedsettingstr;
122122

@@ -256,7 +256,7 @@ function Test-VirtualMachineExtensionUsingHashTable
256256
$extver = '1.1';
257257

258258
# Set extension settings by hash table
259-
$settings = @{"fileUris" = @(); "commandToExecute" = ""};
259+
$settings = @{"fileUris" = @(); "commandToExecute" = "powershell Get-Process"};
260260
$protectedsettings = @{"storageAccountName" = $stoname; "storageAccountKey" = $stokey};
261261
Set-AzureRmVMExtension -ResourceGroupName $rgname -Location $loc -VMName $vmname -Name $extname -Publisher $publisher -ExtensionType $exttype -TypeHandlerVersion $extver -Settings $settings -ProtectedSettings $protectedsettings;
262262

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function Test-SingleNetworkInterfaceDnsSettings
163163
$pubip = New-AzureRmPublicIpAddress -Force -Name ('pubip' + $rgname) -ResourceGroupName $rgname -Location $loc -AllocationMethod Dynamic -DomainNameLabel ('pubip' + $rgname);
164164
$pubip = Get-AzureRmPublicIpAddress -Name ('pubip' + $rgname) -ResourceGroupName $rgname;
165165
$pubipId = $pubip.Id;
166-
$nic = New-AzureRmNetworkInterface -Force -Name ('nic' + $rgname) -ResourceGroupName $rgname -Location $loc -SubnetId $subnetId -PublicIpAddressId $pubip.Id -DnsServer "10.0.1.5";
166+
$nic = New-AzureRmNetworkInterface -Force -Name ('nic' + $rgname) -ResourceGroupName $rgname -Location $loc -SubnetId $subnetId -PublicIpAddressId $pubip.Id -DnsServer "8.8.8.8";
167167
$nic = Get-AzureRmNetworkInterface -Name ('nic' + $rgname) -ResourceGroupName $rgname;
168168
$nicId = $nic.Id;
169169

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ function Test-VirtualMachine
212212
$p2.OSProfile = $p.OSProfile;
213213
$p2.NetworkProfile = $p.NetworkProfile;
214214
$p2.StorageProfile = $p.StorageProfile;
215+
216+
$p2.StorageProfile.DataDisks = $null;
217+
$p2.StorageProfile.OsDisk.Vhd.Uri = "https://$stoname.blob.core.windows.net/test/os2.vhd";
215218
New-AzureRmVM -ResourceGroupName $rgname -Location $loc -VM $p2;
216219

217220
$vm2 = Get-AzureRmVM -Name $vmname2 -ResourceGroupName $rgname;

0 commit comments

Comments
 (0)