From 4906f0b6bea47b4e2c564d66c6232b1efa70114a Mon Sep 17 00:00:00 2001 From: Jay Mundrawala Date: Mon, 1 Feb 2016 15:24:27 -0800 Subject: Use OHAI_SYSTEM where possible Rerunning ohai wastes a lot of time. This should get us back to within our time limits in appveyor even with the perf regression in Ohai. Don't rerun ohai for unit/regsitry_helper_spec Ohai is slow. We don't need to rerun this, it's already run in our spec_helper. Don't keep rerunning ohai for reboot_pending_spec Running Ohai is slow. This should know almost 2 mins off the runtime of the tests. Don't need to run ohai for registry_spec crypto_spec does not need its own ohai cmdlet_spec does not need its own ohai functional registry_helper_spec does not need its own ohai Use spec ohai system for knife configure_spec Use OHAI_SYSTEM for dsc_script_spec use OHAI_SYSTEM for dsc_resource_spec --- spec/unit/dsl/regsitry_helper_spec.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'spec/unit/dsl') diff --git a/spec/unit/dsl/regsitry_helper_spec.rb b/spec/unit/dsl/regsitry_helper_spec.rb index 8647b79020..d8b5d5670b 100644 --- a/spec/unit/dsl/regsitry_helper_spec.rb +++ b/spec/unit/dsl/regsitry_helper_spec.rb @@ -24,9 +24,7 @@ describe Chef::Resource::RegistryKey do before (:all) do events = Chef::EventDispatch::Dispatcher.new node = Chef::Node.new - ohai = Ohai::System.new - ohai.all_plugins - node.consume_external_attrs(ohai.data,{}) + node.consume_external_attrs(OHAI_SYSTEM.data,{}) run_context = Chef::RunContext.new(node, {}, events) @resource = Chef::Resource::new("foo", run_context) end -- cgit v1.2.1