-
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
SqlDatabaseObjectPermission: Fixing issue with INSERT permissions #2007
SqlDatabaseObjectPermission: Fixing issue with INSERT permissions #2007
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2007 +/- ##
====================================
Coverage 94% 94%
====================================
Files 94 94
Lines 7919 7920 +1
====================================
+ Hits 7489 7490 +1
Misses 430 430
|
source/DSCResources/DSC_SqlDatabaseObjectPermission/DSC_SqlDatabaseObjectPermission.psm1
Fixed
Show fixed
Hide fixed
source/DSCResources/DSC_SqlDatabaseObjectPermission/DSC_SqlDatabaseObjectPermission.psm1
Fixed
Show fixed
Hide fixed
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 1 of 3 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @markaugust)
tests/Unit/DSC_SqlDatabaseObjectPermission.Tests.ps1
line 160 at r2 (raw file):
} Mock -CommandName Get-DatabaseObject -MockWith {
This mock should be updated to mimic the types that is returned when INSERT
is used. Looks like IList
in the issue? Then this test should fail without the suggested change, and tests should pass with the suggested change.
Do you have time to look into a changing the mock?
@johlju I'm not familiar enough with Mocks and Unit test to know exactly what needs to be done here. Looking at the code block, I made some changes to the unit test, but let me know if that's not what you were meaning. |
I will review this PR as soon as I have time. Will look over the changes to the test you made. Good work! |
Unit tests looks okay, it correctly fails without the proposed change. I push a change to the integration test to try to mimic the scenario in the issue. |
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 3 of 3 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @markaugust)
@markaugust great work on this! |
Thank you @johlju . Out of curiosity, is there a timeline on when those fixes will get moved into a full release branch, rather than just in a preview branch? |
Usually when we (community) feel there should be a new full release. I pushed a release tag now, so should release if pipeline don't fail 😊 |
Pull Request (PR) description
This Pull Request (PR) fixes the following issues
Adding a
foreach
loop when checking object permissions to avoid issues with INSERT permissionsTask 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