Skip to content

Commit 5978c66

Browse files
unknownunknown
authored andcommitted
Revert "Add test for piping of Remove-AzureVMDataDisk and Remove-AzureVMNetworkInterface"
This reverts commit 0bcc52d. Conflicts: src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.format.generated.ps1xml
1 parent c4d82a3 commit 5978c66

File tree

2 files changed

+3
-40
lines changed

2 files changed

+3
-40
lines changed

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

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,14 @@ function Test-VirtualMachineProfile
2626

2727
# Network
2828
$ipname = 'hpfip' + ((Get-Random) % 10000);
29-
$ipRefUri1 = "https://test.foo.bar/$ipname";
29+
$ipRefUri = "https://test.foo.bar/$ipname";
3030
$nicName = $ipname + 'nic1';
3131
$publicIPName = $ipname + 'name1';
3232

33-
$p = Add-AzureVMNetworkInterface -VM $p -Id $ipRefUri1;
34-
35-
$ipname = 'hpfip' + ((Get-Random) % 10000);
36-
$ipRefUri2 = "https://test.foo.bar/$ipname";
37-
$p = Add-AzureVMNetworkInterface -VM $p -Id $ipRefUri2;
38-
39-
# Remove all NICs
40-
$p = $p | Remove-AzureVMNetworkInterface
41-
Assert-AreEqual $p.NetworkProfile.NetworkInterfaces.Count 0;
42-
43-
$p = Add-AzureVMNetworkInterface -VM $p -Id $ipRefUri1;
44-
$p = Add-AzureVMNetworkInterface -VM $p -Id $ipRefUri2;
45-
$p = Remove-AzureVMNetworkInterface -VM $p -Id $ipRefUri2;
33+
$p = Add-AzureVMNetworkInterface -VM $p -Id $ipRefUri;
4634

4735
Assert-AreEqual $p.NetworkProfile.NetworkInterfaces.Count 1;
48-
Assert-AreEqual $p.NetworkProfile.NetworkInterfaces[0].ReferenceUri $ipRefUri1;
36+
Assert-AreEqual $p.NetworkProfile.NetworkInterfaces[0].ReferenceUri $ipRefUri;
4937

5038
# Storage
5139
$stoname = 'hpfteststo' + ((Get-Random) % 10000);
@@ -78,23 +66,6 @@ function Test-VirtualMachineProfile
7866
Assert-AreEqual $p.StorageProfile.DataDisks[1].Lun 1;
7967
Assert-AreEqual $p.StorageProfile.DataDisks[1].VirtualHardDisk.Uri $dataDiskVhdUri2;
8068

81-
# Remove all data disks
82-
$p = $p | Remove-AzureVMDataDisk;
83-
Assert-AreEqual $p.StorageProfile.DataDisks.Count 0;
84-
85-
$p = Add-AzureVMDataDisk -VM $p -Name 'testDataDisk1' -Caching 'ReadOnly' -DiskSizeInGB 10 -Lun 0 -VhdUri $dataDiskVhdUri1 -CreateOption Empty;
86-
$p = Add-AzureVMDataDisk -VM $p -Name 'testDataDisk2' -Caching 'ReadOnly' -DiskSizeInGB 11 -Lun 1 -VhdUri $dataDiskVhdUri2 -CreateOption Empty;
87-
88-
Assert-AreEqual $p.StorageProfile.DataDisks.Count 2;
89-
Assert-AreEqual $p.StorageProfile.DataDisks[0].Caching 'ReadOnly';
90-
Assert-AreEqual $p.StorageProfile.DataDisks[0].DiskSizeGB 10;
91-
Assert-AreEqual $p.StorageProfile.DataDisks[0].Lun 0;
92-
Assert-AreEqual $p.StorageProfile.DataDisks[0].VirtualHardDisk.Uri $dataDiskVhdUri1;
93-
Assert-AreEqual $p.StorageProfile.DataDisks[1].Caching 'ReadOnly';
94-
Assert-AreEqual $p.StorageProfile.DataDisks[1].DiskSizeGB 11;
95-
Assert-AreEqual $p.StorageProfile.DataDisks[1].Lun 1;
96-
Assert-AreEqual $p.StorageProfile.DataDisks[1].VirtualHardDisk.Uri $dataDiskVhdUri2;
97-
9869
# Windows OS
9970
$user = "Foo12";
10071
$password = 'BaR@000' + ((Get-Random) % 10000);

src/ResourceManager/Compute/Commands.Compute/Microsoft.Azure.Commands.Compute.format.generated.ps1xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,6 @@
214214
<Label>StorageProfile</Label>
215215
<PropertyName>StorageProfileText</PropertyName>
216216
</ListItem>
217-
<ListItem>
218-
<Label>DataDiskNames</Label>
219-
<PropertyName>DataDiskNames</PropertyName>
220-
</ListItem>
221-
<ListItem>
222-
<Label>NetworkInterfaceIds</Label>
223-
<PropertyName>NetworkInterfaceIds</PropertyName>
224-
</ListItem>
225217
</ListItems>
226218
</ListEntry>
227219
</ListEntries>

0 commit comments

Comments
 (0)