-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for configure mixed elevation #4487
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
} | ||
|
||
/// <summary> | ||
/// Verifies that creating a high integrity unit processor. Must run elevated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want a test that will actually request admin. The basic test should still use the test mode, with two units (one high, one medium) and a special resource that writes the PID into a target file so that you can ensure that they were routed to different set processors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the tests so that it checks how many unique PIDs are created when applying an elevated and non elevated unit.
/// </summary> | ||
[Collection("UnitTestCollection")] | ||
[OutOfProc] | ||
[OutOfProcOnly] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that these tests still attempt to run if you select everything in the Test Explorer? I'm not sure how to default them to not selected, but that would be better if we can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not able to find a way to have these skipped in Test Explorer. There is an option to do something like Fact[Skip="reason"] but that causes the test to always be skipped.
src/Microsoft.Management.Configuration.UnitTests/Tests/ConfigurationMixedElevationTests.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Management.Configuration.UnitTests/Tests/ConfigurationMixedElevationTests.cs
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Adds a test that runs two configuration with different elevation requirements using the dynamic runtime factory through COM.
Microsoft Reviewers: Open in CodeFlow