Skip to content

Commit 1d91184

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
add test
1 parent 374b6d0 commit 1d91184

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

extensions/appx/appx.tests.ps1

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
Describe 'Tests for Appx resource discovery' {
5+
BeforeAll {
6+
$skip = (!$IsWindows -or ($null -eq (get-appxpackage -Name Microsoft.DesiredStateConfiguration-Preview)))
7+
}
8+
9+
It 'Should find DSC appx resources' -Skip:$skip {
10+
$out = dsc resource list | ConvertFrom-Json
11+
$LASTEXITCODE | Should -Be 0
12+
$found = $false
13+
foreach ($resource in $out) {
14+
if ($resource.directory.StartsWith("$env:ProgramFiles\WindowsApps\Microsoft.DesiredStateConfiguration-Private")) {
15+
$found = $true
16+
break
17+
}
18+
}
19+
}
20+
}

0 commit comments

Comments
 (0)