Support regex/negative regex filters for stress test discovery. Add storage env defaults (#5779)
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
parent
b1207fc87a
commit
1143b6bf4d
@ -75,7 +75,7 @@ function ParseChart([string]$chartFile) {
|
||||
|
||||
function MatchesAnnotations([hashtable]$chart, [hashtable]$filters) {
|
||||
foreach ($filter in $filters.GetEnumerator()) {
|
||||
if (!$chart["annotations"] -or $chart["annotations"][$filter.Key] -ne $filter.Value) {
|
||||
if (!$chart["annotations"] -or $chart["annotations"][$filter.Key] -notmatch $filter.Value) {
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,6 +122,12 @@ function DeployStressTests(
|
||||
}
|
||||
$clusterGroup = 'rg-stress-cluster-prod'
|
||||
$subscription = 'Azure SDK Test Resources'
|
||||
} elseif ($environment -eq 'storage') {
|
||||
if ($clusterGroup -or $subscription) {
|
||||
Write-Warning "Overriding cluster group and subscription with defaults for 'storage' environment."
|
||||
}
|
||||
$clusterGroup = 'rg-stress-cluster-storage'
|
||||
$subscription = 'XClient'
|
||||
} elseif (!$clusterGroup -or !$subscription) {
|
||||
throw "clusterGroup and subscription parameters must be specified when deploying to an environment that is not pg or prod."
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user