Skip to content
Permalink
Browse files

change for if the value is NULL

  • Loading branch information...
SQLDBAWithABeard committed Jun 4, 2019
1 parent b9a957a commit 9ea1ccc000f86e54f6cfae3c41d2c6894369ff45
Showing with 3 additions and 3 deletions.
  1. +3 −3 checks/MaintenanceSolution.Tests.ps1
@@ -109,7 +109,7 @@ Describe "Ola - $UserFullJobName" -Tags UserFull, OlaJobs, $filename {

It "Is the backup retention set to at least $Retention hours on $psitem" {
if ($results) {
[int]$hours = $results.split("=")[1].split(",").split(" ")[1]
[int]$hours = $results.split("=")[1].split(",").split(" ")[1].replace('NULL','')
}
$hours | Should -BeGreaterOrEqual $Retention -Because "The backup retention for $UserFullJobName needs to be correct"
}
@@ -153,7 +153,7 @@ Describe "Ola - $UserDiffJobName" -Tags UserDiff, OlaJobs, $filename {

It "Is the backup retention set to at least $Retention hours on $psitem" {
if ($results) {
[int]$hours = $results.split("=")[1].split(",").split(" ")[1]
[int]$hours = $results.split("=")[1].split(",").split(" ")[1].replace('NULL','')
}
$hours | Should -BeGreaterOrEqual $Retention -Because "The backup retention for $UserDiffJobName needs to be correct"
}
@@ -197,7 +197,7 @@ Describe "Ola - $UserLogJobName" -Tags UserLog, OlaJobs, $filename {

It "Is the backup retention set to at least $Retention hours on $psitem" {
if ($results) {
[int]$hours = $results.split("=")[1].split(",").split(" ")[1]
[int]$hours = $results.split("=")[1].split(",").split(" ")[1].replace('NULL','')
}
$hours | Should -BeGreaterOrEqual $Retention -Because "The backup retention for $UserLogJobName needs to be correct"
}

0 comments on commit 9ea1ccc

Please sign in to comment.
You can’t perform that action at this time.