Repository navigation
Upgrade test stack to Pester 6.2.0 - #20
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-Objectmocks inTests/Runtime.Tests.ps1:Connect-LdapServerconstructs anLdapDirectoryIdentifierbefore the mockedLdapConnection, and the unmatched call started throwing. Fixed by adding anexplicit unfiltered default mock at each site that forwards
-TypeNameand-ArgumentListto the real cmdlet. Verified green under both Pester 5.7.1and 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) andCHECKSUMS.txtwas regenerated.Scripts/Add-ComputerToADGroup.ps1,VERSION,CHANGELOG.mdandRELEASE-NOTES.mdare untouched; this is a tooling-only change and the v1.0.0 release and tag are
unaffected.
Validation
build\Invoke-Validation.ps1passes on Windows PowerShell 5.1 —Validation passed., 228.8sScripts,Tests,buildTests Passed: 227, Failed: 0, Skipped: 0, Inconclusive: 0, NotRun: 0-SkipChecksums; manifest matches worktree and candidategit archive—SHA-256 manifest verified against exact source bytes.docs/validation.mdstill lists every live test asNot executeddocs/validation.mdupdated for the new Pester version and install command