File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments