Repository navigation
Unit Tests to ensure compatibility with PS 7 and PS 5.1 - #1572
Givinalis Omachar (givinalis) wants to merge 5 commits into
Conversation
|
Learn Build status updates of commit 1db0a13: ❌ Validation status: errorsPlease follow instructions here which may help to resolve issue.
For more details, please refer to the build report. Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them. |
|
Learn Build status updates of commit 5dfe0e2: ❌ Validation status: errorsPlease follow instructions here which may help to resolve issue.
For more details, please refer to the build report. Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them. |
|
Learn Build status updates of commit 4587ef7: ❌ Validation status: errorsPlease follow instructions here which may help to resolve issue.
For more details, please refer to the build report. Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them. |
|
Learn Build status updates of commit 17941e3: ❌ Validation status: errorsPlease follow instructions here which may help to resolve issue.
For more details, please refer to the build report. Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them. |
There was a problem hiding this comment.
Request changes — reviewed commit 17941e3461d078aa133b4f01f4ceb2118551e507.1
[P1] Test the build artifact, not an installed module. Both new test files prefer Get-Module -ListAvailable over the checkout's build output. In addition, Test-ModuleImportPS51 discards the supplied path and imports only its basename. An older installed module can therefore make a broken PR build appear compatible.
I reproduced this with the exact helper: supplied a local module file that immediately throws, placed a healthy module with the same name on PSModulePath, and the helper returned True. The beta helper has the same implementation.
Discover the modules produced by this checkout, import their absolute manifest/module paths in clean subprocesses, and assert the expected module set. Add a regression case where a healthy installed version coexists with a broken build; it must fail.
No live tenant operations were performed. The existing functional CI result is failed and OpenPublishing is also red; these tests cannot currently provide the compatibility assurance described by the PR.
Footnotes
-
AI-assisted review by Codex (1 agent). Model:
gpt-6-astra. Configured reasoning effort:high(verified from the review session metadata). Review effort: detailed source review with the validation described above. Skill:engineering:code-review. Tools: GitHub API/CLI, Git, PowerShell source analysis and isolated runtime probes. ↩
Changes
Automated test suite that validates all 18 Entra and EntraBeta PowerShell modules can be successfully imported in both PowerShell 5.1 and PowerShell 7+.
What It Tests
Why It Matters
PowerShell 5.1 has stricter parsing rules and different Unicode handling than PS 7+. This ensures modules work in both environments without breaking enterprise customers still using Windows PowerShell.