Skip to content

Commit 0570089

Browse files
committed
Merge pull request Azure#1044 from hyonholee/dev
AzureRT PR
2 parents c200843 + a649695 commit 0570089

File tree

82 files changed

+79763
-44338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+79763
-44338
lines changed

AzurePowershell.Test.targets

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
</Target>
217217

218218
<!-- Run the scenario tests -->
219-
<Target Name="ScenarioTest" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
219+
<Target Name="ScenarioTest" DependsOnTargets="Clean;Build;BeforeRunTests">
220220
<Message Importance="high" Text="Running scenario tests..." />
221221
<MSBuild Targets="InvokeMSTest"
222222
Properties="_testAssembly=$(ScenarioTestDebug);_testSettings=$(TestSettings);_testFilter=$(ScenarioTestFilter);_testResult=$(TestOutputDirectory)\ScenarioTestDebug.trx"
@@ -275,7 +275,7 @@
275275
IncludeTraits="$(XUnitIncludedTrait)" MaxParallelThreads="0" ParallelizeAssemblies="false" ParallelizeTestCollections="false" />
276276
</Target>
277277

278-
<Target Name="RunOneSDKCIT" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
278+
<Target Name="RunOneSDKCIT" DependsOnTargets="Clean;Build;BeforeRunTests">
279279
<Message Importance="high" Text="Running CIT Scenario tests..." />
280280
<Delete Files="$(TestOutputDirectory)\RunOneSDKCITDebug.trx" />
281281
<Exec
@@ -284,47 +284,47 @@
284284
</Target>
285285

286286
<!-- Run the AzureRT tests -->
287-
<Target Name="AzureRTBVTs" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
287+
<Target Name="AzureRTBVTs" DependsOnTargets="Clean;Build;BeforeRunTests">
288288
<Message Importance="high" Text="Running AzureRT BVT tests..." />
289289
<Delete Files="$(TestOutputDirectory)\RTBVTDebug.trx" />
290290
<Exec
291291
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:BVT /resultsfile:$(TestOutputDirectory)\RTBVTDebug.trx"
292292
ContinueOnError="false" />
293293
</Target>
294294

295-
<Target Name="AzureRTOne" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
295+
<Target Name="AzureRTOne" DependsOnTargets="Clean;Build;BeforeRunTests">
296296
<Message Importance="high" Text="Running a specific tests..." />
297297
<Delete Files="$(TestOutputDirectory)\RTFunctionalDebug.trx" />
298298
<Exec
299299
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTSeqTestSettings) /test:$(TestName) /resultsfile:$(TestOutputDirectory)\RTFunctionalDebug.trx"
300300
ContinueOnError="false" />
301301
</Target>
302302

303-
<Target Name="AzureRTRepeat" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
303+
<Target Name="AzureRTRepeat" DependsOnTargets="Clean;Build;BeforeRunTests">
304304
<Message Importance="high" Text="Running a specific tests..." />
305305
<Delete Files="$(TestOutputDirectory)\RTFunctionalDebug.trx" />
306306
<Exec
307307
Command="for /l %%x in (1, 1, $(RepeatTimes)) do MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /test:$(TestName) /resultsfile:$(TestOutputDirectory)\RTFunctionalDebug%%x.trx"
308308
ContinueOnError="false" />
309309
</Target>
310310

311-
<Target Name="AzureRTMulti" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
311+
<Target Name="AzureRTMulti" DependsOnTargets="Clean;Build;BeforeRunTests">
312312
<Message Importance="high" Text="Running tests:" />
313313
<Delete Files="$(TestOutputDirectory)\RTFunctionalDebug.trx" />
314314
<Exec
315315
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTSeqTestSettings) $(TestParams) /resultsfile:$(TestOutputDirectory)\RTFunctionalDebug.trx"
316316
ContinueOnError="false" />
317317
</Target>
318318

319-
<Target Name="AzureRTAll" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
319+
<Target Name="AzureRTAll" DependsOnTargets="Clean;Build;BeforeRunTests">
320320
<Message Importance="high" Text="Running AzureRT all tests..." />
321321
<Delete Files="$(TestOutputDirectory)\RTDebug.trx" />
322322
<Exec
323323
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTSeqTestSettings) /category:$(AzureRTAllTestFilter) /resultsfile:$(TestOutputDirectory)\RTDebug.trx"
324324
ContinueOnError="false" />
325325
</Target>
326326

327-
<Target Name="AzureRTAllFast" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
327+
<Target Name="AzureRTAllFast" DependsOnTargets="Clean;Build;BeforeRunTests">
328328
<Message Importance="high" Text="Running AzureRT all tests..." />
329329

330330
<Delete Files="$(TestOutputDirectory)\RTSequentialDebug.trx" />
@@ -337,7 +337,7 @@
337337
ContinueOnError="false" />
338338
</Target>
339339

340-
<Target Name="AzureRTSeq" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
340+
<Target Name="AzureRTSeq" DependsOnTargets="Clean;Build;BeforeRunTests">
341341
<Message Importance="high" Text="Running AzureRT all tests..." />
342342

343343
<Delete Files="$(TestOutputDirectory)\RTSequentialDebug.trx" />
@@ -346,7 +346,7 @@
346346
ContinueOnError="true" />
347347
</Target>
348348

349-
<Target Name="AzureRTNetwork" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
349+
<Target Name="AzureRTNetwork" DependsOnTargets="Clean;Build;BeforeRunTests">
350350
<Message Importance="high" Text="Running AzureRT all tests..." />
351351

352352
<Delete Files="$(TestOutputDirectory)\RTSequentialDebug.trx" />
@@ -355,7 +355,7 @@
355355
ContinueOnError="false" />
356356
</Target>
357357

358-
<Target Name="AzureRTUploadSeq" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
358+
<Target Name="AzureRTUploadSeq" DependsOnTargets="Clean;Build;BeforeRunTests">
359359
<Message Importance="high" Text="Running AzureRT all tests..." />
360360

361361
<Delete Files="$(TestOutputDirectory)\RTSequentialDebug.trx" />
@@ -364,7 +364,7 @@
364364
ContinueOnError="false" />
365365
</Target>
366366

367-
<Target Name="AzureRTPar" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
367+
<Target Name="AzureRTPar" DependsOnTargets="Clean;Build;BeforeRunTests">
368368
<Message Importance="high" Text="Running AzureRT all tests..." />
369369

370370
<Delete Files="$(TestOutputDirectory)\RTDebug.trx" />
@@ -373,7 +373,7 @@
373373
ContinueOnError="false" />
374374
</Target>
375375

376-
<Target Name="AzureRTFunctional" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
376+
<Target Name="AzureRTFunctional" DependsOnTargets="Clean;Build;BeforeRunTests">
377377
<Message Importance="high" Text="Running AzureRT Functional tests..." />
378378

379379
<Delete Files="$(TestOutputDirectory)\RTFunctionalDebug.trx" />
@@ -382,7 +382,7 @@
382382
ContinueOnError="false" />
383383
</Target>
384384

385-
<Target Name="AzureRTScenario" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
385+
<Target Name="AzureRTScenario" DependsOnTargets="Clean;Build;BeforeRunTests">
386386
<Message Importance="high" Text="Running AzureRT Scenario tests..." />
387387

388388
<Delete Files="$(TestOutputDirectory)\RTScenarioDebug.trx" />
@@ -391,7 +391,7 @@
391391
ContinueOnError="false" />
392392
</Target>
393393

394-
<Target Name="AzureRTAllPreview" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
394+
<Target Name="AzureRTAllPreview" DependsOnTargets="Clean;Build;BeforeRunTests">
395395
<Message Importance="high" Text="Running AzureRT all tests..." />
396396
<Delete Files="$(TestOutputDirectory)\RTAddVhdDebug.trx" />
397397
<Delete Files="$(TestOutputDirectory)\RTDebug.trx" />
@@ -403,23 +403,23 @@
403403
ContinueOnError="false" />
404404
</Target>
405405

406-
<Target Name="AzureRTPreview" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
406+
<Target Name="AzureRTPreview" DependsOnTargets="Clean;Build;BeforeRunTests">
407407
<Message Importance="high" Text="Running AzureRT all tests..." />
408408
<Delete Files="$(TestOutputDirectory)\RTPreviewDebug.trx" />
409409
<Exec
410410
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:Preview /resultsfile:$(TestOutputDirectory)\RTPreviewDebug.trx"
411411
ContinueOnError="false" />
412412
</Target>
413413

414-
<Target Name="AzureRTCleanUp" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
414+
<Target Name="AzureRTCleanUp" DependsOnTargets="Clean;Build;BeforeRunTests">
415415
<Message Importance="high" Text="Running AzureRT clean up tests..." />
416416
<Delete Files="$(TestOutputDirectory)\RTCleanUpDebug.trx" />
417417
<Exec
418418
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:AzureRTCleanUp /resultsfile:$(TestOutputDirectory)\RTCleanUpDebug.trx"
419419
ContinueOnError="false" />
420420
</Target>
421421

422-
<Target Name="ComputeCodeCoverage" DependsOnTargets="ForceRestorePackages;Clean;BuildDebug">
422+
<Target Name="ComputeCodeCoverage" DependsOnTargets="RestoreNugetPackages;Clean;Build">
423423
<Message Importance="high" Text="Gathering Code Coverage data from Compute tests..." />
424424
<Delete Files="Project.covarage" />
425425
<Exec

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
<Reference Include="Microsoft.Azure.Management.Authorization">
6767
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.1.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
6868
</Reference>
69-
<Reference Include="Microsoft.Azure.Management.Compute, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
70-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.8.2.0\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
69+
<Reference Include="Microsoft.Azure.Management.Compute, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
70+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.9.0.0\lib\net40\Microsoft.Azure.Management.Compute.dll</HintPath>
7171
<Private>True</Private>
7272
</Reference>
7373
<Reference Include="Microsoft.Azure.Management.Network, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@@ -157,6 +157,7 @@
157157
<Compile Include="ScenarioTests\AddVhdTests.cs" />
158158
<Compile Include="ScenarioTests\ComputeCloudExceptionTests.cs" />
159159
<Compile Include="ScenarioTests\DscExtensionTests.cs" />
160+
<Compile Include="ScenarioTests\VirtualMachineBootDiagnosticsTests.cs" />
160161
<Compile Include="ScenarioTests\VMDynamicTests.cs" />
161162
<Compile Include="ScenarioTests\VirtualMachineProfileTests.cs" />
162163
<Compile Include="ScenarioTests\AvailabilitySetTests.cs" />
@@ -223,6 +224,9 @@
223224
<None Include="ScenarioTests\Generated\VirtualMachineDynamicTest3.ps1">
224225
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
225226
</None>
227+
<None Include="ScenarioTests\VirtualMachineBootDiagnosticsTests.ps1">
228+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
229+
</None>
226230
<None Include="ScenarioTests\VMDynamicTests.ps1">
227231
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
228232
</None>
@@ -258,6 +262,18 @@
258262
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.DscExtensionTests\TestGetAzureRmVMDscExtension.json">
259263
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
260264
</None>
265+
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineBootDiagnosticsTests\TestLinuxVirtualMachineBootDiagnostics.json">
266+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
267+
</None>
268+
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineBootDiagnosticsTests\TestVirtualMachineBootDiagnostics.json">
269+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
270+
</None>
271+
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineBootDiagnosticsTests\TestVirtualMachineBootDiagnosticsPremium.json">
272+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
273+
</None>
274+
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineBootDiagnosticsTests\TestVirtualMachineBootDiagnosticsSet.json">
275+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
276+
</None>
261277
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineExtensionTests\TestVirtualMachineAccessExtension.json">
262278
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
263279
</None>

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@ function Test-AddVhd
6464

6565
$destBlobHandle = GetBlobHandle $vhdDestUri $storageKey.Key1;
6666
Assert-True {VerifyMD5hash $destBlobHandle $testItem.md5hash};
67+
68+
$vhdDownloadPath = $vhdLocalPath + "-download.vhd";
69+
70+
$vhdDownloadContext = Save-AzureRmVhd -ResourceGroupName $rgname -SourceUri $vhdDestUri -LocalFilePath $vhdDownloadPath;
71+
Write-Output ("Source :" +$vhdDownloadContext.Source);
72+
Write-Output ("LocalFilePath :" +$vhdDownloadContext.LocalFilePath);
73+
Assert-AreEqual $vhdDestUri $vhdDownloadContext.Source;
74+
Assert-AreEqual $vhdDownloadPath $vhdDownloadContext.LocalFilePath;
75+
76+
$vhdDownloadContext = Save-AzureRmVhd -ResourceGroupName $rgname -SourceUri $vhdDestUri -LocalFilePath $vhdDownloadPath -Overwrite;
77+
Assert-AreEqual $vhdDestUri $vhdDownloadContext.Source;
78+
Assert-AreEqual $vhdDownloadPath $vhdDownloadContext.LocalFilePath;
6779
}
6880
}
6981
finally

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,3 +466,18 @@ function Get-ComputePublisherLocation
466466
{
467467
Get-ResourceProviderLocation "Microsoft.Compute/locations/publishers";
468468
}
469+
470+
function Get-SubscriptionIdFromResourceGroup
471+
{
472+
param ([string] $rgname)
473+
474+
$rg = Get-AzureRmResourceGroup -ResourceGroupName $rgname;
475+
476+
$rgid = $rg.ResourceId;
477+
478+
# ResouceId is a form of "/subscriptions/<subId>/resourceGroups/<resourgGroupName>"
479+
# So return the second part to get subscription Id
480+
$first = $rgid.IndexOf('/', 1);
481+
$last = $rgid.IndexOf('/', $first + 1);
482+
return $rgid.Substring($first + 1, $last - $first - 1);
483+
}

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/Generated/VirtualMachineDynamicTest1.ps1

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@
1818
# code is regenerated.
1919

2020

21+
$global:ps_test_tag_name = 'crptestps6050'
22+
23+
2124
function get_vm_config_object
2225
{
2326
param ([string] $rgname, [string] $vmsize)
2427

2528
$st = Write-Verbose "Creating VM Config Object - Start";
2629

27-
$vmname = 'vm' + $rgname;
30+
$vmname = $rgname + 'vm';
2831
$p = New-AzureRmVMConfig -VMName $vmname -VMSize $vmsize;
2932

3033
$st = Write-Verbose "Creating VM Config Object - End";
@@ -39,12 +42,13 @@ function get_created_storage_account_name
3942

4043
$st = Write-Verbose "Creating and getting storage account for '${loc}' and '${rgname}' - Start";
4144

42-
$stoname = 'sto' + $rgname;
45+
$stoname = $rgname + 'sto';
4346
$stotype = 'Standard_GRS';
4447

4548
$st = Write-Verbose "Creating and getting storage account for '${loc}' and '${rgname}' - '${stotype}' & '${stoname}'";
4649

4750
$st = New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype;
51+
$st = Set-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Tags (Get-ComputeTestTag $global:ps_test_tag_name);
4852
$st = Get-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname;
4953

5054
$st = Write-Verbose "Creating and getting storage account for '${loc}' and '${rgname}' - End";
@@ -59,14 +63,14 @@ function create_and_setup_nic_ids
5963

6064
$st = Write-Verbose "Creating and getting NICs for '${loc}' and '${rgname}' - Start";
6165

62-
$subnet = New-AzureRmVirtualNetworkSubnetConfig -Name ('subnet' + $rgname) -AddressPrefix "10.0.0.0/24";
63-
$vnet = New-AzureRmVirtualNetwork -Force -Name ('vnet' + $rgname) -ResourceGroupName $rgname -Location $loc -AddressPrefix "10.0.0.0/16" -DnsServer "10.1.1.1" -Subnet $subnet;
64-
$vnet = Get-AzureRmVirtualNetwork -Name ('vnet' + $rgname) -ResourceGroupName $rgname;
66+
$subnet = New-AzureRmVirtualNetworkSubnetConfig -Name ($rgname + 'subnet') -AddressPrefix "10.0.0.0/24";
67+
$vnet = New-AzureRmVirtualNetwork -Force -Name ($rgname + 'vnet') -ResourceGroupName $rgname -Location $loc -AddressPrefix "10.0.0.0/16" -DnsServer "10.1.1.1" -Subnet $subnet -Tag (Get-ComputeTestTag $global:ps_test_tag_name);
68+
$vnet = Get-AzureRmVirtualNetwork -Name ($rgname + 'vnet') -ResourceGroupName $rgname;
6569
$subnetId = $vnet.Subnets[0].Id;
6670
$nic_ids = @($null) * 1;
67-
$nic0 = New-AzureRmNetworkInterface -Force -Name ('nic0' + $rgname) -ResourceGroupName $rgname -Location $loc -SubnetId $subnetId;
71+
$nic0 = New-AzureRmNetworkInterface -Force -Name ($rgname + 'nic0') -ResourceGroupName $rgname -Location $loc -SubnetId $subnetId -Tag (Get-ComputeTestTag $global:ps_test_tag_name);
6872
$nic_ids[0] = $nic0.Id;
69-
$vmconfig = Add-AzureRmVMNetworkInterface -VM $vmconfig -Id $nic0.Id -Primary;
73+
$vmconfig = Add-AzureRmVMNetworkInterface -VM $vmconfig -Id $nic0.Id;
7074
$st = Write-Verbose "Creating and getting NICs for '${loc}' and '${rgname}' - End";
7175

7276
return $nic_ids;
@@ -81,10 +85,10 @@ function create_and_setup_vm_config_object
8185
$vmconfig = get_vm_config_object $rgname $vmsize
8286

8387
$user = "Foo12";
84-
$password = "BaR#123" + $rgname;
88+
$password = $rgname + "BaR#123";
8589
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
8690
$cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
87-
$computerName = "cn" + $rgname;
91+
$computerName = $rgname + "cn";
8892
$vmconfig = Set-AzureRmVMOperatingSystem -VM $vmconfig -Windows -ComputerName $computerName -Credential $cred;
8993

9094
$st = Write-Verbose "Creating and setting up the VM config object for '${loc}', '${rgname}' and '${vmsize}' - End";
@@ -118,20 +122,20 @@ function setup_image_and_disks
118122
}
119123

120124

121-
function ps_vm_dynamic_test_func_1_pstestrg592
125+
function ps_vm_dynamic_test_func_1_crptestps5352
122126
{
123127
# Setup
124-
$rgname = 'pstestrg592';
128+
$rgname = 'crptestps5352';
125129

126130
try
127131
{
128-
$loc = 'Japan East';
129-
$vmsize = 'Standard_A2';
132+
$loc = 'East US 2';
133+
$vmsize = 'Standard_A1';
130134

131-
$st = Write-Verbose "Running Test ps_vm_dynamic_test_func_1_pstestrg592 - Start ${rgname}, ${loc} & ${vmsize}";
135+
$st = Write-Verbose "Running Test ps_vm_dynamic_test_func_1_crptestps5352 - Start ${rgname}, ${loc} & ${vmsize}";
132136

133-
$st = Write-Verbose 'Running Test ps_vm_dynamic_test_func_1_pstestrg592 - Creating Resource Group';
134-
$st = New-AzureRmResourceGroup -Location $loc -Name $rgname -Force;
137+
$st = Write-Verbose 'Running Test ps_vm_dynamic_test_func_1_crptestps5352 - Creating Resource Group';
138+
$st = New-AzureRmResourceGroup -Location $loc -Name $rgname -Tag (Get-ComputeTestTag $global:ps_test_tag_name) -Force;
135139

136140
$vmconfig = create_and_setup_vm_config_object $loc $rgname $vmsize;
137141

@@ -145,20 +149,21 @@ function ps_vm_dynamic_test_func_1_pstestrg592
145149
$st = setup_image_and_disks $loc $rgname $stoname $vmconfig;
146150

147151
# Virtual Machine
148-
$st = Write-Verbose 'Running Test ps_vm_dynamic_test_func_1_pstestrg592 - Creating VM';
152+
$st = Write-Verbose 'Running Test ps_vm_dynamic_test_func_1_crptestps5352 - Creating VM';
149153

150-
$vmname = 'vm' + $rgname;
151-
$st = New-AzureRmVM -ResourceGroupName $rgname -Location $loc -VM $vmconfig;
154+
$vmname = $rgname + 'vm';
155+
156+
$st = New-AzureRmVM -ResourceGroupName $rgname -Location $loc -VM $vmconfig -Tags (Get-ComputeTestTag $global:ps_test_tag_name);
152157

153158
# Get VM
154-
$st = Write-Verbose 'Running Test ps_vm_dynamic_test_func_1_pstestrg592 - Getting VM';
159+
$st = Write-Verbose 'Running Test ps_vm_dynamic_test_func_1_crptestps5352 - Getting VM';
155160
$vm1 = Get-AzureRmVM -Name $vmname -ResourceGroupName $rgname;
156161

157162
# Remove
158-
$st = Write-Verbose 'Running Test ps_vm_dynamic_test_func_1_pstestrg592 - Removing VM';
163+
$st = Write-Verbose 'Running Test ps_vm_dynamic_test_func_1_crptestps5352 - Removing VM';
159164
$st = Remove-AzureRmVM -Name $vmname -ResourceGroupName $rgname -Force;
160165

161-
$st = Write-Verbose 'Running Test ps_vm_dynamic_test_func_1_pstestrg592 - End';
166+
$st = Write-Verbose 'Running Test ps_vm_dynamic_test_func_1_crptestps5352 - End';
162167
}
163168
finally
164169
{

0 commit comments

Comments
 (0)