-
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
xSQLServerDatabaseDefaultLocation: New Resource #856
xSQLServerDatabaseDefaultLocation: New Resource #856
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #856 +/- ##
====================================
+ Coverage 96% 96% +<1%
====================================
Files 31 32 +1
Lines 3442 3498 +56
====================================
+ Hits 3322 3378 +56
Misses 120 120 |
@johlju The CLA issue has been resolved. |
@PaulFeaser Could you tell me how it was resolved so I know for future contributors? I see that you are in the Microsoft org now, but also saw that that didn't help at first. |
It would be awesome if you could do an integration test for this resource as well, now when there is possible to run integration tests. Let me know if you are up to doing that as well. Reviewed 8 of 8 files at r1. CHANGELOG.md, line 112 at r1 (raw file):
There was an recent release of xSQLServer so you need to rebase this PR and make sure to move these entries back to the unreleased section after rebase. Please use README.md, line 511 at r1 (raw file):
maybe add 'user database'. Something like: README.md, line 521 at r1 (raw file):
Missing RestartService parameter here. README.md, line 521 at r1 (raw file):
Make sure these parameter descriptions are aligned the same in README.md, schema.mof and comment-based help. See the text differ, so use any text you feel is best. README.md, line 523 at r1 (raw file):
The type README.md, line 524 at r1 (raw file):
Please add the correct format for the values in the validate set. See other resources parameter descriptions as example. README.md, line 525 at r1 (raw file):
Maybe: "The path to the default..." README.md, line 528 at r1 (raw file):
Should be DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 32 at r1 (raw file):
Please remove the default value from mandatory parameter. Throughout. https://ci.appveyor.com/project/PowerShell/xsqlserver/build/6.0.1663.0#L943 DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 58 at r1 (raw file):
Please use single quotes. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 63 at r1 (raw file):
Please use single quotes. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 68 at r1 (raw file):
Please use single quotes. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 129 at r1 (raw file):
System.Boolean (upper 'B'). DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 137 at r1 (raw file):
Is this verbose message needed since there was another verbose message two rows up? DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 142 at r1 (raw file):
switch (lower-case 's') DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 167 at r1 (raw file):
This seems to not assigned anywhere. And could the name be changed to maybe DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 180 at r1 (raw file):
Why not move this inside the try block and get rid of the DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 182 at r1 (raw file):
Please change the key to 'RestartSqlServer' (using lower-case in 'ql' in 'Sql'). Throughout. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 232 at r1 (raw file):
System.Boolean (upper 'B'). DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 233 at r1 (raw file):
Missing this in the comment-based help. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 238 at r1 (raw file):
Please change to DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 245 at r1 (raw file):
Please change to DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 247 at r1 (raw file):
Why is it a single 'M' here? DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 249 at r1 (raw file):
Why not use DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.schema.mof, line 4 at r1 (raw file):
This needs to be a key as well, otherwise it's not possible to change this on two instances on the same host. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.schema.mof, line 6 at r1 (raw file):
Wouldn't it be enough with just DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.schema.mof, line 7 at r1 (raw file):
Wouldn't it be enough with just DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 4 at r1 (raw file):
Change to lower-case letters. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 4 at r1 (raw file):
"for instance" should be enough? DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 5 at r1 (raw file):
Please write out the word to 'Information' (if that is what it should say). Rather not use abbreviations. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 6 at r1 (raw file):
Rephrase. Do you mean verify if it needs to be changed? DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 8 at r1 (raw file):
Maybe use one of these in all strings to be consequent? Throughout in all of these strings. Maybe use "path" instead of "location" depending on the terminology used in the parameter descriptions? DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 12 at r1 (raw file):
Minor: Think we should skip the reference to the 'alter' word and instead just say that changing the path failed? Good as-is if you want to keep it. Examples/Resources/xSQLServerDatabaseDefaultLocation/1-SetDatabaseDefaultLocation.ps1, line 10 at r1 (raw file):
[System.Management.Automation.PSCredential] Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 44 at r1 (raw file):
Single quotes. Also on the two lines below. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 88 at r1 (raw file):
Please change to 'AlterLocationPath'. Throughout. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 89 at r1 (raw file):
Please change to 'ExpectedAlterLocationPath'. Throughout. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 106 at r1 (raw file):
Single quotes. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 107 at r1 (raw file):
Please use BeforeEach or BeforeAll around this one as well, to be consequent. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 109 at r1 (raw file):
Please move this back one indent. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 110 at r1 (raw file):
Remove blank row. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 111 at r1 (raw file):
-TestCases Thorughout. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 118 at r1 (raw file):
Please use Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 118 at r1 (raw file):
Minor: You could use splatting to shorten this row. If so, throughout. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 127 at r1 (raw file):
This should be scoped to 'It' instead. Throughout. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 132 at r1 (raw file):
Single quotes. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 137 at r1 (raw file):
Maybe add another Context-block before this one 'When the system is in the desired state' to align more against the other unit tests (nested context-blocks). Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 143 at r1 (raw file):
Doesn't seem to be used. Does it need to be here for the test cases to work? Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 146 at r1 (raw file):
Please assign Test-TargetResource to a variable Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 148 at r1 (raw file):
Blank row before this one. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 152 at r1 (raw file):
Maybe add another Context-block before this one 'When the system is not in the desired state' to align more against the other unit tests (nested context-blocks). Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 152 at r1 (raw file):
Blank row before this one. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 161 at r1 (raw file):
Please assign Test-TargetResource to a variable Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 163 at r1 (raw file):
Blank row before this one.Blank row before this one. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 169 at r1 (raw file):
Single quotes. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 172 at r1 (raw file):
Parameter not needed when not mocking any code. Parameter can be removed. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 175 at r1 (raw file):
Maybe add another Context-block before this one 'When the system is not in the desired state' to align more against the other unit tests (nested context-blocks). Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 192 at r1 (raw file):
Could you add an assert that Alter was called. See the method used for asserting this in the below code for the method Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 201 at r1 (raw file):
'When the default location fails to be changed' Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 225 at r1 (raw file):
Please add another test for Set-TargetResource when there is no change is needed. A Context-block 'When the system is in the desired state'. Comments from Reviewable |
I'm gonna look at the integration test in order learn it and then help out with it. We're throwing a lot at a first-timer here 😄 Review status: all files reviewed at latest revision, 58 unresolved discussions. Comments from Reviewable |
@randomnote1 Yes, I know. I hesitated to mention it. But @PaulFeaser did such awesome job with the unit tests so maybe it was a chance he was up to making a integration tests as well 😄 But... @PaulFeaser Please ignore the comment about integration tests and we let @randomnote1 fix that after this is merged. 😄 Once we have integration tests for most resources I will start to enforce that for resource that can be integration tested. Review status: all files reviewed at latest revision, 58 unresolved discussions. Comments from Reviewable |
@johlju, I'm going to do a PR into @PaulFeaser's branch with the integration tests. That way we'll be fully complete with this resource when the PR is completed. Review status: all files reviewed at latest revision, 58 unresolved discussions. Comments from Reviewable |
Awesome! Even better. 😄 Review status: all files reviewed at latest revision, 58 unresolved discussions. Comments from Reviewable |
Review status: 0 of 10 files reviewed at latest revision, 60 unresolved discussions. CHANGELOG.md, line 112 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. README.md, line 511 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. README.md, line 521 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. README.md, line 521 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. README.md, line 523 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. README.md, line 524 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. README.md, line 525 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. README.md, line 528 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 32 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 58 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 63 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 68 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 129 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 137 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 142 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 167 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 180 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 182 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 232 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 233 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 238 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 245 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 247 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 249 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.schema.mof, line 4 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.schema.mof, line 6 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.schema.mof, line 7 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 4 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 4 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 5 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 6 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 8 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 12 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Examples/Resources/xSQLServerDatabaseDefaultLocation/1-SetDatabaseDefaultLocation.ps1, line 10 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 44 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 88 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 89 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 106 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 107 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 109 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 110 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 111 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 118 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 118 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 127 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 132 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 137 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 143 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 146 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 148 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 152 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 152 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 161 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 163 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 169 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 172 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 175 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 192 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 201 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 225 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
wasn't sure about needing this since it is tested in the Set-TargeResource Comments from Reviewable |
@johlju, I've addressed the reviewed issues. I did end up changing the majority of the variable names as you suggested. I also added code to make sure that the directory exists. Because of that, I added code from @randomnote1 to make it cluster aware. |
Awesome Reviewed 1 of 8 files at r3, 7 of 9 files at r4, 2 of 2 files at r5. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 12 at r5 (raw file):
Can we indent the description one step more? See guideline here Throughout. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 24 at r5 (raw file):
We should add 'Not used in Get-TargetResource,' in the parameter description as per guideline Any unused parameters that must be included in a function definition should include 'Not used in <function_name>' in the help comment for that parameter in the comment-based help See next comment as well. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 66 at r5 (raw file):
Should we change this to If so, throughout the function Get-TargetResource. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 143 at r5 (raw file):
Please change to @randomnote1's code does not show this because the code is from one of the resource that we not yet have made this change in. :) DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 148 at r5 (raw file):
We should add a space between if an the open parenthesis DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 150 at r5 (raw file):
Minor (non-blocking): Maybe we should remove space before the closing parenthesis to be consequent? DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 259 at r5 (raw file):
Please change to DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 282 at r5 (raw file):
If we would add an DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.schema.mof, line 4 at r1 (raw file): Previously, PaulFeaser (Paul Feaser) wrote…
The parameter If you want, you could regression test this by adding two instances to the example. The example should fail in the "common Pester tests", when run in AppVeyor (or running the DscResource.Tests/Meta.Tests.ps1 locally), unless DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 4 at r1 (raw file): Previously, PaulFeaser (Paul Feaser) wrote…
Could we make it 'instance' - lower-case 'i'? DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 12 at r5 (raw file):
The string should not be surrounded by single-quotes. I make this mistake often, when copy/pasting 😄 Minor: To be consequent maybe we should use single-quotes in this string like the other strings? Examples/Resources/xSQLServerDatabaseDefaultLocation/1-SetDatabaseDefaultLocation.ps1, line 22 at r5 (raw file):
Could you add a description to why this parameter is there? And maybe we should add it to 'Log' and 'Backup' as well? Tests/Integration/MSFT_xSQLServerDatabaseDefaultLocation.config.ps1, line 47 at r5 (raw file):
Can we change these to the new parameter names so that the integration tests don't fail. 😄 Throughout the configurations in this file. Tests/Integration/MSFT_xSQLServerDatabaseDefaultLocation.Integration.Tests.ps1, line 66 at r5 (raw file):
Since we merged a PR changing all pester tests to the new v4 syntax we should change these as well, i.e See issue #863 for a script to do it. Or change manually throughout. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 128 at r5 (raw file):
Since we merged a PR changing all pester tests to the new v4 syntax we should change these as well, i.e See issue #863 for a script to do it. Or change manually throughout. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 193 at r5 (raw file):
Could we please add a blank row before this row? Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 206 at r5 (raw file):
Could we please add a blank row before this row? Comments from Reviewable |
@PaulFeaser Really awesome work on this one! Just a few more comments. |
All the changes have been made. Review status: 2 of 10 files reviewed at latest revision, 18 unresolved discussions. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 12 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 24 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 66 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 143 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 148 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 150 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 259 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.psm1, line 282 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/MSFT_xSQLServerDatabaseDefaultLocation.schema.mof, line 4 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 4 at r1 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. DSCResources/MSFT_xSQLServerDatabaseDefaultLocation/en-US/MSFT_xSQLServerDatabaseDefaultLocation.strings.psd1, line 12 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Examples/Resources/xSQLServerDatabaseDefaultLocation/1-SetDatabaseDefaultLocation.ps1, line 22 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Integration/MSFT_xSQLServerDatabaseDefaultLocation.config.ps1, line 47 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Integration/MSFT_xSQLServerDatabaseDefaultLocation.Integration.Tests.ps1, line 66 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 128 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 193 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Tests/Unit/MSFT_xSQLServerDatabaseDefaultLocation.Tests.ps1, line 206 at r5 (raw file): Previously, johlju (Johan Ljunggren) wrote…
Done. Comments from Reviewable |
Reviewed 8 of 8 files at r6. Comments from Reviewable |
I will merge this as soon as the tests passes. Again, awesome work @PaulFeaser! |
Thanks for all the help you provided. I appreciate your patience. Also thanks to @randomnote1 for guiding me through each step. Review status: 9 of 10 files reviewed at latest revision, all discussions resolved. Comments from Reviewable |
Thank you for contributing! 😄 Reviewed 1 of 1 files at r7. Comments from Reviewable |
Pull Request (PR) description
Created new resource for setting Database Default Locations (Data/Log/Backup) for SQL Server
This Pull Request (PR) fixes the following issues:
Fixes #656
Task list:
This change is