Closed vquigley closed 2 years ago
Please edit the post, and fix the formatting.
Please edit the post, and fix the formatting.
Done. Sorry about that
Seems to be Pester discovery on PowerShellGet. The NoClobber parameter is added after the fact, perhaps there's some difference in System.Management.Automation versions parsing this script, or a change to discovery between Pester 4 and 5?
If I'm reading this correctly, there was some change between versions of Automation to remove -NoClobber parameter. Pester is using an older version of this dependency.
Closing as the tests are written for Pester 4 and were not compatible with Pester 5. There's dot-sourcing of config-data ++ in the root of the test-file which is later used in the tests -> Pester v4 code. You could also see it in the CI-pipeline.
Can't say why it worked on Win10, but on Win7 it's probably resolving to the built-in PowerShellGet module which doesn't have those parameters for the PSModule DSCResource. The CI adds paths to $env:PSModulePath
++ which would resolve to the locally built PowerShellGet. This is unrelated to Pester.
Question
I have a set of pester tests that work great in Win10 but I cannot get them to work in Windows 7.
I am sure I have the wrong version of a dependency but I cannot work it out and would love if someone could help me.
Environment data Pester version : 5.0.4 C:\Program Files\WindowsPowerShell\Modules\Pester\5.0.4\Pester.psm1 PowerShell version : 5.1.14409.1005 OS version : Microsoft Windows NT 6.1.7601 Service Pack 1
Have also tried Pester 5.1.1