-
Notifications
You must be signed in to change notification settings - Fork 227
Add integration tests for Save-SqlDscSqlServerMediaFile command #2268
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
… command Co-authored-by: johlju <[email protected]>
tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1
Show resolved
Hide resolved
tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
…message, add blank line ending, update 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/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
… same file twice instead of creating dummy ISO Co-authored-by: johlju <[email protected]>
tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
…oad to avoid ISO safety check Co-authored-by: johlju <[email protected]>
tests/Integration/Commands/Save-SqlDscSqlServerMediaFile.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
…d - use Should -Throw instead of Should -Throw -ExpectedMessage 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 #2268 +/- ##
====================================
Coverage 94% 94%
====================================
Files 149 149
Lines 9163 9163
====================================
Hits 8687 8687
Misses 476 476
🚀 New features to boost your workflow:
|
Save-SqlDscSqlServerMediaFilecommand functionalityShould -Throw -ExpectedMessage '*InvalidDestinationFolder*'toShould -ThrowLatest Refinement:
Simplified the error condition test in the integration tests by removing the specific error message check. Integration tests should focus on testing that the expected behavior occurs (error is thrown) rather than validating specific error messages, which is more appropriate for unit tests.
This follows integration testing best practices where we test the overall behavior and outcomes rather than implementation details like specific error messages.
Fixes #2237.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
This change is