Update Pester to 6.0.0#2464
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2464 +/- ##
======================================
+ Coverage 91% 94% +2%
======================================
Files 32 227 +195
Lines 5353 10871 +5518
======================================
+ Hits 4904 10235 +5331
- Misses 449 636 +187
🚀 New features to boost your workflow:
|
|
@nohwnd there are some errors in tests that was unexpected (might also be badly written tests): https://dev.azure.com/dsccommunity/SqlServerDsc/_build/results?buildId=13778&view=logs&jobId=693c28b6-fc92-5285-49e3-c3007ddf58e1&j=693c28b6-fc92-5285-49e3-c3007ddf58e1&t=26bd4ad7-0939-5a8f-a28d-c1a967a90564 |
|
Yup. This pipeline is being fixed, was just waiting for release of rc2 which reverts another issue that impacts this repo. |
Update the existing RequiredModules Pester prerelease pin from latest to 6.0.0-rc1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
….0.0-rc2 Pester 6 no longer falls through to the real command when a mock with a -ParameterFilter does not match, removed Assert-* helpers, and throws on duplicate AfterAll blocks. Update the affected unit tests: - Add forwarding default mocks (-> real cmdlet via Get-Command -CommandType Cmdlet) for Test-Path and New-Object where mock bodies or validation call the cmdlet with arguments not covered by an existing -ParameterFilter (Save-SqlDscSqlServerMediaFile, Invoke-ReportServerSetupAction, DSC_SqlDatabaseObjectPermission, Connect-SQL, DSC_SqlLogin). - Add a $null default mock for Get-RegistryPropertyValue in SqlSetup\Get-TargetResource so registry lookups other than ImagePath resolve to $null as the real function does on a build agent. - Add a default Get-PrimaryReplicaServerObject mock returning the passed ServerObject in SqlAG\Set-TargetResource. - Filter the two New-Object Should -Invoke assertions in DSC_SqlLogin to the SMO Login type so the forwarding default does not change the counts. - Merge a duplicate AfterAll block in Get-SqlDscConfigurationOption. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pester 6.0.0 is now released 🎉 — thanks for letting me pilot the release candidates against your suite.
This updates the earlier release-candidate pin to the final 6.0.0 and keeps the test changes needed to run on Pester 6 (already in this PR). It's the same migration you'd make yourself, so you're welcome to merge it, cherry-pick just the compatibility changes, or use it purely as a reference.
Your unit + HQRM + full integration matrix all pass on 6.0.0 in this PR. 🟢
The real-world CI signal from this pilot was genuinely valuable in getting 6.0.0 right. Thanks for the CI time this used, and for maintaining a suite I could test against.
This PR was co-authored by GitHub Copilot.
— Jakub & Copilot
This change is