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 "esting SQL Agent Alert System database mail profile is set on <_.Name>" {
115
+
Context "Testing SQL Agent Alert System database mail profile is set on <_.Name>" {
111
116
It "The SQL Server Agent Alert System has the mail profile <_.AgentMailProfile.ExpectedAgentMailProfile> enabled as profile on <_.Name>."-Skip:$skipAgentMailProfile { #-ForEach ($PSItem.DatabaseMailProfile | Where-Object ExpectedDatabaseMailProfile -NE 'null') {
112
117
$PSItem.AgentMailProfile.ActualAgentMailProfile| Should -Be $PSItem.AgentMailProfile.ExpectedAgentMailProfile-Because 'The SQL Agent Alert System needs an enabled database mail profile to send alert emails'
Context "Testing SQL Agent Job Owner on <_.Name>" {
126
+
It "The Job <_.JobName> has the Job Owner <_.ActualJobOwnerName> that should exist in this list ($([String]::Join(', ',"<_.ExpectedJobOwnerName>"))) on <_.InstanceName>"-Skip:$skipAgentJobTargetOwner-ForEach ($PSItem.JobOwner) {
127
+
$PSItem.ActualJobOwnerName| Should -BeIn $PSItem.ExpectedJobOwnerName-Because 'The account that is the job owner is not what was expected'
# It "Job $($psitem.Name) - owner $($psitem.OwnerLoginName) should be in this list ( $( [String]::Join(", ", $targetowner) ) ) on $($psitem.SqlInstance)" {
168
-
# $psitem.OwnerLoginName | Should -BeIn $TargetOwner -Because "The account that is the job owner is not what was expected"
0 commit comments