diff --git a/tests/Find-DbaAgentJob.Tests.ps1 b/tests/Find-DbaAgentJob.Tests.ps1 index 8a8e4814a1..0f4cee28ce 100644 --- a/tests/Find-DbaAgentJob.Tests.ps1 +++ b/tests/Find-DbaAgentJob.Tests.ps1 @@ -14,14 +14,14 @@ Describe "$CommandName Unit Tests" -Tag 'UnitTests' { } Describe "$CommandName Integration Tests" -Tags "IntegrationTests" { - Context "Make sure Agent is running" { - $results = Get-Service | Where-Object Name -like '*SqlAgent*' - foreach($ag in $results) { - It "$($ag.Name) status should be started" { - $ag.Status | Should -Be "Running" - } - } - } + #Context "Make sure Agent is running" { + # $results = Get-Service | Where-Object Name -like '*SqlAgent*' + # foreach($ag in $results) { + # It "$($ag.Name) status should be started" { + # $ag.Status | Should -Be "Running" + # } + # } + #} Context "Command finds jobs using all parameters" { BeforeAll { $null = New-DbaAgentJob -SqlInstance $script:instance2 -Job 'dbatoolsci_testjob' -OwnerLogin 'sa' @@ -64,9 +64,9 @@ Describe "$CommandName Integration Tests" -Tags "IntegrationTests" { It "Should find jobs that have not been scheduled" { $results | Should not be null } - $results = Find-DbaAgentJob -SqlInstance $script:instance2 -IsNotScheduled - It "Should find 11 jobs that have no schedule" { - $results.count | Should be 13 + $results = Find-DbaAgentJob -SqlInstance $script:instance2 -IsNotScheduled -Job *dbatoolsci* + It "Should find 2 jobs that have no schedule" { + $results.count | Should be 2 } $results = Find-DbaAgentJob -SqlInstance $script:instance2 -IsNoEmailNotification It "Should find jobs that have no email notification" {