Skip to content

Commit 3a5dcb8

Browse files
committed
Added function to get canary location for network watcher tests
1 parent 6d510f9 commit 3a5dcb8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

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

126+
function Get-CanaryLocation
127+
{
128+
Get-Location "Microsoft.Network" "networkWatchers" "centraluseuap";
129+
}
130+
126131
<#
127132
.SYNOPSIS
128133
Test GetTopology NetworkWatcher API.
@@ -180,7 +185,7 @@ function Test-GetSecurityGroupView
180185
# Setup
181186
$resourceGroupName = Get-ResourceGroupName
182187
$nwName = Get-ResourceName
183-
$location = "centraluseuap"
188+
$location = Get-CanaryLocation
184189
$resourceTypeParent = "Microsoft.Network/networkWatchers"
185190
$nwLocation = Get-ProviderLocation $resourceTypeParent
186191
$nwRgName = Get-ResourceGroupName
@@ -372,7 +377,7 @@ function Test-PacketCapture
372377
# Setup
373378
$resourceGroupName = Get-ResourceGroupName
374379
$nwName = Get-ResourceName
375-
$location = "centraluseuap"
380+
$location = Get-CanaryLocation
376381
$resourceTypeParent = "Microsoft.Network/networkWatchers"
377382
$nwLocation = Get-ProviderLocation $resourceTypeParent
378383
$nwRgName = Get-ResourceGroupName
@@ -773,7 +778,7 @@ function Test-ConnectionMonitor
773778
# Setup
774779
$resourceGroupName = Get-ResourceGroupName
775780
$nwName = Get-ResourceName
776-
$location = "centraluseuap"
781+
$location = Get-CanaryLocation
777782
$resourceTypeParent = "Microsoft.Network/networkWatchers"
778783
$nwLocation = Get-ProviderLocation $resourceTypeParent
779784
$nwRgName = Get-ResourceGroupName

0 commit comments

Comments
 (0)