-
Notifications
You must be signed in to change notification settings - Fork 149
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
xWebsite Inconsistent Logic in xWebsite #566
xWebsite Inconsistent Logic in xWebsite #566
Conversation
e2e8428
to
91c5357
Compare
These test failures don't look like they are related to the changes made in the PR. |
db7e107
to
d9ed771
Compare
d9ed771
to
59e8dcc
Compare
8c35ce7
to
b8255da
Compare
Waiting on #568 |
0cf416c
to
bd4dab4
Compare
Turned out this was also waiting on #565. |
The Test-TargetResource function in the xWebSite resource used inconsistent logic in the way that it would test a property for compliance and then report non-compliance. Some tests would use the `$PSBoundParameters` variable to check for parameters to be tested, others would use `[String]::isNullOrEmpty()` Some tests would set the `$inDesiredState` variable, write a verbose message and move on, and others would write the verbose message and use the `return` keyward to immediately exit the function and stop testing additional properties. The desired style should use `$PSBoundParameters` and the `$inDesiredState` variable consistently, so that all properties are tested for troubleshooting purposes, and to promote conciseness and reasability Resolves dsccommunity#221
bd4dab4
to
e7da5b9
Compare
Ok, that had a transient failure, but this is fully rebased and tests passing. Ready to go. |
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.
Reviewed 2 of 2 files at r1.
Reviewable status: complete! all files reviewed, all discussions resolved
Pull Request (PR) description
The Test-TargetResource function in the xWebSite resource used
inconsistent logic in the way that it would test a property for
compliance and then report non-compliance.
Some tests would use the
$PSBoundParameters
variable to check forparameters to be tested, others would use
[String]::isNullOrEmpty()
Some tests would set the
$inDesiredState
variable, write a verbosemessage and move on, and others would write the verbose message and
use the
return
keyward to immediately exit the function and stoptesting additional properties.
The desired style should use
$PSBoundParameters
and the$inDesiredState
variable consistently, so that all properties aretested for troubleshooting purposes, and to promote conciseness and
reasability
This Pull Request (PR) fixes the following issues
Resolves #221
Task list
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
and comment-based help.
This change is