Skip to content

Fix skipping of tests in RemoteSession.Basic.Tests.ps1 - #9304

Merged
Travis Plunk (TravisEz13) merged 3 commits into
PowerShell:masterfrom
SteveL-MSFT:text-fix
Apr 6, 2019
Merged

Travis Plunk (TravisEz13) merged 3 commits into
PowerShell:masterfrom
SteveL-MSFT:text-fix

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Apr 5, 2019 •

Copy link
Copy Markdown
Member

PR Summary

Moved check if able to write to $PSHome as way to skip test to BeforeAll which already contained a check if running on Windows.

PR Context

As part #9279, tests were updated to be skipped if the test requires writing to $PSHome but is not able to. However, these tests already had a skip mechanism in place so the additional check caused the test to run when it should have skipped.

PR Checklist

@TravisEz13

Copy link
Copy Markdown
Member

rebased the branch so all the failures will show up.

@TravisEz13

Copy link
Copy Markdown
Member

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

Travis Plunk (@TravisEz13) I'll review the tests from the other PR to make sure they are all covered

@PoshChan

Copy link
Copy Markdown
Collaborator

Travis Plunk (@TravisEz13), your last commit had 2 failures in PowerShell-CI-macos
Validate Set-ExecutionPolicy -Scope (Admin).-Scope LocalMachine is Settable, but overridden

Operation is not supported on this platform.
at <ScriptBlock>, /Users/vsts/agent/2.149.2/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Security/ExecutionPolicy.Tests.ps1: line 1163
1163:             Set-ExecutionPolicy -Scope Process -ExecutionPolicy Undefined

Validate Set-ExecutionPolicy -Scope (Admin).-Scope LocalMachine is Settable

Operation is not supported on this platform.
at <ScriptBlock>, /Users/vsts/agent/2.149.2/work/1/s/test/powershell/Modules/Microsoft.PowerShell.Security/ExecutionPolicy.Tests.ps1: line 1175
1175:             Set-ExecutionPolicy -Scope Process -ExecutionPolicy Undefined

@TravisEz13 Travis Plunk (TravisEz13) added the CL-Test Indicates that a PR should be marked as a test change in the Change Log label Apr 5, 2019
@TravisEz13

Copy link
Copy Markdown
Member

Created #9306 to verify failures work after 0e8be21

@TravisEz13
Travis Plunk (TravisEz13) merged commit b636965 into PowerShell:master Apr 6, 2019
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the text-fix branch April 6, 2019 00:39
Travis Plunk (TravisEz13) added a commit that referenced this pull request Apr 15, 2019
Moved check if able to write to $PSHome as way to skip test to `BeforeAll` which already contained a check if running on Windows.

## PR Context

As part #9279, tests were updated to be skipped if the test requires writing to `$PSHome` but is not able to.  However, these tests already had a skip mechanism in place so the additional check caused the test to run when it should have skipped.

Co-authored-by: Travis Plunk <github@ez13.net>
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Moved check if able to write to $PSHome as way to skip test to `BeforeAll` which already contained a check if running on Windows.

## PR Context

As part PowerShell#9279, tests were updated to be skipped if the test requires writing to `$PSHome` but is not able to.  However, these tests already had a skip mechanism in place so the additional check caused the test to run when it should have skipped.

Co-authored-by: Travis Plunk <github@ez13.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Test Indicates that a PR should be marked as a test change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants