Skip to content

Conversation

@chunqingchen
Copy link
Contributor

this is to resolve #5081

since api-ms-win-core-file-l1-1-0.dll is not supported under non-windows platform, remove the cmdlet

}

Describe "Verify remoting cmdlets that should not be implemented under non-windows platform" -Tags @("CI") {
It "Get-PSHostProcessInfo should be removed under non-windows platform" -Skip $IsWindows {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have the test in DefaultCommands.Tests.ps1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @iSazonov pointed out, the test DefaultCommands.Tests.ps1 covers available cmdlets on different plats by default, can you please update that test?

#if !UNIX
{"Disable-PSRemoting", new SessionStateCmdletEntry("Disable-PSRemoting", typeof(DisablePSRemotingCommand), helpFile) },
{"Enable-PSRemoting", new SessionStateCmdletEntry("Enable-PSRemoting", typeof(EnablePSRemotingCommand), helpFile) },
{"Get-PSHostProcessInfo", new SessionStateCmdletEntry("Get-PSHostProcessInfo", typeof(GetPSHostProcessInfoCommand), helpFile) },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about Enter-PSHostProcess and Exit-PSHostProcess? They are supposed to work with Get-PSHostProcessInfo. Maybe we should exclude them all? @PaulHigin thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these cmdlets should be exluded as well.

}

Describe "Verify remoting cmdlets that should not be implemented under non-windows platform" -Tags @("CI") {
It "Get-PSHostProcessInfo should be removed under non-windows platform" -Skip $IsWindows {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @iSazonov pointed out, the test DefaultCommands.Tests.ps1 covers available cmdlets on different plats by default, can you please update that test?

@daxian-dbw daxian-dbw self-assigned this Oct 15, 2017
@daxian-dbw daxian-dbw merged commit dd5fba3 into PowerShell:master Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get-PSHostProcessInfo fails on non-Windows

4 participants