summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2016-02-01 15:24:27 -0800
committerJay Mundrawala <jdmundrawala@gmail.com>2016-02-02 08:14:51 -0800
commit4906f0b6bea47b4e2c564d66c6232b1efa70114a (patch)
tree9aef1c31d00e7eecd052093a2547ce6856471ebf /spec/unit
parent647680009efb898e4b5614114b6ed7f188f4033a (diff)
downloadchef-4906f0b6bea47b4e2c564d66c6232b1efa70114a.tar.gz
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
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/dsl/regsitry_helper_spec.rb4
1 files changed, 1 insertions, 3 deletions
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