Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/code/PSResourceInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ public static bool TryConvertFromContainerRegistryJson(
metadata["Dependencies"] = ParseContainerRegistryDependencies(requiredModulesElement, out errorMsg).ToArray();
}

if (string.Equals(packageName, "Az", StringComparison.OrdinalIgnoreCase) || packageName.StartsWith("Az.", StringComparison.OrdinalIgnoreCase))
if (string.Equals(packageName, "Az", StringComparison.OrdinalIgnoreCase) || string.Equals(packageName, "Azpreview", StringComparison.OrdinalIgnoreCase) || packageName.StartsWith("Az.", StringComparison.OrdinalIgnoreCase))
{
if (rootDom.TryGetProperty("ModuleList", out JsonElement moduleListDepsElement))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,17 @@ Describe 'Test Find-PSResource for MAR Repository' -tags 'CI' {
It "Should find resource given specific Name, Version null" {
$res = Find-PSResource -Name "Az.Accounts" -Repository "MAR"
$res.Name | Should -Be "Az.Accounts"
$res.Version | Should -Be "4.0.0"
$res.Version | Should -Be "4.0.2"
}

It "Should find resource and its dependency given specific Name and Version" {
$res = Find-PSResource -Name "Az.Storage" -Version "8.0.0" -Repository "MAR"
$res.Dependencies.Length | Should -Be 1
$res.Dependencies[0].Name | Should -Be "Az.Accounts"
}

It "Should find Azpreview resource and it's dependency given specific Name and Version" {
$res = Find-PSResource -Name "Azpreview" -Version "13.2.0" -Repository "MAR"
$res.Dependencies.Length | Should -Not -Be 0
}
}
Loading