Skip to content

Commit 632b427

Browse files
hyonholeeHovsep
authored andcommitted
Re-record failed Compute tests (Azure#2664)
1 parent 48b7f02 commit 632b427

File tree

19 files changed

+7849
-18327
lines changed

19 files changed

+7849
-18327
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ function Create-AdvancedVM($rgname, $vmname, $loc, $vmsize, $stotype, $nicCount,
323323

324324
# OS & Image
325325
$user = "Foo12";
326-
$password = 'BaR@123' + $rgname;
326+
$password = $PLACEHOLDER;
327327
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
328328
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
329329
$computerName = 'test';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ function Create-VirtualMachine($rgname, $vmname, $loc)
177177

178178
# OS & Image
179179
$user = "Foo12";
180-
$password = 'BaR@123' + $rgname;
180+
$password = $PLACEHOLDER;
181181
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
182182
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
183183
$computerName = 'test';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function Test-GetAzureRmVMDscExtension
5757

5858
# OS & Image
5959
$user = "localadmin";
60-
$password = 'Bull_dog1';
60+
$password = $PLACEHOLDER;
6161
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
6262
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
6363
$computerName = 'test';

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function Test-SetAzureRmVMSqlServerAKVExtension
6262

6363
# OS & Image
6464
$user = "localadmin";
65-
$password = 'Bull_dog1';
65+
$password = $PLACEHOLDER;
6666
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
6767
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
6868
$computerName = 'test';
@@ -169,7 +169,7 @@ function Test-SetAzureRmVMSqlServerExtension
169169

170170
# OS & Image
171171
$user = "localadmin";
172-
$password = 'Bull_dog1';
172+
$password = $PLACEHOLDER;
173173
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
174174
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
175175
$computerName = 'test';

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ function create_and_setup_vm_config_object
219219
$vmconfig = get_vm_config_object $rgname $vmsize
220220
221221
$user = "Foo12";
222-
$password = $rgname + "BaR#123";
222+
$password = $PLACEHOLDER;
223223
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
224224
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
225225
$computerName = $rgname + "cn";

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,12 @@ function Test-VirtualMachineBootDiagnostics
8686

8787
# OS & Image
8888
$user = "Foo12";
89-
$password = 'BaR@123' + $rgname;
89+
$password = $PLACEHOLDER;
9090
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
9191
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
9292
$computerName = 'test';
9393
$vhdContainer = "https://$stoname.blob.core.windows.net/test";
9494

95-
# $p.StorageProfile.OSDisk = $null;
9695
$p = Set-AzureRmVMOperatingSystem -VM $p -Windows -ComputerName $computerName -Credential $cred;
9796

9897
$imgRef = Get-DefaultCRPImage -loc $loc;
@@ -135,6 +134,10 @@ function Test-VirtualMachineBootDiagnostics
135134
# Remove VM
136135
Remove-AzureRmVM -Name $vmname -ResourceGroupName $rgname -Force;
137136

137+
# Create a Linux VM with boot diagnostics
138+
$osDiskVhdUri = "https://$stoname.blob.core.windows.net/test/linuxos.vhd";
139+
$osDiskName = 'linuxOsDisk';
140+
138141
$p = New-AzureRMVMConfig -VMName $vmname -VMSize $vmsize;
139142
$p = Add-AzureRMVMNetworkInterface -VM $p -Id $nicId;
140143
$p = Set-AzureRMVMOSDisk -VM $p -Name $osDiskName -VhdUri $osDiskVhdUri -Caching $osDiskCaching -CreateOption FromImage;
@@ -239,7 +242,7 @@ function Test-VirtualMachineBootDiagnosticsPremium
239242

240243
# OS & Image
241244
$user = "Foo12";
242-
$password = 'BaR@123' + $rgname;
245+
$password = $PLACEHOLDER;
243246
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
244247
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
245248
$computerName = 'test';
@@ -341,7 +344,7 @@ function Test-LinuxVirtualMachineBootDiagnostics
341344

342345
# OS & Image
343346
$user = "Foo12";
344-
$password = 'BaR@123' + $rgname;
347+
$password = $PLACEHOLDER;
345348
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
346349
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
347350
$computerName = 'test';
@@ -458,7 +461,7 @@ function Test-VirtualMachineBootDiagnosticsSet
458461

459462
# OS & Image
460463
$user = "Foo12";
461-
$password = 'BaR@123' + $rgname;
464+
$password = $PLACEHOLDER;
462465
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
463466
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
464467
$computerName = 'test';

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ public VirtualMachineExtensionTests(Xunit.Abstractions.ITestOutputHelper output)
2424
ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new ServiceManagemenet.Common.Models.XunitTracingInterceptor(output));
2525
}
2626

27-
[Fact(Skip = "ClientRuntime upgrade - Please re-record")]
27+
[Fact]
2828
[Trait(Category.AcceptanceType, Category.CheckIn)]
2929
public void TestVirtualMachineExtension()
3030
{
3131
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineExtension");
3232
}
3333

34-
[Fact(Skip = "ClientRuntime upgrade - Please re-record")]
34+
[Fact]
3535
[Trait(Category.AcceptanceType, Category.CheckIn)]
3636
public void TestVirtualMachineExtensionUsingHashTable()
3737
{

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.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void TestVirtualMachineMultipleNetworkInterface()
3838
ComputeTestController.NewInstance.RunPsTest("Test-MultipleNetworkInterface");
3939
}
4040

41-
[Fact(Skip = "ClientRuntime upgrade - Please re-record")]
41+
[Fact]
4242
[Trait(Category.AcceptanceType, Category.CheckIn)]
4343
public void TestSingleNetworkInterfaceDnsSettings()
4444
{

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function Test-SingleNetworkInterface
8585

8686
# OS & Image
8787
$user = "Foo12";
88-
$password = 'BaR@123' + $rgname;
88+
$password = $PLACEHOLDER;
8989
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
9090
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
9191
$computerName = 'test';
@@ -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

@@ -194,7 +194,7 @@ function Test-SingleNetworkInterfaceDnsSettings
194194

195195
# OS & Image
196196
$user = "Foo12";
197-
$password = 'BaR@123' + $rgname;
197+
$password = $PLACEHOLDER;
198198
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
199199
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
200200
$computerName = 'test';
@@ -303,7 +303,7 @@ function Test-MultipleNetworkInterface
303303

304304
# OS & Image
305305
$user = "Foo12";
306-
$password = 'BaR@123' + $rgname;
306+
$password = $PLACEHOLDER;
307307
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
308308
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
309309
$computerName = 'test';
@@ -426,7 +426,7 @@ function Test-AddNetworkInterface
426426

427427
# OS & Image
428428
$user = "Foo12";
429-
$password = 'BaR@123' + $rgname;
429+
$password = $PLACEHOLDER;
430430
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
431431
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
432432
$computerName = 'test';

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function Test-VirtualMachineProfile
9999

100100
# Windows OS
101101
$user = "Foo12";
102-
$password = 'BaR@000' + ((Get-Random) % 10000);
102+
$password = $PLACEHOLDER;
103103
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
104104
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
105105
$computerName = 'test';
@@ -275,7 +275,7 @@ function Test-VirtualMachineProfileWithoutAUC
275275

276276
# Windows OS
277277
$user = "Foo12";
278-
$password = 'BaR@000' + ((Get-Random) % 10000);
278+
$password = $PLACEHOLDER;
279279
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
280280
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
281281
$computerName = 'test';

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public VirtualMachineTests(Xunit.Abstractions.ITestOutputHelper output)
2424
ServiceManagemenet.Common.Models.XunitTracingInterceptor.AddToContext(new ServiceManagemenet.Common.Models.XunitTracingInterceptor(output));
2525
}
2626

27-
[Fact(Skip = "ClientRuntime upgrade - Please re-record")]
27+
[Fact]
2828
[Trait(Category.AcceptanceType, Category.CheckIn)]
2929
public void TestVirtualMachine()
3030
{
@@ -171,7 +171,7 @@ public void TestVirtualMachineWithEmptyAuc()
171171
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineWithEmptyAuc");
172172
}
173173

174-
[Fact(Skip = "ClientRuntime upgrade - Please re-record")]
174+
[Fact]
175175
[Trait(Category.AcceptanceType, Category.CheckIn)]
176176
public void TestVirtualMachineWithBYOL()
177177
{

0 commit comments

Comments
 (0)