Skip to content

Commit d3c50b6

Browse files
author
Maddie Clayton
authored
Merge pull request Azure#7185 from henry416/ovpn
Order of Operations for OVPN test
2 parents f6a2882 + 8091a46 commit d3c50b6

File tree

3 files changed

+8073
-7257
lines changed

3 files changed

+8073
-7257
lines changed

src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkGatewayTests.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ param
200200
Assert-AreEqual "RouteBased" $expected.VpnType
201201

202202
# Update P2S VPNClient Configuration
203+
#[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine")]
203204
$Secure_String_Pwd = ConvertTo-SecureString "TestRadiusServerPassword" -AsPlainText -Force
204205
Set-AzureRmVirtualNetworkGatewayVpnClientConfig -VirtualNetworkGateway $expected -VpnClientAddressPool 200.168.0.0/16 -RadiusServerAddress "TestRadiusServer" -RadiusServerSecret $Secure_String_Pwd
205206
$expected = Get-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname
@@ -658,8 +659,11 @@ function Test-VirtualNetworkGatewayOpenVPN
658659
$vnetIpConfig = New-AzureRmVirtualNetworkGatewayIpConfig -Name $vnetGatewayConfigName -PublicIpAddress $publicip -Subnet $subnet
659660

660661
# Create & Get OpenVPN virtualnetworkgateway
661-
New-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname -location $location -IpConfigurations $vnetIpConfig -GatewayType Vpn -VpnType RouteBased -EnableBgp $false -GatewaySku VpnGw1 -VpnClientAddressPool 201.169.0.0/16 -VpnClientRootCertificates $rootCert -VpnClientProtocol OpenVPN
662+
New-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname -location $location -IpConfigurations $vnetIpConfig -GatewayType Vpn -VpnType RouteBased -EnableBgp $false -GatewaySku VpnGw1 -VpnClientAddressPool 201.169.0.0/16 -VpnClientRootCertificates $rootCert
662663
$actual = Get-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname
664+
Set-AzureRmVirtualNetworkGateway -VirtualNetworkGateway $actual -VpnClientProtocol OpenVPN
665+
$actual = Get-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname
666+
663667
Assert-AreEqual "VpnGw1" $actual.Sku.Tier
664668
$protocols = $actual.VpnClientConfiguration.VpnClientProtocols
665669
Assert-AreEqual 1 @($protocols).Count

src/ResourceManager/Network/Commands.Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.VirtualNetworkGatewayTests/VirtualNetworkGatewayOpenVPNTest.json

Lines changed: 3551 additions & 2055 deletions
Large diffs are not rendered by default.

src/ResourceManager/Network/Commands.Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.VirtualNetworkGatewayTests/VirtualNetworkGatewayRouteApiTest.json

Lines changed: 4517 additions & 5201 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)