File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -367,10 +367,18 @@ function Invoke-DbcCheck {
367
367
$configuration = New-PesterConfiguration
368
368
$configuration.Output.Verbosity = $NewShow
369
369
$configuration.Filter.Tag = $check + ' FailedConnections'
370
- $configuration.Filter.ExcludeTag = $ExcludeCheck
370
+ # Exclude the excluded checks and the not converted checks
371
+ $notv5 = (Get-PSFConfigValue - FullName ' dbachecks.checks.notv5ready' )
372
+ $configuration.Filter.ExcludeTag = $ExcludeCheck + $notv5
373
+
371
374
if ($PassThru ) {
372
375
$configuration.Run.PassThru = $true
373
376
}
377
+ # So that if the only check passed in is not yet converted - so that we dont get red.
378
+ if ($check -in $notv5 ) {
379
+ Write-PSFMessage - Message " You are running a single check that is not yet converted to v5." - Level Warning
380
+ Return
381
+ }
374
382
} catch {
375
383
Write-PSFMessage - Message ' Something Went wrong' - Level Warning - ErrorRecord $_
376
384
Return
You can’t perform that action at this time.
0 commit comments