You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.
When running in an environment of least privilege, you cannot run DSC tests making use of TestHelper.psm1.
The helper attempts to make registry changes on line 373. My analysis seems to show that we don't need to make this change at a system level, for all future executions of PowerShell. My recommendation is to remove like 373. If removal cannot occur, then place the correct # requires statement to ensure that it is executed as an Administrator.
The script modifies the execution policy. Once again this creates issues on multiple levels. This logic should be removed, and recommendations made on how the environment should be setup.
There is also calls to install-module that need to be addressed as well.
The text was updated successfully, but these errors were encountered:
Hi there. The reason for the system level changes to the PSModulePath is so that the integration tests can run. The LCM runs under a different context than the user initiating the tests. So this is currently the only way to ensure that the module being integration tested can be found.
That being said, this isn't necessary for unit tests. There is already an issue open for correcting this.
Thanks for feedback, as @PlagueHO noticed, this is duplicate of #58, so I'll close it for now.
Feel free to reply in #58 if you have further comments.
Thanks!
Hi,
When running in an environment of least privilege, you cannot run DSC tests making use of TestHelper.psm1.
The helper attempts to make registry changes on line 373. My analysis seems to show that we don't need to make this change at a system level, for all future executions of PowerShell. My recommendation is to remove like 373. If removal cannot occur, then place the correct # requires statement to ensure that it is executed as an Administrator.
The script modifies the execution policy. Once again this creates issues on multiple levels. This logic should be removed, and recommendations made on how the environment should be setup.
There is also calls to install-module that need to be addressed as well.
The text was updated successfully, but these errors were encountered: