mirror of
https://github.com/inspec/inspec
synced 2024-11-27 15:10:44 +00:00
adaf2bc364
This speeds up parallel unit test runs from a very consistent 2:49 to a very consistent 1:53, or a 33% reduction. Signed-off-by: Ryan Davis <zenspider@chef.io>
19 lines
870 B
Ruby
19 lines
870 B
Ruby
require 'helper'
|
|
|
|
describe 'Inspec::Resources::WindowsTasks' do
|
|
it 'verify parsing a windows task that does not exist' do
|
|
resource_fail = MockLoader.new(:windows).load_resource('windows_task', 'does-not-exist')
|
|
_(resource_fail.exists?).must_equal false
|
|
end
|
|
it 'verify parsing a windows task which is valid' do
|
|
resource = MockLoader.new(:windows).load_resource('windows_task', 'WeLovePizza')
|
|
_(resource.enabled?).must_equal true
|
|
_(resource.disabled?).must_equal false
|
|
_(resource.logon_mode).must_equal 'Interactive/Background'
|
|
_(resource.last_result).must_equal '1056'
|
|
_(resource.task_to_run).must_equal '%windir%\\system32\\sc.exe start w32time task_started'
|
|
_(resource.run_as_user).must_equal 'LOCAL SERVICE'
|
|
_(resource.type).must_equal 'windows-task'
|
|
_(resource.to_s).must_equal "Windows Task 'WeLovePizza'"
|
|
end
|
|
end
|