-
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
BREAKING CHANGE: SqlRole: Resource overhaul for tests #1631
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1631 +/- ##
======================================
- Coverage 98% 98% -1%
======================================
Files 37 37
Lines 6014 6040 +26
======================================
+ Hits 5925 5949 +24
- Misses 89 91 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Awesome work on this! Sorry that I am slow to review this one, that is not normal! I'm usually have the reviews and PR merged within a week. The day job is just overwhelming at the moment (large project) and my head is exhausted when I get home. 🙂
Just two small comments and then we merge this one! 🙂
Reviewed 5 of 5 files at r1, 1 of 1 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Fiander)
CHANGELOG.md, line 10 at r2 (raw file):
Removed decision...
Please add 'BREAKING CHANGE:' to this entry. BREAKING CHANGE: Removed decision...
source/DSCResources/DSC_SqlRole/DSC_SqlRole.psm1, line 672 at r2 (raw file):
) if ($Members)
Can we do the evaluation like this to save a few rows?
if ($ServerRoleName -eq 'sysadmin')
{
if ($Members)
{
if ($Members -notcontains 'SA')
{
$Members += 'SA'
}
}
else
{
if ($MembersToExclude -contains 'SA')
{
$MembersToExclude = $MembersToExclude -ne 'SA'
}
}
}
@Fiander I keep an eye for commits on this and I will quickly resolve the comments and merge. 🙂 Thank you for sticking out! |
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: 4 of 6 files reviewed, 2 unresolved discussions (waiting on @Fiander and @johlju)
source/DSCResources/DSC_SqlRole/DSC_SqlRole.psm1, line 672 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Can we do the evaluation like this to save a few rows?
if ($ServerRoleName -eq 'sysadmin') { if ($Members) { if ($Members -notcontains 'SA') { $Members += 'SA' } } else { if ($MembersToExclude -contains 'SA') { $MembersToExclude = $MembersToExclude -ne 'SA' } } }
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 r3.
Reviewable status: complete! all files reviewed, all discussions resolved
Will merge as soon as the tests passes. |
damm it. crashed again on SQLLogin. 2020-11-21T11:11:23.7970129Z VERBOSE: [WIN-U9C4GIKUSPU]: LCM: [ Start Get ] |
I will rerun test, but can't do it until the unit tests has ran. Waiting for that. I think the problem is the tests run too fast and the build worker can't keep up sometimes. Something doesn't return to the correct state fast enough. It become better after adding SqlServerDsc/tests/TestHelpers/CommonTestHelper.psm1 Lines 395 to 406 in 56ebcfe
|
Maybe we should call Adding an issue for this. |
When the build fails, it is always on SqlLogin. To me, in the test this part is scary: row 39-43 To me this reads as: were adding logins in an other resource module that we are now depended on. |
That configuration creates local users and groups on the build worker which are then used in the tests for SqlLogin. The text mean that we do not run Get-DscConfiguration or Test-DscConfiguration for that configuration. I think that text could have been worded differently. 🙂 |
It is documented here what is left behind by this test, and if something is removed then the tests should fail with other error messages. The error messages we are seeing I think is the LCM that is having issues. |
Major overhaul of SQLRole, added tests, and fix for issue #550
Pull Request (PR) description
some remodeling of SqlRole.
lots of extra tests,
fix for #550
This Pull Request (PR) fixes the following issues
Fixes #550
Task list
file CHANGELOG.md. Entry should say what was changed and how that
affects users (if applicable), and reference the issue being resolved
(if applicable).
This change is