-
Notifications
You must be signed in to change notification settings - Fork 49
TestHelper\Get-PSModulePathItem Bug #217
Comments
I started getting this issue as well on my Windows 10 machine. But this test doesn't seem to fail on AppVeyor. So adding the slash might cause this to fail on AppVeyor. |
@PlagueHO, this issue occurs on AppVeyor: https://ci.appveyor.com/project/pvs043/cmdtbuildlab/branch/dev?fullLog=true (line 498) I spent test at Windows 2016: Thus, suggest doing check on both options: with slash and without. |
@pvs043 - I don't get this issue on AppVeyor, but I do not specify the AppVeyor build worker image, which results in using But yes, I agree, we should check for both. |
My patch:
|
- Changed Get-PSModulePathItem to trim end back slash (issue #217)
This was resolved in PR #221 |
- Fix codecov no longer generates an error message when uploading test coverage (issue PowerShell#217).
I'm include your module to appveyor.yml for test my project (https://github.com/pvs043/cMDTBuildLab/blob/dev/appveyor.yml), line 41
After the check error occured:
[00:01:12] Describing TestHelper\Get-PSModulePathItem
[00:01:12] Context When querying for folder path
[00:01:13] [-] Should return the correct folder 140ms
[00:01:13] Expected strings to be the same, but they were different.
[00:01:13] Expected length: 50
[00:01:13] Actual length: 51
[00:01:13] Strings differ at index 50.
[00:01:13] Expected: 'C:\windows\system32\WindowsPowerShell\v1.0\Modules'
[00:01:13] But was: 'C:\windows\system32\WindowsPowerShell\v1.0\Modules\'
[00:01:13] -------------------------------------------------------------^
[00:01:13] 335: Get-PSModulePathItem -Prefix $env:SystemRoot | Should -Be $systemModulePath
[00:01:13] at <ScriptBlock>, C:\projects\Build\cMDTBuildLab\DscResource.Tests\Tests\Unit\TestHelper.Tests.ps1: line 335
This Error occurs after test (line 328):
What about to change hardcoded "-ChildPath 'system32\WindowsPowerShell\v1.0\Modules" to "-ChildPath 'system32\WindowsPowerShell\v1.0\Modules\"? (add slash to end)
The text was updated successfully, but these errors were encountered: