From 7f547d61e836c7db519cc1a5be3da2777edf76b7 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 19 Mar 2024 17:34:20 +0100 Subject: [PATCH] Exit code --- build/vsts-validate.ps1 | 2 +- tests/pester.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/vsts-validate.ps1 b/build/vsts-validate.ps1 index 9e57aa5..9b445f5 100644 --- a/build/vsts-validate.ps1 +++ b/build/vsts-validate.ps1 @@ -1,2 +1,2 @@ # Run internal pester tests -& "$PSScriptRoot/../tests/pester.ps1" \ No newline at end of file +& "$PSScriptRoot/../tests/pester.ps1" diff --git a/tests/pester.ps1 b/tests/pester.ps1 index 7d38847..8963976 100644 --- a/tests/pester.ps1 +++ b/tests/pester.ps1 @@ -104,7 +104,7 @@ if ($TestFunctions) $testresults | Sort-Object Describe, Context, Name, Result, Message | Format-List -if ($totalFailed -eq 0) { Write-Host "All $totalRun tests executed without a single failure!" } +if ($totalFailed -eq 0) { Write-Host "All $totalRun tests executed without a single failure!"; exit 0 } else { Write-Host "$totalFailed tests out of $totalRun tests failed!" } if ($totalFailed -gt 0)