dsccommunity / dsccommunity/DscResource.Test
Should expand relative paths in Pester path properties
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 6
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
If the property OutputPath is used in the build.yaml with a relative path (to the project path), it will not be made an absolute path by the task, meaning in this case, the test result file end up in the wrong place.
DscTest:
Pester:
Configuration:
TestResult:
OutputPath: ./output/testResults/NUnitXml_HQRM_Tests.xml
The variable $DscTestOutputFolder is set to the absolute path of the projects './output/testResults' folder here:
So here for each property that is a path, e.g. OutputPath, should be checked whether it is an absolute path. If not, join the relative path with the path in the variable above.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect source/tasks/Invoke_HQRM_Tests.build.ps1, especially the setup around lines 90-93 and the Pester configuration around line 240. Check how OutputPath and other path properties are handled relative to $DscTestOutputFolder. Done means relative paths resolve under that absolute project output folder while absolute paths remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100