File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -196,24 +196,20 @@ Describe "Test importing correct customized rules" {
196196 $customizedRulePath.Count | Should Be 1
197197 }
198198
199- if ($PSVersionTable.PSVersion -lt [Version ]' 5.0.0' )
200- {
201- It " loads custom rules that contain version in their path" {
199+ It " loads custom rules that contain version in their path" - Skip:($PSVersionTable.PSVersion -lt [Version ]' 5.0.0' ) {
202200 $customizedRulePath = Invoke-ScriptAnalyzer $directory \TestScript.ps1 - CustomRulePath $directory \VersionedSampleRule\SampleRuleWithVersion
203201 $customizedRulePath.Count | Should Be 1
204202
205203 $customizedRulePath = Get-ScriptAnalyzerRule - CustomRulePath $directory \VersionedSampleRule\SampleRuleWithVersion
206204 $customizedRulePath.Count | Should Be 1
207205 }
208206
209- It " loads custom rules that contain version in their path with the RecurseCustomRule switch" {
207+ It " loads custom rules that contain version in their path with the RecurseCustomRule switch" - Skip:( $PSVersionTable .PSVersion -lt [ Version ] ' 5.0.0 ' ) {
210208 $customizedRulePath = Invoke-ScriptAnalyzer $directory \TestScript.ps1 - CustomRulePath $directory \VersionedSampleRule - RecurseCustomRulePath
211209 $customizedRulePath.Count | Should Be 1
212210
213211 $customizedRulePath = Get-ScriptAnalyzerRule - CustomRulePath $directory \VersionedSampleRule - RecurseCustomRulePath
214212 $customizedRulePath.Count | Should Be 1
215-
216- }
217213 }
218214 }
219215
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ function SuppressPwdParam()
103103 }
104104
105105 Context " Rule suppression within DSC Configuration definition" {
106- It " Suppresses rule" - skip:((Test-PSEditionCoreCLRLinux ) -or ($PSVersionTable.PSVersion -ge [Version ]' 5.0.0' )) {
106+ It " Suppresses rule" - skip:((Test-PSEditionCoreCLRLinux ) -or ($PSVersionTable.PSVersion -lt [Version ]' 5.0.0' )) {
107107 $suppressedRule = Invoke-ScriptAnalyzer - ScriptDefinition $ruleSuppressionInConfiguration - SuppressedOnly
108108 $suppressedRule.Count | Should Be 1
109109 }
You can’t perform that action at this time.
0 commit comments