Skip to content

Commit 861384b

Browse files
committed
add tests for finding dependency of Az module from ACR and MAR
1 parent e3b7006 commit 861384b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/FindPSResourceTests/FindPSResourceContainerRegistryServer.Tests.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,12 @@ Describe 'Test HTTP Find-PSResource for ACR Server Protocol' -tags 'CI' {
227227
$res.Version | Should -Be "1.0.0"
228228
$res.Type.ToString() | Should -Be "Script"
229229
}
230+
231+
It "Should find resource with dependency, given Name and Version" {
232+
$res = Find-PSResource -Name "Az.Storage" -Version "8.0.0" -Repository $ACRRepoName
233+
$res.Dependencies.Length | Should -Be 1
234+
$res.Dependencies[0].Name | Should -Be "Az.Accounts"
235+
}
230236
}
231237

232238
Describe 'Test Find-PSResource for MAR Repository' -tags 'CI' {
@@ -245,4 +251,10 @@ Describe 'Test Find-PSResource for MAR Repository' -tags 'CI' {
245251
$res.Name | Should -Be "Az.Accounts"
246252
$res.Version | Should -Be "3.0.4"
247253
}
254+
255+
It "Should find resource and its dependency given specific Name and Version" {
256+
$res = Find-PSResource -Name "Az.Storage" -Version "8.0.0" -Repository "MAR"
257+
$res.Dependencies.Length | Should -Be 1
258+
$res.Dependencies[0].Name | Should -Be "Az.Accounts"
259+
}
248260
}

0 commit comments

Comments
 (0)