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 (#5779)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
  • Loading branch information
azure-sdk and benbp committed Jul 11, 2024
1 parent b1207fc commit 1143b6b
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 1143b6b

Please sign in to comment.