Skip to content

Update Pester to 6.0.0#2464

Draft
nohwnd wants to merge 4 commits into
dsccommunity:mainfrom
nohwnd:pester-6-rc
Draft

Update Pester to 6.0.0#2464
nohwnd wants to merge 4 commits into
dsccommunity:mainfrom
nohwnd:pester-6-rc

Conversation

@nohwnd

@nohwnd nohwnd commented Jun 28, 2026

Copy link
Copy Markdown

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 Reviewable

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9685bbc1-0e48-409c-99a6-f483cd49a663

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94%. Comparing base (9400ebf) to head (03aefd9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff           @@
##           main   #2464     +/-   ##
======================================
+ Coverage    91%     94%     +2%     
======================================
  Files        32     227    +195     
  Lines      5353   10871   +5518     
======================================
+ Hits       4904   10235   +5331     
- Misses      449     636    +187     
Flag Coverage Δ
unit 94% <ø> (+2%) ⬆️
see 197 files with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@johlju

johlju commented Jun 28, 2026

Copy link
Copy Markdown
Member

@nohwnd

nohwnd commented Jun 28, 2026

Copy link
Copy Markdown
Author

Yup. This pipeline is being fixed, was just waiting for release of rc2 which reverts another issue that impacts this repo.

nohwnd and others added 2 commits June 28, 2026 20:14
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>
nohwnd and others added 2 commits July 1, 2026 09:33
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nohwnd nohwnd changed the title [DO NOT MERGE] Pester 6.0.0 release candidate update Update Pester to 6.0.0 Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants