Skip to content

Commit 0c54646

Browse files
azure-sdkckairen
andauthored
Sync eng/common directory with azure-sdk-tools for PR 4543 (Azure#31794)
* stress test addons version check * cleanup Co-authored-by: Albert Cheng <albertcheng@microsoft.com>
1 parent 6807e41 commit 0c54646

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

eng/common/scripts/stress-testing/find-all-stress-packages.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ function FindStressPackages(
3636
}
3737
foreach ($chartFile in $chartFiles) {
3838
$chart = ParseChart $chartFile
39+
40+
VerifyAddonsVersion $chart
3941
if (matchesAnnotations $chart $filters) {
4042
$matrixFilePath = (Join-Path $chartFile.Directory.FullName $MatrixFileName)
4143
if (Test-Path $matrixFilePath) {
@@ -73,6 +75,15 @@ function MatchesAnnotations([hashtable]$chart, [hashtable]$filters) {
7375
return $true
7476
}
7577

78+
function VerifyAddonsVersion([hashtable]$chart) {
79+
foreach ($dependency in $chart.dependencies) {
80+
if ($dependency.name -eq "stress-test-addons" -and
81+
$dependency.version -lt "0.2.0") {
82+
throw "The stress-test-addons version in use is $($dependency.version), please use versions >= 0.2.0"
83+
}
84+
}
85+
}
86+
7687
function GetUsername() {
7788
# Check GITHUB_USER for users in codespaces environments, since the default user is `codespaces` and
7889
# we would like to avoid namespace overlaps for different codespaces users.

0 commit comments

Comments
 (0)