Skip to content

Commit 22b1c3a

Browse files
author
Kapil Borle
committed
Skip few tests in RuleSuppression for Linux
We skip them because the parser throws error while parsing DSC configuration on PowerShellCore on Linux.
1 parent 8e99c7e commit 22b1c3a

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Tests/Engine/RuleSuppression.tests.ps1

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,10 @@ function SuppressPwdParam()
102102
}
103103
}
104104

105-
if (($PSVersionTable.PSVersion -ge [Version]'5.0'))
106-
{
107-
Context "Rule suppression within DSC Configuration definition" {
108-
It "Suppresses rule" {
109-
$suppressedRule = Invoke-ScriptAnalyzer -ScriptDefinition $ruleSuppressionInConfiguration -SuppressedOnly
110-
$suppressedRule.Count | Should Be 1
111-
}
105+
Context "Rule suppression within DSC Configuration definition" {
106+
It "Suppresses rule" -skip:((Test-PSEditionCoreCLRLinux) -or ($PSVersionTable.PSVersion -ge [Version]'5.0')) {
107+
$suppressedRule = Invoke-ScriptAnalyzer -ScriptDefinition $ruleSuppressionInConfiguration -SuppressedOnly
108+
$suppressedRule.Count | Should Be 1
112109
}
113110
}
114111

0 commit comments

Comments
 (0)