Skip to content

Commit 67a1b09

Browse files
committed
Suppress error output in New-SqlDscAgentOperator call by assigning command result to $null
1 parent f68b64b commit 67a1b09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Integration/Commands/Assert-SqlDscAgentOperator.Integration.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Describe 'Assert-SqlDscAgentOperator' -Tag 'Integration_SQL2017', 'Integration_S
5252
$script:sqlServerObject = Connect-SqlDscDatabaseEngine -InstanceName $script:sqlServerInstance -Credential $script:mockSqlAdminCredential -ErrorAction 'Stop'
5353

5454
# Create a test operator for assertion tests
55-
$script:sqlServerObject | New-SqlDscAgentOperator -Name 'IntegrationTest_AssertOperator' -EmailAddress 'assert@contoso.com' -ErrorAction 'Stop'
55+
$null = $script:sqlServerObject | New-SqlDscAgentOperator -Name 'IntegrationTest_AssertOperator' -EmailAddress 'assert@contoso.com' -ErrorAction 'Stop'
5656
}
5757

5858
AfterAll {

0 commit comments

Comments
 (0)