Skip to content

Commit

Permalink
Fix discovery phase to fail (issue #112) (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
johlju authored Apr 20, 2022
1 parent 1a281ab commit 7096844
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Updated pipeline to use the latest build and pipeline files from Sampler.

### Fixed

- Now the pipeline will fail if the Pester discovery phase fails. Prior
if discovery failed the pipeline still passed ([issue #112](https://github.com/dsccommunity/DscResource.Test/issues/112)).

## [0.16.0] - 2021-09-11

### Added
Expand Down
9 changes: 9 additions & 0 deletions source/tasks/Invoke_HQRM_Tests.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -485,4 +485,13 @@ task Invoke_HQRM_Tests {
$DscTestResultObjectCliXml = Join-Path -Path $DscTestOutputFolder -ChildPath "DscTestObject_$DscTestOutputFileFileName"

$null = $script:testResults | Export-CliXml -Path $DscTestResultObjectCliXml -Force

<#
Verify so that all containers (discovery phase) ran and all tests passed,
if not make sure the test pipeline correctly fails.
#>
if ($script:testResults.Result -eq 'Failed')
{
throw 'Pester reported failure. Tests did not pass.'
}
}

0 comments on commit 7096844

Please sign in to comment.