Skip to content

Upgrade test stack to Pester 6.2.0 - #20

Merged
vartaxe merged 1 commit into
mainfrom
chore/pester-6
Oct 6, 2026
Merged

vartaxe merged 1 commit into
mainfrom
chore/pester-6

Conversation

@vartaxe

@vartaxe vartaxe commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Summary

Upgrades the test stack from Pester 5.7.1 to 6.2.0.

Pester 6 removed mock fall-through (unmatched mocks no longer invoke the real
command), which broke the filtered New-Object mocks in Tests/Runtime.Tests.ps1:
Connect-LdapServer constructs an LdapDirectoryIdentifier before the mocked
LdapConnection, and the unmatched call started throwing. Fixed by adding an
explicit unfiltered default mock at each site that forwards -TypeName and
-ArgumentList to the real cmdlet. Verified green under both Pester 5.7.1
and 6.2.0, so the test change is not version-locked.

All seven version pins were bumped (build/Invoke-Validation.ps1, both workflows,
this PR template, docs/validation.md) and CHECKSUMS.txt was regenerated.

Scripts/Add-ComputerToADGroup.ps1, VERSION, CHANGELOG.md and RELEASE-NOTES.md
are untouched; this is a tooling-only change and the v1.0.0 release and tag are
unaffected.

Validation

  • build\Invoke-Validation.ps1 passes on Windows PowerShell 5.1 — Validation passed., 228.8s
  • PSScriptAnalyzer returns no findings — 1.25.0, Error+Warning over Scripts, Tests, build
  • Pester 6.2.0 discovery and tests pass — Tests Passed: 227, Failed: 0, Skipped: 0, Inconclusive: 0, NotRun: 0
  • Full validation runs without -SkipChecksums; manifest matches worktree and candidate git archive — SHA-256 manifest verified against exact source bytes.
  • Live results are recorded separately, with untested scenarios explicitly pending — no live Active Directory or ConfigMgr testing was performed; docs/validation.md still lists every live test as Not executed
  • Documentation updated if behavior changed — no runtime behavior changed; docs/validation.md updated for the new Pester version and install command
  • No credentials, internal values, or sensitive logs included

Pester 6 no longer falls through unmatched mocks to the real command, so
the filtered New-Object mocks in Tests/Runtime.Tests.ps1 broke the LDAP
connection tests. Add explicit unfiltered default mocks that forward
-TypeName and -ArgumentList to the real cmdlet; this is green under both
Pester 5.7.1 and 6.2.0.

Bump every Pester version pin (validator, both workflows, PR template,
validation docs) and regenerate CHECKSUMS.txt. No production script,
VERSION, CHANGELOG or release-notes changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 20:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vartaxe
vartaxe merged commit 4ddd06e into main Oct 6, 2026
3 checks passed
@vartaxe
vartaxe deleted the chore/pester-6 branch October 6, 2026 20:07
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