Skip to content

Commit 773cd8d

Browse files
author
Steve Lee (POWERSHELL HE/HIM) (from Dev Box)
committed
remove unused properties in config and add test to use the config file
1 parent de72cde commit 773cd8d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

dsc/examples/wmi.dsc.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@ resources:
66
resources:
77
- name: computer system
88
type: root.cimv2/Win32_ComputerSystem
9-
properties:
109
- name: network adapter
1110
type: root.cimv2/Win32_NetworkAdapter
12-
properties:

wmi-adapter/Tests/wmi.tests.ps1

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,14 @@ Describe 'WMI adapter resource tests' {
4444
$res.results[0].result.actualState[1].BiosCharacteristics | Should -Not -BeNull
4545
$res.results[0].result.actualState[2].NumberOfLogicalProcessors | Should -Not -BeNull
4646
}
47+
48+
It 'Example config works' -Skip:(!$IsWindows) {
49+
$configPath = Join-Path $PSScriptRoot '..\..\dsc\examples\wmi.dsc.yaml'
50+
$r = dsc config get -p $configPath
51+
$LASTEXITCODE | Should -Be 0
52+
$r | Should -Not -BeNullOrEmpty
53+
$res = $r | ConvertFrom-Json
54+
$res.results[0].result.actualState[0].Model | Should -Not -BeNullOrEmpty
55+
$res.results[0].result.actualState[1].Description | Should -Not -BeNullOrEmpty
56+
}
4757
}

0 commit comments

Comments
 (0)