You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// ErrorRecord errRecord is only set if directory access to retrieve files failed (i.e network error when accessing file share, incorrect directory path, etc), not if desired files within directory are not found since this is a wildcard scenario.
// ErrorRecord errRecord is only set if directory access to retrieve files failed (i.e network error when accessing file share, incorrect directory path, etc), not if desired files within directory are not found since this is a wildcard scenario.
It "Find should not silently fail if network connection to local private repository cannot be established and remainder repositories should be searched" {
$WarningVar[0] | Should -Match"$($privateRepo.Uri.LocalPath)"
357
+
$res.Name| Should -Contain $testModuleName
358
+
$res.Version| Should -Be "1.0.0"
359
+
}
360
+
361
+
It "Find should not silently fail if network connection to local private repository cannot be established and package version was provided and remainder repositories should be searched" {
Copy file name to clipboardExpand all lines: test/InstallPSResourceTests/InstallPSResourceLocal.Tests.ps1
+19Lines changed: 19 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ Describe 'Test Install-PSResource for local repositories' -tags 'CI' {
16
16
BeforeAll {
17
17
$localRepo="psgettestlocal"
18
18
$localUNCRepo="psgettestlocal3"
19
+
$localPrivateRepo="psgettestlocal5"
19
20
$localNupkgRepo="localNupkgRepo"
20
21
$testModuleName="test_local_mod"
21
22
$testModuleName2="test_local_mod2"
@@ -296,4 +297,22 @@ Describe 'Test Install-PSResource for local repositories' -tags 'CI' {
296
297
$pkg.Name| Should -Be $nupkgName
297
298
$pkg.Version| Should -Be $nupkgVersion
298
299
}
300
+
301
+
It "Install should not silently fail if network connection to local private repository cannot be established and remainder repositories should be searched" {
$WarningVar[0] | Should -Match"$($privateRepo.Uri.LocalPath)"
306
+
$res.Name| Should -Contain $testModuleName
307
+
$res.Version| Should -Be "1.0.0"
308
+
}
309
+
310
+
It "Install should not silently fail if network connection to local private repository cannot be established and package version was provided and remainder repositories should be searched" {
0 commit comments