-
Notifications
You must be signed in to change notification settings - Fork 139
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 - Adds IsGlobalCatalog parameter and fix for Ensure schema violation #135
Conversation
Adding Global Catalog Option
Hi @Merto410, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
Fixing test
I believe the appveyor check is wrong. I have validated that on a server, that it shows true when sitename matches and false when it doesn't and set properly moves the server without issue if sitename doesn't match. |
I just glanced at this code to help you with the tests failing. Saw some other things I commented on as well Would you be so kind to add tests for the new parameters and logic as well. Review status: 0 of 3 files reviewed at latest revision, 5 unresolved discussions, some commit checks failed. README.md, line 248 at r2 (raw file): Also, please mention original author in your PR description, since you continue working on the abandoned PR #111.
DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1, line 204 at r2 (raw file):
What does this do? Not mentioned in the Readme.md, please add it. DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1, line 206 at r2 (raw file):
Please add this to the README.md. DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1, line 224 at r2 (raw file):
What is this row meant to achieve ? DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1, line 240 at r2 (raw file):
This is always evaluated to $false. The variables are not assigned before this evaluation? Probably why the test fail. Comments from Reviewable |
@johlju Thanks for looking at it. to answer: "Would you be so kind to add tests for the new parameters and logic as well." "Also, please mention original author in your PR description" For the next two, that is part of the fix to the get-dscconfiguration being broken. The vars called in the schema have to be referenced in all three functions. The purpose is referenced in the readme.md. would further explanation of each line be helpful in the readme or would it be better to have line comments? " $existingResource = Get-TargetResource @PSBoundParameters These were in the code prior to my changes but they pull the get to perform the test and set the default state equal to the install state of AD services. "This is always evaluated to $false. The variables are not assigned before this evaluation? Probably why the test fail." They evaluate based on the $existingresource values (the if statement right above your quotes code). Also note that there is a default value assigned to the variable in all locations since we default to $true unless specified $false. I suspect the test evaluates it as false for some reason because it isn't looking or setting the value properly, but this requires a re-write of the test and I'm not sure where or how to update that. The updated test function is needed to correct the GC state. It does evaluate correctly in a "production" system Thanks again |
Hi, I am closing and re-opening this PR to bump the CLA bot. Sorry for the inconvenience! |
Adds the IsGlobalCatalog where necessary in the test to support the added functionality of the resource
Updated test to account for Global Catalog options |
@raandree I haven't seen any update on when the review is taking place or what needs to happen to make it go forward. I'm circling the runway :) |
@Merto410 Sorry that it has taken suck a long time getting this merged. I'm available to get this merged so I'm hoping you have time to work on it. If you don't, then please let me know and I will mark it as abandoned so that someone else can continue the work. Thanks! |
@Merto410 Happy to review this. Could you please rebase this PR against dev so you get the latest changes, and so README.md is correct. Thanks! |
Reviewed 1 of 3 files at r1, 1 of 2 files at r3, 1 of 1 files at r4, 1 of 1 files at r5. DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1, line 28 at r5 (raw file):
We should not add unused non-mandatory parameters to Get-TargetResource. DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1, line 58 at r5 (raw file):
We should not return internal objects to Get-DscConfiguration. If this is only necessary for the Set-TargetResource, then I suggest we make sure to get this property another way in the Set-TargetResource function and not add it as a read-only parameter. DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1, line 162 at r5 (raw file):
We should have the braces on there own lines. DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1, line 163 at r5 (raw file):
We should have the braces on there own lines. DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.psm1, line 164 at r5 (raw file):
Set-AdObject (upper 'A' and 'O') DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.schema.mof, line 12 at r5 (raw file):
Please add the read-only properties to the README.md. See example how this can be done here; https://github.com/PowerShell/SqlServerDsc#sqlag DSCResources/MSFT_xADDomainController/MSFT_xADDomainController.schema.mof, line 13 at r5 (raw file):
See another comment about this read-only property. Tests/Unit/MSFT_xADDomainController.Tests.ps1, line 303 at r5 (raw file):
We should indent with four spaces. Throughout, multiple locations. Tests/Unit/MSFT_xADDomainController.Tests.ps1, line 314 at r5 (raw file):
Double space between cmdlet name and named parameter. Throughout, multiple locations. Comments from Reviewable |
Labeling this pull request (PR) as abandoned since it has gone 14 days or more since the last update. An abandoned PR can be continued by another contributor. The abandoned label will be removed if work on this PR is taken up again. |
@Merto410 Just pinging to check if you have the time to continue working on this PR? If not I will try to get this through. |
This PR continues in PR #255. |
Adds Option IsGlobalCatalog to xAdDomainController per issue/feature request #75 and fixes get-dscconfiguration issue with xAdDomainController #111 .
This change is![Reviewable](https://camo.githubusercontent.com/23b05f5fb48215c989e92cc44cf6512512d083132bd3daf689867c8d9d386888/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)