Skip to content

Commit 1f7312f

Browse files
azure-sdkbenbp
andauthored
Fix group prefix conditional in test resource removal (Azure#40067)
Co-authored-by: Ben Broderick Phillips <[email protected]>
1 parent 6b747ae commit 1f7312f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

eng/common/scripts/Helpers/Resource-Helpers.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ function Remove-WormStorageAccounts() {
223223
# DO NOT REMOVE THIS
224224
# We call this script from live test pipelines as well, and a string mismatch/error could blow away
225225
# some static storage accounts we rely on
226-
if (!$groupPrefix -or ($CI -and !$GroupPrefix.StartsWith('rg-'))) {
227-
throw "The -GroupPrefix parameter must not be empty, or must start with 'rg-' in CI contexts"
226+
if (!$groupPrefix -or ($CI -and (!$GroupPrefix.StartsWith('rg-') -and !$GroupPrefix.StartsWith('SSS3PT_rg-')))) {
227+
throw "The -GroupPrefix parameter must not be empty, or must start with 'rg-' or 'SSS3PT_rg-' in CI contexts"
228228
}
229229

230230
$groups = Get-AzResourceGroup | Where-Object { $_.ResourceGroupName.StartsWith($GroupPrefix) } | Where-Object { $_.ProvisioningState -ne 'Deleting' }

0 commit comments

Comments
 (0)