bugfix: use new volcano backend for registry key

This commit is contained in:
Christoph Hartmann 2015-09-05 22:36:32 +02:00 committed by Dominik Richter
parent 888f8588fb
commit e57e5f3fd6

View file

@ -4,6 +4,11 @@
require 'json'
# Usage:
# describe registry_key('Task Scheduler','HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Schedule') do
# its('Start') { should eq 2 }
# end
class RegistryKey < Vulcano.resource(1)
name 'registry_key'
@ -18,7 +23,7 @@ class RegistryKey < Vulcano.resource(1)
def getRegistryValue(path, key)
cmd = "(Get-Item 'Registry::#{path}').GetValue('#{key}')"
command_result ||= @runner.run_command(cmd)
command_result ||= vulcano.run_command(cmd)
val = { exit_code: command_result.exit_status.to_i, data: command_result.stdout }
val
end