-
Notifications
You must be signed in to change notification settings - Fork 141
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
xADDomainController: Fix Issue #155 - Get-TargetResource fails #249
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #249 +/- ##
====================================
+ Coverage 85% 85% +<1%
====================================
Files 18 18
Lines 1554 1554
Branches 10 11 +1
====================================
+ Hits 1325 1326 +1
+ Misses 219 217 -2
- Partials 10 11 +1 |
I just merged a PR that fixes the problem with the tests failing. Please rebase this PR. |
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.
Thank you for adding the stubs, and cleaning up the unit test! 🙇♂️ Just a couple of review comments.
Reviewed 3 of 5 files at r1, 2 of 2 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @devopsjesus)
README.md, line 126 at r2 (raw file):
_(Read)_
I think this should be Write
, see other comment.
DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.schema.mof, line 12 at r2 (raw file):
[Read
I actually think this should be write, because there is a Ensure
parameter in the *-TargetResource functions with a ValidateSet. The property must just have been missed in the schema.mof.
And actually be this (you may change the description to something more suitable):
[Write, Description("Specifies the desired state of the Domain Controller. When set to 'Present' the node will be promoted to a domain controller. When set to 'Absent' the node will be demoted. Default value is 'Present'."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
I'm not sure the 'Absent' part will work, but that is a problem for a different issue if it doesn't?
Here were my thoughts on the Read attribute for I tagged the |
I’m good with that if there are not a problem using the resource if the parameter, and that we also create an issue to track that it should be made a Write property once we have the absent logic added. So it’s no confusing why it’s a read property in the future. Although, we could also make it a Write property today and create an issue tracking that Absent logic should be added. 🤔 |
Added Issue #251 to track the Ensure property is updated with a Write attribute when implementing the feature to demote a DC using |
@devopsjesus This PR seems to want to added changes already changed in the dev-branch, for example the file |
did the rebase - I also merged upstream/dev into my fork, which might be why those extra file changes are shown? |
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 1 of 2 files at r4, 1 of 1 files at r5.
Reviewable status: complete! all files reviewed, all discussions resolved
@devopsjesus merged! Awesome work on this one! Thank you! 😄 |
…fails (dsccommunity#249) - Added Ensure Read property to xADDomainController to fix Get-TargetResource return bug (issue dsccommunity#155). - Updated readme and add release notes
Pull Request (PR) description
Added a read property (Ensure) to the xADDomainController resource
This required making a variety of edits to the Tests file to have them run outside a deployed Domain Controller
This Pull Request (PR) fixes the following issues
Task list
Entry should say what was changed, and how that affects users (if applicable).
and comment-based help.
This change is