Skip to content

Commit

Permalink
needs to be the right reference #882
Browse files Browse the repository at this point in the history
  • Loading branch information
SQLDBAWithABeard committed May 12, 2023
1 parent be468ac commit a46e6b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/checks/Instancev5.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ Describe "Successful Login Auditing" -Tag LoginAuditSuccessful, Security, CIS, M

Describe "Login Check Policy" -Tag LoginCheckPolicy, Security, CIS, Medium, Instance -ForEach $InstancesToTest {
$skip = ($__dbcconfig | Where-Object { $_.Name -eq 'skip.security.LoginCheckPolicy' }).Value
Context "Testing if the CHECK_POLICY is enabled on all logins on $psitem" {
It "All logins should have the CHECK_POLICY option set to ON on $psitem" -Skip:$skip {
Context "Testing if the CHECK_POLICY is enabled on all logins on <_.Name>" {
It "All logins should have the CHECK_POLICY option set to ON on <_.Name>" -Skip:$skip {
($psitem.logins | Where-Object { $_.LoginType -eq 'SqlLogin' -and $_.PasswordPolicyEnforced -eq $false -and $_.IsDisabled -eq $false }).Count | Should -Be 0 -Because "We expected the CHECK_POLICY for the all logins to be enabled"
}
}
Expand Down

0 comments on commit a46e6b2

Please sign in to comment.