You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context "Testing Invalid SQL Agent Job Owner on <_.Name>" {
137
-
It "The Job <_.JobName> has the Job Owner <_.ActualJobOwnerName> that shouldn't exist in this list ($([String]::Join(', ',"<_.InvalidJobOwnerName>"))) on <_.InstanceName>"-Skip:$skipAgentJobTargetOwner-ForEach ($PSItem.InvalidJobOwner) {
134
+
It "The Job <_.JobName> has the Job Owner <_.ActualJobOwnerName> that shouldn't exist in this list ($([String]::Join(', ',"<_.InvalidJobOwnerName>"))) on <_.InstanceName>"-Skip:$skipAgentJobTargetInvalidOwner-ForEach ($PSItem.InvalidJobOwner) {
138
135
$PSItem.ActualJobOwnerName| Should -Not-BeIn $PSItem.InvalidJobOwnerName-Because 'The account that is the job owner has been defined as not valid'
It "Job <_.JobName> last run duration (<_.Duration> seconds) should not be greater than <_.ExpectedRunningJobPercentage>% extra of the average run time (<_.Average> seconds) on <_.InstanceName>"-Skip:$skipAgentJobLastRun-ForEach ($PSItem.LastJobRuns) {
147
+
$PSItem.ActualRunningJobPercentage| Should -BeLessThan $PSItem.ExpectedRunningJobPercentage-Because "The last run of job $($PSItem.JobName) was $($PSItem.Duration) seconds. This is more than the $($PSItem.ExpectedRunningJobPercentage)% specified as the maximum variance"
# It "Job $($lastagentjobrun.JobName) last run duration should be not be greater than $runningjobpercentage % extra of the average run time on $psitem" -Skip:$skip {
0 commit comments