From 051f08b9bcfd3ea388802197cc64f8309daf1faa Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 5 Apr 2023 14:58:34 -0700 Subject: [PATCH] Fix regression - base name overrides in CI (#4520) Co-authored-by: Ben Broderick Phillips --- eng/common/TestResources/SubConfig-Helpers.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/common/TestResources/SubConfig-Helpers.ps1 b/eng/common/TestResources/SubConfig-Helpers.ps1 index f87b088c3dd..4ef744828b8 100644 --- a/eng/common/TestResources/SubConfig-Helpers.ps1 +++ b/eng/common/TestResources/SubConfig-Helpers.ps1 @@ -23,6 +23,12 @@ function GetBaseAndResourceGroupNames( [string]$serviceDirectoryName, [bool]$CI ) { + if ($baseNameDefault) { + $base = $baseNameDefault.ToLowerInvariant() + $group = $resourceGroupNameDefault ? $resourceGroupNameDefault : ("rg-$baseNameDefault".ToLowerInvariant()) + return $base, $group + } + if ($CI) { $base = 't' + (New-Guid).ToString('n').Substring(0, 16) # Format the resource group name based on resource group naming recommendations and limitations. @@ -37,12 +43,6 @@ function GetBaseAndResourceGroupNames( return $base, $group } - if ($baseNameDefault) { - $base = $baseNameDefault.ToLowerInvariant() - $group = $resourceGroupNameDefault ? $resourceGroupNameDefault : ("rg-$baseNameDefault".ToLowerInvariant()) - return $base, $group - } - # Handle service directories in nested directories, e.g. `data/aztables` $serviceDirectorySafeName = $serviceDirectoryName -replace '[\./\\]', '' # Seed off resource group name if set to avoid name conflicts with deployments where it is not set