Closed
Description
The root cause is that
Initialize-TestEnvironment
saves the current machine environment variablePSModulePath
and then updates it with the path to the built module.
DscResource.Test/source/Public/Initialize-TestEnvironment.ps1
Lines 177 to 207 in 73d6c32
- The tests run for SqlSetup and the installation sets a new path to SQLPS in machine environment variable
PSModulePath
.
DscResource.Test/source/Public/Restore-TestEnvironment.ps1
Lines 38 to 47 in 73d6c32
- After the tests finishes the command
Restore-TestEnvironment
reverts the machine environment variablePSModulePath
to the one saved in step 1 overwriting the new path that was set in step 2. - All other tests no longer finds the module SQLPS and fails.
Originally posted by @johlju in dsccommunity/SqlServerDsc#1932 (comment)