-
Notifications
You must be signed in to change notification settings - Fork 225
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
Fixes from PR#89 (and initially from PR#59) (also fixes #58) #114
Conversation
Hi @johlju, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! The agreement was validated by Microsoft and real humans are currently evaluating your PR. TTYL, MSBOT; |
d50dec8
to
a538a0e
Compare
Wait for review on this one, I will go thru all the comments in #89 and fix those first. I let you know when it's ready for review. Just wanted to see that I got all files in. |
a538a0e
to
e2f1162
Compare
This one is ready for review now. Resolved all the comments from the review of PR #89. |
e8c740e
to
4b4917a
Compare
Maintainers have a lot of work, so until they come around maybe someone in the community could start the review on this? |
4b4917a
to
9031c8f
Compare
@mbreakey3 When you have time, could you review this PR? |
d1596f3
to
7a53ed0
Compare
I squashed (concatenated) a lot of commits. |
Reviewed 5 of 8 files at r3. DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 28 at r3 (raw file):
TcpPort DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 35 at r3 (raw file):
You shouldn't need to call this twice - just put this line above the if statement and then check that ($null -ne $itemValue) DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 39 at r3 (raw file):
$itemConfig needs to be checked that it's non-null before indexing into it DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 42 at r3 (raw file):
before indexing into the area - $itemConfig needs to be checked to ensure it has at least that many items DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 76 at r3 (raw file):
TcpPort DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 105 at r3 (raw file):
single quotes around 'Changing...' DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 113 at r3 (raw file):
single quotes around 'Create...' DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 135 at r3 (raw file):
all of these should be single quotes DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 234 at r3 (raw file):
again, check to make sure this isn't null first DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 239 at r3 (raw file):
check this as well to ensure there's >1 item in the area before indexing into it DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 248 at r3 (raw file):
check for not null DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 253 at r3 (raw file):
check number of items in array DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 258 at r3 (raw file):
check number of items in array DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 279 at r3 (raw file):
see above comment DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 294 at r3 (raw file):
see above comment Tests/Unit/MSFT_xSqlAlias.Tests.ps1, line 25 at r3 (raw file):
delete these two lines since you don't have anything here Tests/Unit/MSFT_xSqlAlias.Tests.ps1, line 43 at r3 (raw file):
Could you add another test for Get? One for NP probably Tests/Unit/MSFT_xSqlAlias.Tests.ps1, line 99 at r3 (raw file):
can you re-word this It? Tests/Unit/MSFT_xSqlAlias.Tests.ps1, line 128 at r3 (raw file):
'...is passed an Alias...' Tests/Unit/MSFT_xSqlAlias.Tests.ps1, line 132 at r3 (raw file):
see above comment Tests/Unit/MSFT_xSQLAOGroupEnsure.Tests.ps1, line 106 at r3 (raw file):
space between ']' and '@' Tests/Unit/MSFT_xSQLAOGroupEnsure.Tests.ps1, line 199 at r3 (raw file):
commas should be on the previous line - also space betwen ] and @ Tests/Unit/MSFT_xSQLAOGroupEnsure.Tests.ps1, line 262 at r3 (raw file):
space between ] and @ Comments from Reviewable |
Reworking the xSqlAlias resource and the pester test. Finished with the resource yesterday, now I'm working on improving the pester test. |
0837fd9
to
59d7ad6
Compare
Reworked the entire xSqlAlias resource and it's entire test. Fixing the comments in the previous code would have made the validation logic even harder to read. I hope now I got a better base that will be easier to improve on when I get more review comments. 😄 @mbreakey3 when you have time, please continue the review. Reviewed 4 of 4 files at r4, 1 of 1 files at r5. DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 28 at r3 (raw file):
|
Code review changes Correction to Test for Alias due to change in schema and correction to module to require server
Fixed a bug if the alias did not exists then Get-ItemProperty would throw an error. Fixed a bug so that the logic to create a new alias is triggered. If the alias did not exist it was the change-logic that created the alias, not the create-logic. Fixed a bug in the create-logic that throw an error if the key ConnectTo already existed. Removed that New-Item since we already test for the existence of the key. Also some style changes. Changes to xSQLAlias Improved testing and added a test for removal of alias Bug found with the test, create-logic was called when it shouldn't Aligned schemas with README.md Also added add text that explains the use of the credential parameter (issue from dsccommunity#58)
Reworked the resource to be simpler but still have the same functionality Reworked the test for xSqlAlias to match the reworked resource and improved tests
Fixed review comments
d517590
to
e5a945b
Compare
Reviewed 3 of 4 files at r4, 1 of 1 files at r5, 2 of 2 files at r6. README.md, line 333 at r6 (raw file):
'Default value...' README.md, line 336 at r6 (raw file):
'Default value...' DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 230 at r6 (raw file):
single quotes DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 234 at r6 (raw file):
single quotes - also add in Parameter name '-Message' in this one and the one above DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.schema.mof, line 5 at r6 (raw file):
Default 'value' Comments from Reviewable |
Changes after review Also changed xSqlAlias to xSQLAlias in README.md
Reviewed 3 of 3 files at r7. README.md, line 333 at r6 (raw file):
|
Review status: all files reviewed at latest revision, 15 unresolved discussions. DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 234 at r6 (raw file):
|
Changes after review
Review status: 7 of 8 files reviewed at latest revision, 15 unresolved discussions. DSCResources/MSFT_xSQLAlias/MSFT_xSQLAlias.psm1, line 234 at r6 (raw file):
|
Reviewed 2 of 3 files at r7, 1 of 1 files at r8. Comments from Reviewable |
This is the new PR (again) from the PR #89 (and initially from PR #59)
This is from the work by @Matticusau in the closed PR #59 and closed PR #23, which @aultt continued the work on in PR #89. Now @johlju is continuing the work to get this merged.
This change is