-
Notifications
You must be signed in to change notification settings - Fork 227
Add integration test for New-SqlDscAudit command #2257
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 #2257 +/- ##
====================================
Coverage 94% 94%
====================================
Files 149 149
Lines 9163 9163
====================================
Hits 8687 8687
Misses 476 476
🚀 New features to boost your workflow:
|
tests/Integration/Commands/New-SqlDscAudit.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
tests/Integration/Commands/New-SqlDscAudit.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
tests/Integration/Commands/New-SqlDscAudit.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
…re proper file ending 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/New-SqlDscAudit.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
…equired parameters for ReserveDiskSpace Co-authored-by: johlju <[email protected]>
Co-authored-by: johlju <[email protected]>
tests/Integration/Commands/New-SqlDscAudit.Integration.Tests.ps1
Outdated
Show resolved
Hide resolved
Co-authored-by: johlju <[email protected]>
Create integration test for New-SqlDscAudit command
Plan
Based on my exploration of the repository structure and existing integration tests, I need to implement the following to address the issue:
New-SqlDscAuditcommand functionalityRemove-SqlDscAudit.Integration.Tests.ps1)New-SqlDscAudit.Integration.Tests.ps1following established patternsImplementation Details
Integration Test Coverage
The new integration test (
New-SqlDscAudit.Integration.Tests.ps1) provides comprehensive coverage for:Recent Updates (Latest Commit)
.TrimEnd('\', '/')to both the actual and expected FilePath values before comparison. SQL Server normalizes file paths by adding trailing directory separators, so the test now handles this normalization properly.Previous Updates
([database_name]='master')instead of the input expression([database_name] = 'master'). SQL Server automatically removes spaces around operators when storing filter expressions.$env:TEMPtoC:\Temp\SqlDscTestAuditsto ensure SQL Server service can access the location-MaximumFileSizeand-MaximumFileSizeUnitparameters when using-ReserveDiskSpaceto comply with SQL Server requirements (RESERVE_DISK_SPACE cannot be used with MAXSIZE = UNLIMITED)-PassThruparameter to allNew-SqlDscAuditinvocations where a return value is expected, ensuring proper object returnnoopinstead ofbuild)Pipeline Integration
azure-pipelines.ymlin the appropriate alphabetical positionDocumentation Updates
CHANGELOG.mdto document the new integration testtests/Integration/Commands/README.mdto include the new test in the dependency tableValidation
Fixes #2226.
✨ 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