Skip to content

Commit 3576998

Browse files
Add test to find from unauthenticated ACR
1 parent d0d345d commit 3576998

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/FindPSResourceTests/FindPSResourceContainerRegistryServer.Tests.ps1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,3 +256,19 @@ Describe 'Test Find-PSResource for MAR Repository' -tags 'CI' {
256256
$res.Dependencies[0].Name | Should -Be "Az.Accounts"
257257
}
258258
}
259+
260+
Describe 'Test Find-PSResource for unauthenticated ACR repository' -tags 'CI' {
261+
BeforeAll {
262+
Register-PSResourceRepository -Name "Unauthenticated" -Uri "https://psresourcegetnoauth.azurecr.io/" -ApiVersion "ContainerRegistry"
263+
}
264+
265+
AfterAll {
266+
Unregister-PSResourceRepository -Name "Unauthenticated"
267+
}
268+
269+
It "Should find resource given specific Name, Version null" {
270+
$res = Find-PSResource -Name "hello-world" -Repository "Unauthenticated"
271+
$res.Name | Should -Be "hello-world"
272+
$res.Version | Should -Be "5.0.0"
273+
}
274+
}

0 commit comments

Comments
 (0)