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 f41e6a2 commit d29518aCopy full SHA for d29518a
registry/tests/registry.config.get.tests.ps1
@@ -30,4 +30,18 @@ Describe 'Registry config get tests' {
30
$result.valueData.ExpandString | Should -Be '%ProgramFiles%'
31
($result.psobject.properties | Measure-Object).Count | Should -Be 3
32
}
33
+
34
+ It 'Traces should be JSON' -Skip:(!$IsWindows) {
35
+ # keyPath should return Access Denied
36
+ $json = @'
37
+ {
38
+ "keyPath": "HKLM\\SYSTEM\\CurrentControlSet\\Control\\SecurePipeServers\\Winreg"
39
+ }
40
+'@
41
+ $out = registry config get --input $json 2>&1
42
+ $LASTEXITCODE | Should -Be 3
43
+ $result = $out | ConvertFrom-Json
44
+ $result.level | Should -BeExactly 'ERROR'
45
+ $result.fields.message | Should -BeLike '*Permission denied*'
46
47
0 commit comments