We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce37358 commit ffa9843Copy full SHA for ffa9843
reboot_pending/tests/reboot_pending.tests.ps1
@@ -38,6 +38,10 @@ Describe 'reboot_pending resource tests' -Skip:(!$IsWindows -or !$isElevated) {
38
It 'reboot_pending should have a reason' {
39
$out = dsc resource get -r Microsoft.Windows/RebootPending | ConvertFrom-Json
40
$LASTEXITCODE | Should -Be 0
41
- $out.actualState.reason.count | Should -BeGreaterThan 0 -Because ($out | ConvertTo-Json -Depth 10 |Out-String)
+ if ($out.actualState.rebootPending) {
42
+ $out.actualState.reason.count | Should -BeGreaterThan 0 -Because ($out | ConvertTo-Json -Depth 10 |Out-String)
43
+ } else {
44
+ $out.actualState.reason | Should -BeNullOrEmpty -Because ($out | ConvertTo-Json -Depth 10 |Out-String)
45
+ }
46
}
47
0 commit comments