Fix group prefix conditional in test resource removal (#6465)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
Azure SDK Bot 2025-03-13 16:53:02 -07:00 committed by GitHub
parent 63d575d179
commit 7a1eb828cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -223,8 +223,8 @@ function Remove-WormStorageAccounts() {
# DO NOT REMOVE THIS
# We call this script from live test pipelines as well, and a string mismatch/error could blow away
# some static storage accounts we rely on
if (!$groupPrefix -or ($CI -and !$GroupPrefix.StartsWith('rg-'))) {
throw "The -GroupPrefix parameter must not be empty, or must start with 'rg-' in CI contexts"
if (!$groupPrefix -or ($CI -and (!$GroupPrefix.StartsWith('rg-') -and !$GroupPrefix.StartsWith('SSS3PT_rg-')))) {
throw "The -GroupPrefix parameter must not be empty, or must start with 'rg-' or 'SSS3PT_rg-' in CI contexts"
}
$groups = Get-AzResourceGroup | Where-Object { $_.ResourceGroupName.StartsWith($GroupPrefix) } | Where-Object { $_.ProvisioningState -ne 'Deleting' }