Skip to content

Commit adbba7f

Browse files
andreasjordanclaude
andcommitted
New-DbaComputerCertificate - Match the warning text across all warnings of the failed request
(do New-DbaComputerCertificate) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent aa64d71 commit adbba7f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎tests/New-DbaComputerCertificate.Tests.ps1‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ Describe $CommandName -Tag IntegrationTests {
304304

305305
It "Warns instead of returning a certificate" {
306306
$unreachableCaResult | Should -BeNullOrEmpty
307-
$unreachableCaWarning | Should -Match "Failure when attempting to create the cert"
307+
# The command writes several warnings on this path, the last one is the message of Stop-Function.
308+
($unreachableCaWarning -join " ") | Should -Match "Failure when attempting to create the cert"
308309
}
309310

310311
It "Removes the pending request and its key again" {

0 commit comments

Comments
 (0)