Skip to content

Commit 2578344

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
fix test
1 parent c4ffac4 commit 2578344

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

dsc/tests/dsc_extension_discover.tests.ps1

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,31 @@ Describe 'Discover extension tests' {
1515
It 'Discover extensions' {
1616
$out = dsc extension list | ConvertFrom-Json
1717
$LASTEXITCODE | Should -Be 0
18-
$out.Count | Should -Be 3 -Because ($out | Out-String)
19-
$out[0].type | Should -Be 'Microsoft.DSC.Extension/Bicep'
20-
$out[0].version | Should -Be '0.1.0'
21-
$out[0].capabilities | Should -BeExactly @('import')
22-
$out[0].manifest | Should -Not -BeNullOrEmpty
23-
$out[1].type | Should -Be 'Microsoft.Windows.Appx/Discover'
24-
$out[1].version | Should -Be '0.1.0'
25-
$out[1].capabilities | Should -BeExactly @('discover')
26-
$out[2].type | Should -BeExactly 'Test/Discover'
27-
$out[2].version | Should -BeExactly '0.1.0'
28-
$out[2].capabilities | Should -BeExactly @('discover')
29-
$out[2].manifest | Should -Not -BeNullOrEmpty
18+
if ($IsWindows) {
19+
$out.Count | Should -Be 3 -Because ($out | Out-String)
20+
$out[0].type | Should -Be 'Microsoft.DSC.Extension/Bicep'
21+
$out[0].version | Should -Be '0.1.0'
22+
$out[0].capabilities | Should -BeExactly @('import')
23+
$out[0].manifest | Should -Not -BeNullOrEmpty
24+
$out[1].type | Should -Be 'Microsoft.Windows.Appx/Discover'
25+
$out[1].version | Should -Be '0.1.0'
26+
$out[1].capabilities | Should -BeExactly @('discover')
27+
$out[1].manifest | Should -Not -BeNullOrEmpty
28+
$out[2].type | Should -BeExactly 'Test/Discover'
29+
$out[2].version | Should -BeExactly '0.1.0'
30+
$out[2].capabilities | Should -BeExactly @('discover')
31+
$out[2].manifest | Should -Not -BeNullOrEmpty
32+
} else {
33+
$out.Count | Should -Be 2 -Because ($out | Out-String)
34+
$out[0].type | Should -Be 'Microsoft.DSC.Extension/Bicep'
35+
$out[0].version | Should -Be '0.1.0'
36+
$out[0].capabilities | Should -BeExactly @('import')
37+
$out[0].manifest | Should -Not -BeNullOrEmpty
38+
$out[1].type | Should -BeExactly 'Test/Discover'
39+
$out[1].version | Should -BeExactly '0.1.0'
40+
$out[1].capabilities | Should -BeExactly @('discover')
41+
$out[1].manifest | Should -Not -BeNullOrEmpty
42+
}
3043
}
3144

3245
It 'Filtering works for extension discovered resources' {

0 commit comments

Comments
 (0)