Skip to content

Commit

Permalink
Support regex/negative regex filters for stress test discovery. Add s…
Browse files Browse the repository at this point in the history
…torage env defaults (#44936)

Co-authored-by: Ben Broderick Phillips <[email protected]>
  • Loading branch information
azure-sdk and benbp authored Jul 11, 2024
1 parent 4eaf6ed commit 7bbfed8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
Expand Down

0 comments on commit 7bbfed8

Please sign in to comment.