Fix broken Invoke-PesterTests runner#1663
Open
bcullman wants to merge 6 commits intoOctopusDeploy:masterfrom
Open
Fix broken Invoke-PesterTests runner#1663bcullman wants to merge 6 commits intoOctopusDeploy:masterfrom
bcullman wants to merge 6 commits intoOctopusDeploy:masterfrom
Conversation
|
Start Hyponome locally |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
After submitting and completing #1658, I realized I should have at least attempted to add tests around that change.
When I sat down to do that, I noticed there are actually two
Invoke-PesterTests.ps1scripts in this repo, and they did not behave consistently:StepTemplatePackerrunner was brokenstep-templatesrunner had separate runner logic and different Pester resolution behaviorThis PR cleans that up so that both test runners execute successfully again.
The intent here is to fix the runners themselves, not to change the behavior of the underlying test suites. The tests still pass (or fail) as they did before on
masteronce the runners are able to start correctly.Results
This PR:
Invoke-PesterTests.ps1entrypointsStepTemplatePackerrunner import/path behaviorstep-templatesunpack-before-test behaviorpwshon non-Windows environmentsBefore
Invoke-PesterTests.ps1scripts was reliably runnabletools/StepTemplatePacker/tests/Invoke-PesterTests.ps1could fail during Pester import/path resolutionAfter
Invoke-PesterTests.ps1scripts run successfullyStepTemplatePackertest runner starts and executes tests instead of failing during setupstep-templatesrunner still reports the same underlying scheduled-task test failures that already existed onmasterpwshon macOSPre-requisites
IdorVersionchanges are required