-
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
SqlServerLogin: Addresses issue #1096 - doesn't check properties if login is not present on server #1240
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #1240 +/- ##
====================================
- Coverage 98% 98% -1%
====================================
Files 34 34
Lines 4171 4171
====================================
- Hits 4113 4111 -2
- Misses 58 60 +2 |
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.
@jpomfret Thank you for sending this in. Will be great to get this issue resolved!
Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @jpomfret)
a discussion (no related file):
Could you please add a regression unit test for this? A unit test that make sure one of the New-VerboseMessage
is asserted to be called 0 times (Assert-MockCalled
).
This test should fail with the previous code, but pass with the new code.
https://github.com/PowerShell/SqlServerDsc/blob/dev/Tests/Unit/MSFT_SqlServerLogin.Tests.ps1
Let me know if you need any pointers for writing the unit test.
DSCResources/MSFT_SqlServerLogin/MSFT_SqlServerLogin.psm1, line 384 at r1 (raw file):
-and $($loginInfo.Ensure) -ne 'Absent'
Could we make it -and $loginInfo.Ensure -eq 'Present'
instead and have the same functionality? Easier to read?
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.
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @johlju and @jpomfret)
a discussion (no related file):
Previously, johlju (Johan Ljunggren) wrote…
Could you please add a regression unit test for this? A unit test that make sure one of the
New-VerboseMessage
is asserted to be called 0 times (Assert-MockCalled
).
This test should fail with the previous code, but pass with the new code.
https://github.com/PowerShell/SqlServerDsc/blob/dev/Tests/Unit/MSFT_SqlServerLogin.Tests.ps1Let me know if you need any pointers for writing the unit test.
Done.
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.
Reviewable status: 1 of 3 files reviewed, 2 unresolved discussions (waiting on @johlju)
DSCResources/MSFT_SqlServerLogin/MSFT_SqlServerLogin.psm1, line 384 at r1 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
-and $($loginInfo.Ensure) -ne 'Absent'
Could we make it
-and $loginInfo.Ensure -eq 'Present'
instead and have the same functionality? Easier to read?
Done.
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 2 of 2 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved
c44ad66
to
37a28f2
Compare
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.
After rebase and moved the change log entry (because of the latest release).
Reviewed 1 of 1 files at r4.
Reviewable status: complete! all files reviewed, all discussions resolved
37a28f2
to
74f3876
Compare
Closing and reopening this PR to kick off the tests again. |
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.
After fixing the tests failing by another PR.
Reviewed 1 of 1 files at r6.
Reviewable status: complete! all files reviewed, all discussions resolved
Pull Request (PR) description
Addresses issue #1096 where when a login doesn't exist there are null values in the verbose output from the test function by skipping that output if the login is absent and expected to be present.
This Pull Request (PR) fixes the following issues
Fixes #1096
Task list
Entry should say what was changed, and how that affects users (if applicable).
and comment-based help.
This change is