0

After Chef spins up my Windows box, I use the following Inspec test to assert a registry key exists:

describe registry_key('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client') do
    it { should exist }
end

The test fails with "expected Registry Key to exist"

When I log onto the box I can clearly see the key does exist in that location. What could be the problem? Do I need to wait for a period of time after everything is up and running before performing the check?

FBryant87
  • 4,273
  • 2
  • 44
  • 72

1 Answers1

0

InSpec code is still Ruby. Try cancelling the backslashes.

describe registry_key('HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\SecurityProviders\\SCHANNEL\\Protocols\\SSL 2.0\\Client') do
  it { should exist }
end
Brandon Miller
  • 4,695
  • 1
  • 20
  • 27