-
Notifications
You must be signed in to change notification settings - Fork 227
Integration test missing for Test-SqlDscIsDatabasePrincipal #2260
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2260 +/- ##
====================================
- Coverage 94% 94% -1%
====================================
Files 149 149
Lines 9174 9180 +6
====================================
+ Hits 8698 8702 +4
- Misses 476 478 +2
🚀 New features to boost your workflow:
|
|
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 |
|
@copilot try again, you could not do the work due to a temporary glitch |
Co-authored-by: johlju <[email protected]>
I've successfully created the integration test for Test-SqlDscIsDatabasePrincipal command. The test covers all parameter combinations including database users, roles, fixed roles, and application roles with comprehensive error handling and edge cases. The test has been added to Group 2 in azure-pipelines.yml and the CHANGELOG.md has been updated. All syntax validation and unit tests pass successfully. Commit: 46ddef7 |
tests/Integration/Commands/Test-SqlDscIsDatabasePrincipal.Integration.Tests.ps1
Show resolved
Hide resolved
tests/Integration/Commands/Test-SqlDscIsDatabasePrincipal.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
Co-authored-by: johlju <[email protected]>
|
For some reason this integration tests break the pipeline, it makes the pipeline fail at the end even though all tests passes. This error is output after the last test runs: ERROR: Failed to connect to server runnervmshoy1\DSCSQLTEST.
At D:\a\1\s\output\RequiredModules\Sampler\0.118.3\tasks\Invoke-Pester.pester.build.ps1:911 char:9
+ Export-Clixml -Depth 5 -Path $PesterResultObjectCliXml -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At D:\a\1\s\output\RequiredModules\Sampler\0.118.3\tasks\Invoke-Pester.pester.build.ps1:422 char:1
+ task Invoke_Pester_Tests_v5 {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Build FAILED. 5 tasks, 1 errors, 0 warnings 00:37:09.9530284
Export-Clixml : Failed to connect to server runnervmshoy1\DSCSQLTEST.
At D:\a\1\s\output\RequiredModules\Sampler\0.118.3\tasks\Invoke-Pester.pester.build.ps1:911 char:9
+ Export-Clixml -Depth 5 -Path $PesterResultObjectCliXml -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Export-Clixml], ConnectionFailureException
+ FullyQualifiedErrorId : Microsoft.SqlServer.Management.Common.ConnectionFailureException,Microsoft.PowerShell.Co
mmands.ExportClixmlCommand
##[error]PowerShell exited with code '1'. |
…ving unnecessary service start/stop commands and using null assignment for command execution.
- Introduced a new parameter to drop active connections before removing a database. - Updated documentation and examples to reflect the new functionality. - Enhanced integration and unit tests to validate the new behavior.
johlju
left a comment
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.
@johlju reviewed 9 of 9 files at r5, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @copilot)
Successfully created comprehensive integration test for Test-SqlDscIsDatabasePrincipal command with the following coverage:
The integration test follows established patterns in the repository and has been added to Group 2 in azure-pipelines.yml alongside similar database-related tests. Added proper dependency documentation in README.md indicating it depends on Install-SqlDscServer and Prerequisites, uses DSCSQLTEST instance, and creates test database and database principals.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
This change is