Skip to content

Commit badafed

Browse files
Update test to use passthru
1 parent e48d8c9 commit badafed

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

test/InstallPSResourceTests/InstallPSResourceADOServer.Tests.ps1

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ Describe 'Test Install-PSResource for ADO V3Server scenarios' -tags 'CI' {
2929
@{Name="Test_local_m*"; ErrorId="NameContainsWildcard"},
3030
@{Name="Test?local","Test[local"; ErrorId="ErrorFilteringNamesForUnsupportedWildcards"}
3131

32-
It "Should not install resource with wildcard in name" -TestCases $testCases {
32+
It "Should not install resource with wildcard in name -- $Name" -TestCases $testCases {
3333
param($Name, $ErrorId)
34-
Install-PSResource -Name $Name -Repository $ADORepoName -ErrorVariable err -ErrorAction SilentlyContinue
34+
$res = Install-PSResource -Name $Name -Repository $ADORepoName -ErrorVariable err -ErrorAction SilentlyContinue -PassThru
3535
$err.Count | Should -BeGreaterThan 0
3636
$err[0].FullyQualifiedErrorId | Should -BeExactly "$ErrorId,Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource"
37-
$res = Get-InstalledPSResource $testModuleName
3837
$res | Should -BeNullOrEmpty
3938
}
4039

0 commit comments

Comments
 (0)