@@ -27,7 +27,8 @@ Describe 'Test Install-PSResource for V3Server scenarios' -tags 'CI' {
2727 }
2828
2929 AfterEach {
30- Uninstall-PSResource ' test_module' , ' test_module2' , ' test_script' , ' TestModule99' , ' test_module_with_license' , ' TestFindModule' , ' PackageManagement' - SkipDependencyCheck - ErrorAction SilentlyContinue
30+ Uninstall-PSResource ' test_module' , ' test_module2' , ' test_script' , ' TestModule99' , ' test_module_withlicense' , ' TestFindModule' , ' PackageManagement' , `
31+ ' TestModuleWithDependencyE' , ' TestModuleWithDependencyC' , ' TestModuleWithDependencyB' , ' TestModuleWithDependencyD' - SkipDependencyCheck - ErrorAction SilentlyContinue
3132 }
3233
3334 AfterAll {
@@ -45,7 +46,7 @@ Describe 'Test Install-PSResource for V3Server scenarios' -tags 'CI' {
4546 Install-PSResource - Name $Name - Repository $NuGetGalleryName - ErrorVariable err - ErrorAction SilentlyContinue
4647 $err.Count | Should - BeGreaterThan 0
4748 $err [0 ].FullyQualifiedErrorId | Should - BeExactly " $ErrorId ,Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource"
48- $res = Get-InstalledPSResource $testModuleName
49+ $res = Get-InstalledPSResource $testModuleName - ErrorAction SilentlyContinue
4950 $res | Should - BeNullOrEmpty
5051 }
5152
@@ -82,7 +83,7 @@ Describe 'Test Install-PSResource for V3Server scenarios' -tags 'CI' {
8283 Install-PSResource - Name $testModuleName - Repository $NuGetGalleryName - TrustRepository - WhatIf
8384 $? | Should - BeTrue
8485
85- $res = Get-InstalledPSResource $testModuleName
86+ $res = Get-InstalledPSResource $testModuleName - ErrorAction SilentlyContinue
8687 $res | Should - BeNullOrEmpty
8788 }
8889
@@ -258,10 +259,10 @@ Describe 'Test Install-PSResource for V3Server scenarios' -tags 'CI' {
258259 # }
259260
260261 It ' Install resource that requires accept license with -AcceptLicense flag' {
261- Install-PSResource - Name ' test_module_with_license ' - Repository $NuGetGalleryName - AcceptLicense
262- $pkg = Get-InstalledPSResource ' test_module_with_license '
263- $pkg.Name | Should - Be ' test_module_with_license '
264- $pkg.Version | Should - Be ' 2 .0.0'
262+ Install-PSResource - Name ' test_module_withlicense ' - Repository $NuGetGalleryName - AcceptLicense
263+ $pkg = Get-InstalledPSResource ' test_module_withlicense '
264+ $pkg.Name | Should - Be ' test_module_withlicense '
265+ $pkg.Version | Should - Be ' 1 .0.0'
265266 }
266267
267268 It ' Install PSResourceInfo object piped in' {
@@ -388,7 +389,7 @@ Describe 'Test Install-PSResource for V3Server scenarios' -tags 'ManualValidatio
388389
389390 BeforeAll {
390391 $testModuleName = ' TestModule'
391- $testModuleName2 = ' test_module_with_license '
392+ $testModuleName2 = ' test_module_withlicense '
392393 Get-NewPSResourceRepositoryFile
393394 Register-LocalRepos
394395 }
@@ -415,7 +416,7 @@ Describe 'Test Install-PSResource for V3Server scenarios' -tags 'ManualValidatio
415416 Install-PSResource - Name $testModuleName2 - Repository $TestGalleryName
416417 $pkg = Get-InstalledPSResource $testModuleName2
417418 $pkg.Name | Should - Be $testModuleName2
418- $pkg.Version | Should - Be ' 2 .0.0'
419+ $pkg.Version | Should - Be ' 1 .0.0'
419420 }
420421
421422 # This needs to be manually tested due to prompt
0 commit comments