Skip to content

Commit d67d53b

Browse files
committed
Ensure all errors are shown
1 parent 2b7e486 commit d67d53b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

git-release.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ if (-not $force) {
6363
type = 'assert-updated'
6464
parameters = @{ downstream = $cleanupOnly ? $target : $source; upstream = $branch }
6565
}
66-
Assert-Diagnostics $diagnostics
6766
}
67+
Assert-Diagnostics $diagnostics
6868
}
6969

7070
# For all branches:

git-release.tests.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ Describe 'git-release' {
7474
} -initialCommits $initialCommits
7575
Initialize-LocalActionAssertUpdatedSuccess 'rc/2022-07-14' 'main' -initialCommits $initialCommits
7676
Initialize-LocalActionAssertUpdatedFailure 'rc/2022-07-14' 'feature/XYZ-1-services' -initialCommits $initialCommits
77-
Initialize-LocalActionAssertUpdatedSuccess 'rc/2022-07-14' 'feature/FOO-123' -initialCommits $initialCommits
77+
Initialize-LocalActionAssertUpdatedFailure 'rc/2022-07-14' 'feature/FOO-123' -initialCommits $initialCommits
7878

7979
{ & $PSScriptRoot/git-release.ps1 rc/2022-07-14 main } | Should -Throw
80-
$fw.assertDiagnosticOutput | Should -Be 'ERR: The branch feature/XYZ-1-services has changes that are not in rc/2022-07-14'
80+
$fw.assertDiagnosticOutput.Count | Should -Be 2
81+
$fw.assertDiagnosticOutput | Should -Contain 'ERR: The branch feature/XYZ-1-services has changes that are not in rc/2022-07-14'
82+
$fw.assertDiagnosticOutput | Should -Contain 'ERR: The branch feature/FOO-123 has changes that are not in rc/2022-07-14'
8183
}
8284

8385
It 'allows forced removal even if an intermediate branches were not fully released' {

0 commit comments

Comments
 (0)