mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Block getting help from network locations in restricted remoting sessions (#20593)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# Copyright (c) Microsoft Corporation.
|
||||
# Licensed under the MIT License.
|
||||
|
||||
Import-Module HelpersCommon
|
||||
|
||||
Describe 'Online help tests for PowerShell Cmdlets' -Tags "Feature" {
|
||||
|
||||
# The csv files (V2Cmdlets.csv and V3Cmdlets.csv) contain a list of cmdlets and expected HelpURIs.
|
||||
@@ -61,3 +63,18 @@ Describe 'Get-Help -Online is not supported on Nano Server and IoT' -Tags "CI" {
|
||||
{ Get-Help Get-Help -Online } | Should -Throw -ErrorId "InvalidOperation,Microsoft.PowerShell.Commands.GetHelpCommand"
|
||||
}
|
||||
}
|
||||
|
||||
Describe 'Get-Help should throw on network paths' -Tags "CI" {
|
||||
BeforeAll {
|
||||
$script:skipTest = -not $IsWindows
|
||||
}
|
||||
|
||||
It "Get-Help should throw not on <command>" -Skip:$skipTest -TestCases (Get-HelpNetworkTestCases -PositiveCases) {
|
||||
param(
|
||||
$Command,
|
||||
$ExpectedError
|
||||
)
|
||||
|
||||
{ Get-Help -Name $Command } | Should -Not -Throw
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user