Skip to content

Commit d975d79

Browse files
committed
Fix AzureRT test in dogfood
1 parent 20f6a85 commit d975d79

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/ServiceManagement/Compute/Commands.ServiceManagement.Test/FunctionalTests/ServiceManagementCmdletTestHelper.cs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,18 +1596,11 @@ public string GetAzureVMImageName(string[] keywords, bool exactMatch = true, int
15961596
Collection<SM.OSImageContext> vmImages = GetAzureVMImage();
15971597
foreach (SM.OSImageContext image in vmImages)
15981598
{
1599-
if (Utilities.MatchKeywords(image.ImageName, keywords, exactMatch) >= 0
1599+
if ((Utilities.MatchKeywords(image.ImageName, keywords, exactMatch) >= 0
1600+
|| Utilities.MatchKeywords(image.OS, keywords, exactMatch) >= 0)
16001601
&& ((diskSize == null) || (image.LogicalSizeInGB <= diskSize))
1601-
&& image.Location.Contains(CredentialHelper.Location)
1602-
&& image.ImageFamily.Contains("Server"))
1603-
return image.ImageName;
1604-
}
1605-
foreach (SM.OSImageContext image in vmImages)
1606-
{
1607-
if (Utilities.MatchKeywords(image.OS, keywords, exactMatch) >= 0
1608-
&& ((diskSize == null) || (image.LogicalSizeInGB <= diskSize))
1609-
&& image.Location.Contains(CredentialHelper.Location)
1610-
&& image.ImageFamily.Contains("Server"))
1602+
&& Utilities.MatchKeywords(image.Location, new [] {CredentialHelper.Location}, exactMatch) >= 0
1603+
&& Utilities.MatchKeywords(image.ImageFamily, new [] {"Server"}, exactMatch) >= 0)
16111604
return image.ImageName;
16121605
}
16131606
return null;

0 commit comments

Comments
 (0)