Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FixAssertion resource to fail when test fails#736

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
SteveL-MSFT merged 4 commits intoPowerShell:mainfromSteveL-MSFT:assert-dependson
Apr 4, 2025

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFTSteveL-MSFT commentedApr 4, 2025
edited
Loading

PR Summary

A previous PR that cleaned up the output ofAssertion to fit withget andset caused the assertion to never actually fail, just return results in the desired format.

The change here is to add a new hidden switch--as-assert so thatdsc knows it's running asAssertion. Then when this is used it checks each test result and if any are NOT in desired state, it returns an error that the assertion failed. Many of the changes is just to pass this parameter to the necessary functions. A helper function is used to potentially recursively look at all theinDesiredState properties.

image

PR Context

Fix#731

Gijsreyn reacted with rocket emoji
Steve Lee (POWERSHELL HE/HIM) (from Dev Box) added2 commitsApril 3, 2025 17:03
Steve Lee (POWERSHELL HE/HIM) (from Dev Box) added2 commitsApril 3, 2025 17:22
@SteveL-MSFTSteveL-MSFT added this pull request to themerge queueApr 4, 2025
Merged via the queue intoPowerShell:main with commita1cd9ecApr 4, 2025
4 checks passed
@SteveL-MSFTSteveL-MSFT deleted the assert-dependson branchApril 4, 2025 17:46
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tgauthtgauthtgauth approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Assertion not breaking when dependsOn is specified
2 participants
@SteveL-MSFT@tgauth

[8]ページ先頭

©2009-2025 Movatter.jp