summaryrefslogtreecommitdiff
path: root/spec/unit/client_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/client_spec.rb')
-rw-r--r--spec/unit/client_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/client_spec.rb b/spec/unit/client_spec.rb
index cf995838fa..fa8317744c 100644
--- a/spec/unit/client_spec.rb
+++ b/spec/unit/client_spec.rb
@@ -78,6 +78,19 @@ describe Chef::Client do
allow(Ohai::System).to receive(:new).and_return(ohai_system)
end
+ context "when minimal ohai is configured" do
+ before do
+ Chef::Config[:minimal_ohai] = true
+ end
+
+ it "runs ohai with only the minimum required plugins" do
+ expected_filter = %w[fqdn machinename hostname platform platform_version os os_version]
+ expect(ohai_system).to receive(:all_plugins).with(expected_filter)
+ client.run_ohai
+ end
+
+ end
+
describe "authentication protocol selection" do
after do
Chef::Config[:authentication_protocol_version] = "1.0"