@@ -39,7 +39,7 @@ Describe 'Test Install-PSResource for GitHub packages' -tags 'CI' {
39
39
Install-PSResource - Name $Name - Repository $GithubPackagesRepoName - Credential $credential - ErrorVariable err - ErrorAction SilentlyContinue
40
40
$err.Count | Should - BeGreaterThan 0
41
41
$err [0 ].FullyQualifiedErrorId | Should - BeExactly " $ErrorId ,Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource"
42
- $res = Get-InstalledPSResource $testModuleName
42
+ $res = Get-InstalledPSResource $testModuleName - ErrorAction SilentlyContinue
43
43
$res | Should - BeNullOrEmpty
44
44
}
45
45
@@ -66,7 +66,7 @@ Describe 'Test Install-PSResource for GitHub packages' -tags 'CI' {
66
66
67
67
It " Should not install resource given nonexistant name" {
68
68
Install-PSResource - Name " NonExistantModule" - Repository $GithubPackagesRepoName - Credential $credential - TrustRepository - ErrorVariable err - ErrorAction SilentlyContinue
69
- $pkg = Get-InstalledPSResource " NonExistantModule"
69
+ $pkg = Get-InstalledPSResource " NonExistantModule" - ErrorAction SilentlyContinue
70
70
$pkg | Should - BeNullOrEmpty
71
71
$err.Count | Should - BeGreaterThan 0
72
72
$err [0 ].FullyQualifiedErrorId | Should - BeExactly " InstallPackageFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource"
@@ -111,7 +111,7 @@ Describe 'Test Install-PSResource for GitHub packages' -tags 'CI' {
111
111
{}
112
112
$Error [0 ].FullyQualifiedErrorId | Should - be " IncorrectVersionFormat,Microsoft.PowerShell.PSResourceGet.Cmdlets.InstallPSResource"
113
113
114
- $res = Get-InstalledPSResource $testModuleName
114
+ $res = Get-InstalledPSResource $testModuleName - ErrorAction SilentlyContinue
115
115
$res | Should - BeNullOrEmpty
116
116
}
117
117
@@ -199,13 +199,13 @@ Describe 'Test Install-PSResource for GitHub packages' -tags 'CI' {
199
199
}
200
200
201
201
It " Reinstall resource that is already installed with -Reinstall parameter" {
202
- Install-PSResource - Name $testModuleName - Repository $GithubPackagesRepoName - Credential $credential - TrustRepository
203
- $pkg = Get-InstalledPSResource $testModuleName
204
- $pkg.Name | Should - Be $testModuleName
202
+ Install-PSResource - Name $testModuleName2 - Repository $GithubPackagesRepoName - Credential $credential - TrustRepository
203
+ $pkg = Get-InstalledPSResource $testModuleName2
204
+ $pkg.Name | Should - Be $testModuleName2
205
205
$pkg.Version | Should - Be " 5.0.0"
206
- Install-PSResource - Name $testModuleName - Repository $GithubPackagesRepoName - Credential $credential - Reinstall - TrustRepository
207
- $pkg = Get-InstalledPSResource $testModuleName
208
- $pkg.Name | Should - Be $testModuleName
206
+ Install-PSResource - Name $testModuleName2 - Repository $GithubPackagesRepoName - Credential $credential - Reinstall - TrustRepository
207
+ $pkg = Get-InstalledPSResource $testModuleName2
208
+ $pkg.Name | Should - Be $testModuleName2
209
209
$pkg.Version | Should - Be " 5.0.0"
210
210
}
211
211
@@ -248,23 +248,23 @@ Describe 'Test Install-PSResource for V3Server scenarios' -tags 'ManualValidatio
248
248
$pkg.Path.Contains (" /usr/" ) | Should - Be $true
249
249
}
250
250
251
- # This needs to be manually tested due to prompt
252
- It " Install resource that requires accept license without -AcceptLicense flag" {
253
- Install-PSResource - Name $testModuleName2 - Repository $TestGalleryName
254
- $pkg = Get-InstalledPSResource $testModuleName2
255
- $pkg.Name | Should - Be $testModuleName2
256
- $pkg.Version | Should - Be " 0.0.1.0"
257
- }
251
+ # # This needs to be manually tested due to prompt
252
+ # It "Install resource that requires accept license without -AcceptLicense flag" {
253
+ # Install-PSResource -Name $testModuleName2 -Repository $TestGalleryName
254
+ # $pkg = Get-InstalledPSResource $testModuleName2
255
+ # $pkg.Name | Should -Be $testModuleName2
256
+ # $pkg.Version | Should -Be "0.0.1.0"
257
+ # }
258
258
259
- # This needs to be manually tested due to prompt
260
- It " Install resource should prompt 'trust repository' if repository is not trusted" {
261
- Set-PSResourceRepository PoshTestGallery - Trusted:$false
259
+ # # This needs to be manually tested due to prompt
260
+ # It "Install resource should prompt 'trust repository' if repository is not trusted" {
261
+ # Set-PSResourceRepository PoshTestGallery -Trusted:$false
262
262
263
- Install-PSResource - Name $testModuleName - Repository $TestGalleryName - confirm:$false
263
+ # Install-PSResource -Name $testModuleName -Repository $TestGalleryName -confirm:$false
264
264
265
- $pkg = Get-Module $testModuleName - ListAvailable
266
- $pkg.Name | Should - Be $testModuleName
265
+ # $pkg = Get-Module $testModuleName -ListAvailable
266
+ # $pkg.Name | Should -Be $testModuleName
267
267
268
- Set-PSResourceRepository PoshTestGallery - Trusted
269
- }
268
+ # Set-PSResourceRepository PoshTestGallery -Trusted
269
+ # }
270
270
}
0 commit comments