-
Notifications
You must be signed in to change notification settings - Fork 227
Add integration test for Set-SqlDscServerPermission command #2265
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
Conversation
Co-authored-by: johlju <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2265 +/- ##
====================================
Coverage 94% 94%
====================================
Files 149 149
Lines 9163 9163
====================================
Hits 8687 8687
Misses 476 476
🚀 New features to boost your workflow:
|
tests/Integration/Commands/Set-SqlDscServerPermission.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
|
@coderabbitai create an issue to track that we need to change the task from build to noop |
|
@coderabbitai create an issue to track that we need to change the task from build to noop |
tests/Integration/Commands/Set-SqlDscServerPermission.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
tests/Integration/Commands/Set-SqlDscServerPermission.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
tests/Integration/Commands/Set-SqlDscServerPermission.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
tests/Integration/Commands/Set-SqlDscServerPermission.Integration.Tests.ps1
Show resolved
Hide resolved
…te README Co-authored-by: johlju <[email protected]>
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Comment |
tests/Integration/Commands/Set-SqlDscServerPermission.Integration.Tests.ps1
Show resolved
Hide resolved
Co-authored-by: johlju <[email protected]>
Fix for Test Failure:
Added proper cleanup logic in AfterAll block to restore the expected permissions state for the shared
IntegrationTestSqlLogin. The Test-SqlDscServerPermission ExactMatch test expects the login to haveConnectSql,ViewServerState, andViewAnyDefinitionpermissions granted, but the Set-SqlDscServerPermission test was modifying this state without proper restoration.The fix ensures that after Set-SqlDscServerPermission tests complete, the shared login is restored to the state that subsequent tests depend on:
ViewServerStateandViewAnyDefinitionpermissions to granted stateFixes #2234.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
This change is