Skip to content

Commit

Permalink
New v5 AdHoc Tests #882
Browse files Browse the repository at this point in the history
  • Loading branch information
SQLDBAWithABeard committed Apr 26, 2022
1 parent f02b9bd commit 4464d38
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion checks/Instancev5.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,12 @@ Describe "OLE Automation" -Tag OLEAutomation, Security, CIS, Low, Instance -ForE
$PSItem.Configuration.OleAutomationProceduresEnabled.ConfigValue -eq 1 | Should -Be $psitem.ConfigValues.OLEAutomation -Because 'OLE Automation can introduce additional security risks'
}
}
}
}
Describe "Ad Hoc Workload Optimization" -Tag AdHocWorkload, Medium, Instance -ForEach $InstancesToTest {
$skip = Get-DbcConfigValue skip.instance.AdHocWorkload
Context "Checking Ad Hoc Workload Optimization on <_.Name>" {
It "Ad Hoc Workload Optimization is enabled on <_.Name>" -Skip:($skip -or $psitem.VersionMajor -lt 10) {
$PSItem.Configuration.OptimizeAdhocWorkloads.ConfigValue -eq 1 | Should -Be 1 -Because "Optimize for ad hoc workloads is a recommended setting"
}
}
}
3 changes: 3 additions & 0 deletions internal/functions/NewGet-AllInstanceInfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ function NewGet-AllInstanceInfo {
$configurations = $true
$ConfigValues | Add-Member -MemberType NoteProperty -Name 'OLEAutomation' -Value (Get-DbcConfigValue policy.oleautomation)
}
'AdHocWorkload' {
$configurations = $true
}

Default { }
}
Expand Down

0 comments on commit 4464d38

Please sign in to comment.