Skip to content

Commit b0ffd4d

Browse files
author
Andrew
committed
added tests for config
1 parent c459c9d commit b0ffd4d

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2024/04/config/document.json
2+
resources:
3+
- name: Pending reboot status
4+
type: Microsoft.Windows/RebootPending
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
Describe 'reboot_pending resource tests' {
5+
It 'should get reboot_pending' -Skip:(!$IsWindows) {
6+
$out = dsc resource get -r Microsoft.Windows/RebootPending | ConvertFrom-Json
7+
$LASTEXITCODE | Should -Be 0
8+
$out.actualState.rebootPending | Should -Not -BeNullOrEmpty
9+
}
10+
11+
It 'reboot_pending works in a config' -Skip:(!$IsWindows) {
12+
$ConfigPath = Resolve-Path "$PSScriptRoot/reboot_pending.dsc.yaml"
13+
$out = dsc config get --path $ConfigPath | ConvertFrom-Json
14+
$LASTEXITCODE | Should -Be 0
15+
$out.results.result.actualState.rebootPending | Should -Not -BeNullOrEmpty
16+
}
17+
}

0 commit comments

Comments
 (0)