Skip to content

Commit 561679e

Browse files
scenario test
1 parent 56b0773 commit 561679e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,30 @@ function Test-SimpleNewVm
3838
Clean-ResourceGroup $vmname
3939
}
4040
}
41+
42+
<#
43+
.SYNOPSIS
44+
Test Simple Paremeter Set for New Vm with availability sets
45+
#>
46+
function Test-SimpleNewVmAvailabilitySet
47+
{
48+
# Setup
49+
$vmname = Get-ResourceName
50+
51+
try
52+
{
53+
$username = "admin01"
54+
$password = "werWER345#%^" | ConvertTo-SecureString -AsPlainText -Force
55+
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $password
56+
57+
# Common
58+
$x = New-AzureRmVM -Name $vmname -Credential $cred -AvailabilitySetName $vmname
59+
60+
Assert-AreEqual $vmname $x.Name;
61+
}
62+
finally
63+
{
64+
# Cleanup
65+
Clean-ResourceGroup $vmname
66+
}
67+
}

0 commit comments

Comments
 (0)