Skip to content

Commit 902d073

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
fix tests
1 parent c8b29cb commit 902d073

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

dsc/tests/dsc_extension_discover.tests.ps1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@ 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 2 -Because ($out | Out-String)
18+
$out.Count | Should -Be 3 -Because ($out | Out-String)
1919
$out[0].type | Should -Be 'Microsoft.DSC.Extension/Bicep'
2020
$out[0].version | Should -Be '0.1.0'
2121
$out[0].capabilities | Should -BeExactly @('import')
2222
$out[0].manifest | Should -Not -BeNullOrEmpty
23-
$out[1].type | Should -BeExactly 'Test/Discover'
24-
$out[1].version | Should -BeExactly '0.1.0'
23+
$out[1].type | Should -Be 'Microsoft.Windows.Appx/Discover'
24+
$out[1].version | Should -Be '0.1.0'
2525
$out[1].capabilities | Should -BeExactly @('discover')
26-
$out[1].manifest | Should -Not -BeNullOrEmpty
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
2730
}
2831

2932
It 'Filtering works for extension discovered resources' {

extensions/appx/appx.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Describe 'Tests for Appx resource discovery' -Skip:(!$IsWindows){
77
$LASTEXITCODE | Should -Be 0
88
$found = $false
99
foreach ($resource in $out) {
10-
if ($resource.directory.StartsWith("$env:ProgramFiles\WindowsApps\Microsoft.DesiredStateConfiguration-Private")) {
10+
if ($resource.directory.StartsWith("$env:ProgramFiles\WindowsApps")) {
1111
$found = $true
1212
break
1313
}

reboot_pending/tests/reboot_pending.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Describe 'reboot_pending resource tests' {
2525

2626
$out | dsc resource get -r Microsoft.Windows/RebootPending | ConvertFrom-Json
2727
$LASTEXITCODE | Should -Be 0
28-
$out.actualState.reason | Should -Not -BeNullOrEmpty
28+
$out.actualState.reason.count | Should -BeGreaterThan 0
2929
} finally {
3030
Remove-ItemProperty -Path $keyPath -Name $keyName -ErrorAction Ignore
3131
}

0 commit comments

Comments
 (0)