File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -202,6 +202,13 @@ Describe 'Test HTTP Save-PSResource for V2 Server Protocol' -tags 'CI' {
202202 $err [1 ].FullyQualifiedErrorId | Should - Contain " InstallPackageFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.SavePSResource"
203203 }
204204
205+ # Test that AuthenticodeCheck parameter displays warning on non-Windows
206+ It " Save with AuthenticodeCheck on non-Windows should display warning" - Skip:(Get-IsWindows ) {
207+ Save-PSResource - Name $testModuleName - Repository $PSGalleryName - TrustRepository - Path $SaveDir - AuthenticodeCheck - WarningVariable warn - WarningAction SilentlyContinue
208+ $warn | Should - Contain " Authenticode check cannot be performed on Linux or MacOS."
209+ Test-Path " $SaveDir /$testModuleName " | Should - Be $true
210+ }
211+
205212 # Save resource that requires license
206213 It " Save resource that requires accept license with -AcceptLicense flag" {
207214 $pkg = Save-PSResource - Repository $PSGalleryName - TrustRepository - Path $SaveDir - Name $testModuleNameWithLicense - AcceptLicense - PassThru
Original file line number Diff line number Diff line change @@ -432,4 +432,11 @@ Describe 'Test HTTP Update-PSResource for V2 Server Protocol' -tags 'CI' {
432432 $err [0 ].FullyQualifiedErrorId | Should - Contain " GetAuthenticodeSignatureError,Microsoft.PowerShell.PSResourceGet.Cmdlets.UpdatePSResource"
433433 $err [1 ].FullyQualifiedErrorId | Should - BeExactly " InstallPackageFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.UpdatePSResource"
434434 }
435+
436+ # Test that AuthenticodeCheck parameter displays warning on non-Windows
437+ It " Update with AuthenticodeCheck on non-Windows should display warning" - Skip:(Get-IsWindows ) {
438+ Install-PSResource - Name $testModuleName - Repository $PSGalleryName - TrustRepository
439+ Update-PSResource - Name $testModuleName - AuthenticodeCheck - Repository $PSGalleryName - TrustRepository - WarningVariable warn - WarningAction SilentlyContinue
440+ $warn | Should - Contain " Authenticode check cannot be performed on Linux or MacOS."
441+ }
435442}
You can’t perform that action at this time.
0 commit comments