Reputation: 4605
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?
Upvotes: 0
Views: 511
Reputation: 5065
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
Upvotes: 0