@@ -113,7 +113,6 @@ function Test-NetworkInterfaceCRUD
113113 try
114114 {
115115 # Create the resource group
116- $resourceGroup = New-AzureRmResourceGroup - Name $rgname - Location $rglocation - Tags @ { testtag = " testval" }
117116
118117 # Create the Virtual Network
119118 $subnet = New-AzureRmVirtualNetworkSubnetConfig - Name $subnetName - AddressPrefix 10.0 .1.0 / 24
@@ -811,22 +810,21 @@ Tests creating new simple public networkinterface.
811810#>
812811function Test-NetworkInterfaceWithAcceleratedNetworking
813812{
814- # Setup
813+ # Setup
815814 $rgname = Get-ResourceGroupName
816815 $vnetName = Get-ResourceName
817816 $subnetName = Get-ResourceName
818817 $publicIpName = Get-ResourceName
819818 $nicName = Get-ResourceName
820819 $domainNameLabel = Get-ResourceName
821- $rglocation = " WestCentralUS "
820+ $rglocation = " westcentralus "
822821 $resourceTypeParent = " Microsoft.Network/networkInterfaces"
823- $location = " WestCentralUS "
822+ $location = " westcentralus "
824823
825824 try
826825 {
827826 # Create the resource group
828827 $resourceGroup = New-AzureRmResourceGroup - Name $rgname - Location $rglocation - Tags @ { testtag = " testval" }
829-
830828 # Create the Virtual Network
831829 $subnet = New-AzureRmVirtualNetworkSubnetConfig - Name $subnetName - AddressPrefix 10.0 .1.0 / 24
832830 $vnet = New-AzureRmvirtualNetwork - Name $vnetName - ResourceGroupName $rgname - Location $location - AddressPrefix 10.0 .0.0 / 16 - Subnet $subnet
@@ -835,11 +833,9 @@ function Test-NetworkInterfaceWithAcceleratedNetworking
835833 $publicip = New-AzureRmPublicIpAddress - ResourceGroupName $rgname - name $publicIpName - location $location - AllocationMethod Dynamic - DomainNameLabel $domainNameLabel
836834
837835 # Create NetworkInterface
838- $actualNic = New-AzureRmNetworkInterface - Name $nicName - ResourceGroupName $rgname - Location $location - Subnet $vnet.Subnets [0 ] - PublicIpAddress $publicip - AcceleratedNetworkingEnabled
836+ $actualNic = New-AzureRmNetworkInterface - Name $nicName - ResourceGroupName $rgname - Location $location - Subnet $vnet.Subnets [0 ] - PublicIpAddress $publicip - EnableAcceleratedNetworking
839837 $expectedNic = Get-AzureRmNetworkInterface - Name $nicName - ResourceGroupName $rgname
840838
841- $setNic = $actualNic | Set-AzureRmNetworkInterface
842-
843839 Assert-AreEqual $expectedNic.ResourceGroupName $actualNic.ResourceGroupName
844840 Assert-AreEqual $expectedNic.Name $actualNic.Name
845841 Assert-AreEqual $expectedNic.Location $actualNic.Location
@@ -849,8 +845,9 @@ function Test-NetworkInterfaceWithAcceleratedNetworking
849845 Assert-AreEqual $expectedNic.IpConfigurations [0 ].PublicIpAddress.Id $actualNic.IpConfigurations [0 ].PublicIpAddress.Id
850846 Assert-AreEqual $expectedNic.IpConfigurations [0 ].Subnet.Id $actualNic.IpConfigurations [0 ].Subnet.Id
851847 Assert-NotNull $expectedNic.IpConfigurations [0 ].PrivateIpAddress
848+ Assert-AreEqual $expectedNic.EnableAcceleratedNetworking $true
852849 Assert-AreEqual " Dynamic" $expectedNic.IpConfigurations [0 ].PrivateIpAllocationMethod
853- Assert-AreEqual $expectedNic .AcceleratedNetworkingEnabled $true
850+
854851
855852 # Check publicIp address reference
856853 $publicip = Get-AzureRmPublicIpAddress - ResourceGroupName $rgname - name $publicIpName
0 commit comments