serverspec/specinfra — pull request #51 by elmundio87 (2014-02-10 13:25:11+00:00)
Title: Test run hangs if checking a registry key with a DWORD value that contains less than 8 characters

Previously, the following test would hang the whole test run until it was manually stopped

````
describe windows_registry_key('HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\aspnet_state\\Parameters') do
it { should have_property_value('AllowRemoteConnection', :type_dword, '0') }
end
````

This is because the test expects property[:value] to be a hexidecimal string that contains 8 characters, to match the DWORD data type.

This pull request sets the correct string length by padding the missing zeros, preventing the hanging behaviour.

Both of the following have_property_value expectations are now valid.

````
describe windows_registry_key('HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\aspnet_state\\Parameters') do
it { should have_property_value('AllowRemoteConnection', :type_dword, '0') }
it { should have_property_value('AllowRemoteConnection', :type_dword, '00000000') }
end
````