Skip to content

Commit 82584c5

Browse files
committed
Change repo used in ContainerRegistry Find-PSResource with wildcard name test
1 parent 156083a commit 82584c5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎test/FindPSResourceTests/FindPSResourceContainerRegistryServer.Tests.ps1‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,21 @@ Describe 'Test HTTP Find-PSResource for ACR Server Protocol' -tags 'CI' {
1616
$testModuleWithIncludes = "test-resourcewithincludes"
1717
$ACRRepoName = "ACRRepo"
1818
$ACRRepoUri = "https://psresourcegettest.azurecr.io"
19+
$ACRRepoWildcard = "ACRRepoWildcard"
20+
$ACRRepoWildcardUri = "https://psresourcegettestwildcard.azurecr.io"
1921
Get-NewPSResourceRepositoryFile
2022

2123
$usingAzAuth = $env:USINGAZAUTH -eq 'true'
2224

2325
if ($usingAzAuth) {
2426
Write-Verbose -Verbose "Using Az module for authentication"
2527
Register-PSResourceRepository -Name $ACRRepoName -ApiVersion 'ContainerRegistry' -Uri $ACRRepoUri -Verbose
28+
Register-PSResourceRepository -Name $ACRRepoWildcard -ApiVersion 'ContainerRegistry' -Uri $ACRRepoWildcardUri -Verbose
2629
}
2730
else {
2831
$psCredInfo = New-Object Microsoft.PowerShell.PSResourceGet.UtilClasses.PSCredentialInfo ("SecretStore", "$env:TENANTID")
2932
Register-PSResourceRepository -Name $ACRRepoName -ApiVersion 'ContainerRegistry' -Uri $ACRRepoUri -CredentialInfo $psCredInfo -Verbose
33+
Register-PSResourceRepository -Name $ACRRepoWildcard -ApiVersion 'ContainerRegistry' -Uri $ACRRepoWildcardUri -CredentialInfo $psCredInfo -Verbose
3034
}
3135
}
3236

@@ -173,7 +177,7 @@ Describe 'Test HTTP Find-PSResource for ACR Server Protocol' -tags 'CI' {
173177

174178
It "Should find all resources given Name '*'" {
175179
# FindAll()
176-
$res = Find-PSResource -Name "*" -Repository $ACRRepoName -ErrorVariable err -ErrorAction SilentlyContinue
180+
$res = Find-PSResource -Name "*" -Repository $ACRRepoWildcard -ErrorVariable err -ErrorAction SilentlyContinue
177181
$err | Should -BeNullOrEmpty
178182
$res | Should -Not -BeNullOrEmpty
179183
$res.Count | Should -BeGreaterThan 0

0 commit comments

Comments
 (0)