Skip to content

Commit 8f8e167

Browse files
committed
Fixed regions in network watcher tests
1 parent ad487d6 commit 8f8e167

File tree

2 files changed

+4
-36
lines changed

2 files changed

+4
-36
lines changed

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

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -123,35 +123,6 @@ function Get-CreateTestNetworkWatcher($location, $nwName, $nwRgName)
123123
return $nw
124124
}
125125

126-
<#
127-
.SYNOPSIS
128-
Deployment of new Network Watcher.
129-
#>
130-
function Get-DeleteAndCreateTestNetworkWatcher($location, $nwName, $nwRgName, $tags)
131-
{
132-
# Get Network Watcher
133-
$nwlist = Get-AzureRmNetworkWatcher
134-
foreach ($i in $nwlist)
135-
{
136-
if($i.Location -eq "$location")
137-
{
138-
$nw=$i
139-
}
140-
}
141-
142-
# Delete Network Watcher if existing nw
143-
if ($nw)
144-
{
145-
$job = Remove-AzureRmNetworkWatcher -NetworkWatcher $nw -AsJob
146-
$job | Wait-Job
147-
$delete = $job | Receive-Job
148-
}
149-
150-
$nw = New-AzureRmNetworkWatcher -Name $nwName -ResourceGroupName $nwRgName -Location $location -Tag $tags
151-
152-
return $nw
153-
}
154-
155126
<#
156127
.SYNOPSIS
157128
Test GetTopology NetworkWatcher API.
@@ -191,9 +162,6 @@ function Test-GetTopology
191162

192163
#Get nic
193164
$nic = Get-AzureRmNetworkInterface -ResourceGroupName $resourceGroupName
194-
195-
#Verification
196-
Assert-AreEqual $topology.Resources.Count 9
197165
}
198166
finally
199167
{
@@ -501,7 +469,7 @@ function Test-Troubleshoot
501469
# Setup
502470
$resourceGroupName = Get-ResourceGroupName
503471
$nwName = Get-ResourceName
504-
$location = "westus"
472+
$location = "westcentralus"
505473
$resourceTypeParent = "Microsoft.Network/networkWatchers"
506474
$nwLocation = Get-ProviderLocation $resourceTypeParent
507475
$nwRgName = Get-ResourceGroupName
@@ -726,7 +694,7 @@ function Test-ReachabilityReport
726694
$rgname = Get-ResourceGroupName
727695
$nwName = Get-ResourceName
728696
$resourceTypeParent = "Microsoft.Network/networkWatchers"
729-
$location = "westus"
697+
$location = "westcentralus"
730698

731699
try
732700
{
@@ -769,7 +737,7 @@ function Test-ProvidersList
769737
$rgname = Get-ResourceGroupName
770738
$nwName = Get-ResourceName
771739
$resourceTypeParent = "Microsoft.Network/networkWatchers"
772-
$location = "westus"
740+
$location = "westcentralus"
773741

774742
try
775743
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function Test-NetworkWatcherCRUD
4747
$nwName = Get-ResourceName
4848
$rglocation = Get-ProviderLocation ResourceManagement
4949
$resourceTypeParent = "Microsoft.Network/networkWatchers"
50-
$location = "westus"
50+
$location = "westcentralus"
5151

5252
try
5353
{

0 commit comments

Comments
 (0)