-
Notifications
You must be signed in to change notification settings - Fork 3
Dev #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev #28
Changes from all commits
c0eaaf5
ef1956a
e443703
b8ec404
008d390
d12bbe4
f50eca8
03d2356
4c41b3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,12 @@ function Test-VirtualMachine | |
Assert-AreEqual $p.NetworkProfile.NetworkInterfaces.Count 1; | ||
Assert-AreEqual $p.NetworkProfile.NetworkInterfaces[0].ReferenceUri $nicId; | ||
|
||
# Adding the same Nic but not set it Primary | ||
$p = Add-AzureVMNetworkInterface -VM $p -Id $nicId -Primary; | ||
Assert-AreEqual $p.NetworkProfile.NetworkInterfaces.Count 1; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was already one NIC in the network profile, and now you add another one, why is there still only one NIC? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is adding the same nic ID. I updated the code such that if the same nic is added, it does not add and only update Primary value (if it is changed). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok. maybe better to add comments for it. |
||
Assert-AreEqual $p.NetworkProfile.NetworkInterfaces[0].ReferenceUri $nicId; | ||
Assert-AreEqual $p.NetworkProfile.NetworkInterfaces[0].Primary $true; | ||
|
||
# Storage Account (SA) | ||
$stoname = 'sto' + $rgname; | ||
$stotype = 'Standard_GRS'; | ||
|
@@ -765,7 +771,10 @@ function Test-VirtualMachineCapture | |
Set-AzureVM -Generalize -ResourceGroupName $rgname -Name $vmname; | ||
|
||
$dest = Get-ComputeTestResourceName; | ||
Save-AzureVMImage -ResourceGroupName $rgname -VMName $vmname -DestinationContainerName $dest -VHDNamePrefix 'pslib' -Overwrite; | ||
$templatePath = ".\template.txt"; | ||
Save-AzureVMImage -ResourceGroupName $rgname -VMName $vmname -DestinationContainerName $dest -VHDNamePrefix 'pslib' -Overwrite -Path $templatePath; | ||
$template = Get-Content $templatePath; | ||
Assert-True { $template[1].Contains("$schema"); } | ||
|
||
# Remove | ||
Remove-AzureVM -ResourceGroupName $rgname -Name $vmname -Force; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are duplicating the codes a bit too much. So, it's hard to see the actual change, :-|
At some point of time, let's clean up the test code....