-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add missing tests for express route and couple bug fix #1861
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
13a2cd6
#4911154 Update all commands to use ExpressRouteCircuit for consisten…
dihan0604 1792c88
Enable test for create peering
dihan0604 28a8add
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
dihan0604 49cd334
Add missing test: create ER gateway and create ER connection
dihan0604 edc7bc6
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
dihan0604 b0d989d
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
dihan0604 772e29f
Add missing scenarios and bug fix for ER
dihan0604 52af88d
remove stats APIs
dihan0604 0f71511
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
dihan0604 7f88ae5
Fix Tab with 4 space
dihan0604 0edc79e
change format
dihan0604 9837ca7
Add extra space to make it look better
dihan0604 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,51 @@ | |
| # limitations under the License. | ||
| # ---------------------------------------------------------------------------------- | ||
|
|
||
| <# | ||
| .SYNOPSIS | ||
| Virtual network express route gateway connection tests | ||
| #> | ||
| function Test-VirtualNetworkeExpressRouteGatewayConnectionCRUD | ||
| { | ||
| # Setup | ||
| $rgname = "onesdkTestConnection" | ||
| $vnetConnectionName = Get-ResourceName | ||
| $location = "westus" | ||
| try | ||
| { | ||
| # Get the resource group | ||
| $resourceGroup = Get-AzureRmResourceGroup -Name $rgname | ||
| Assert-NotNull $resourceGroup | ||
| # Get Gateway | ||
| $gw = Get-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname | ||
| Assert-AreEqual 1 @($gw).Count | ||
| # Get Circuit | ||
| $circuit = Get-AzureRmExpressRouteCircuit -ResourceGroupName $rgname | ||
| Assert-AreEqual 1 @($circuit).Count | ||
|
|
||
| # Create & Get VirtualNetworkGatewayConnection | ||
| $actual = New-AzureRmVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName -location $location -VirtualNetworkGateway1 $gw -ConnectionType ExpressRoute -RoutingWeight 3 -PeerId $circuit.Id | ||
|
Contributor
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. @dihan0604 please change the indentation in this file (replace Tabs to 4 spaces) |
||
| $expected = Get-AzureRmVirtualNetworkGatewayConnection -ResourceGroupName $rgname -name $vnetConnectionName | ||
| Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName | ||
| Assert-AreEqual $expected.Name $actual.Name | ||
| Assert-AreEqual "ExpressRoute" $expected.ConnectionType | ||
| Assert-AreEqual "3" $expected.RoutingWeight | ||
|
|
||
|
|
||
| # Delete VirtualNetworkGatewayConnection | ||
| $delete = Remove-AzureRmVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName -name $vnetConnectionName -PassThru -Force | ||
| Assert-AreEqual true $delete | ||
|
|
||
| $list = Get-AzureRmVirtualNetworkGatewayConnection -ResourceGroupName $actual.ResourceGroupName | ||
| Assert-AreEqual 0 @($list).Count | ||
| } | ||
| finally | ||
| { | ||
| # Cleanup | ||
|
|
||
| } | ||
| } | ||
|
|
||
| <# | ||
| .SYNOPSIS | ||
| Virtual network gateway connection tests | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@dihan0604 please change the indentation in this file (replace Tabs to 4 spaces)