-
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
xSQLServerDatabase: Get-TargetResource tests aren't giving accurate results due to scoping. #849
Comments
Thanks for finding this. Instead of moving it outside the It-block, add another You decide if you can do this change in the same PR as another change, or in a separate PR. Either works for me. |
@ChrisLGardner I label this as in progress since you could resolve this. |
That's what I've done. I'll include it in the PR for adding the collation. Just working out the last few (obvious) bugs now and I'll hopefully have it in for review some time this week. |
Awesome! looking forward to it! 😄 |
Details of the scenario you tried and the problem that is occurring:
The tests for Get-TargetResource are providing inaccurate results as the second It block in each Context is effectively doing
$null | Should Be $null
due to the variables being scoped in a different It block.Version of the DSC module you're using, or 'dev' if you're using current dev branch:
Dev.
I'm working on some changes to this Resource anyway so I'll fix this as part of that (or I can separate it out to different set of changes). I'm not sure if this is done elsewhere so it might effect other resources too.
This is the code, I'll just move the $testParameters assignment and the $result = Get-TargetResource outside the It block so it's part of the Context above it.
The text was updated successfully, but these errors were encountered: