summaryrefslogtreecommitdiff
path: root/spec/functional/win32
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/functional/win32
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/functional/win32')
-rw-r--r--spec/functional/win32/crypto_spec.rb5
-rw-r--r--spec/functional/win32/registry_spec.rb4
2 files changed, 2 insertions, 7 deletions
diff --git a/spec/functional/win32/crypto_spec.rb b/spec/functional/win32/crypto_spec.rb
index 185231dbdd..2a290c8ea0 100644
--- a/spec/functional/win32/crypto_spec.rb
+++ b/spec/functional/win32/crypto_spec.rb
@@ -24,11 +24,8 @@ end
describe "Chef::ReservedNames::Win32::Crypto", :windows_only do
describe '#encrypt' do
before(:all) do
- ohai_reader = Ohai::System.new
- ohai_reader.all_plugins("platform")
-
new_node = Chef::Node.new
- new_node.consume_external_attrs(ohai_reader.data,{})
+ new_node.consume_external_attrs(OHAI_SYSTEM.data,{})
events = Chef::EventDispatch::Dispatcher.new
diff --git a/spec/functional/win32/registry_spec.rb b/spec/functional/win32/registry_spec.rb
index 4e18074271..9aacc88638 100644
--- a/spec/functional/win32/registry_spec.rb
+++ b/spec/functional/win32/registry_spec.rb
@@ -41,9 +41,7 @@ describe "Chef::Win32::Registry", :windows_only do
#Create the node with ohai data
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)
#Create a registry object that has access ot the node previously created