diff options
author | Thom May <thom@chef.io> | 2018-04-30 12:09:00 +0100 |
---|---|---|
committer | Thom May <thom@chef.io> | 2018-04-30 14:09:43 +0100 |
commit | ebe15d26013bc06a1d00f0e3ad8694c7a259054e (patch) | |
tree | 7919e4f766d2e534fef9ec319e240842820f75a6 /spec | |
parent | 515d1683a6549da75905ff33ef3e2858d6d10fa7 (diff) | |
download | chef-ebe15d26013bc06a1d00f0e3ad8694c7a259054e.tar.gz |
fix application tests on linux
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/support/shared/examples/client.rb | 1 | ||||
-rw-r--r-- | spec/unit/application/client_spec.rb | 1 | ||||
-rw-r--r-- | spec/unit/application_spec.rb | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/spec/support/shared/examples/client.rb b/spec/support/shared/examples/client.rb index 8ad9f6189a..6479c9d582 100644 --- a/spec/support/shared/examples/client.rb +++ b/spec/support/shared/examples/client.rb @@ -23,6 +23,7 @@ shared_examples "a completed run" do let(:file) { instance_double(File) } before do + allow(File).to receive(:read).and_call_original Chef::Config[:chef_guid_path] = chef_guid_path Chef::Config[:chef_guid] = nil end diff --git a/spec/unit/application/client_spec.rb b/spec/unit/application/client_spec.rb index 0cd3cb3995..de6972b625 100644 --- a/spec/unit/application/client_spec.rb +++ b/spec/unit/application/client_spec.rb @@ -447,6 +447,7 @@ describe Chef::Application::Client, "configure_chef" do before do @original_argv = ARGV.dup ARGV.clear + allow(::File).to receive(:read).and_call_original allow(::File).to receive(:read).with(Chef::Config.platform_specific_path("/etc/chef/client.rb")).and_return("") app.configure_chef end diff --git a/spec/unit/application_spec.rb b/spec/unit/application_spec.rb index 273f605905..76be387c22 100644 --- a/spec/unit/application_spec.rb +++ b/spec/unit/application_spec.rb @@ -101,6 +101,7 @@ describe Chef::Application do @app = Chef::Application.new allow(@app).to receive(:parse_options).and_return(true) + allow(::File).to receive(:read).with("/proc/sys/crypto/fips_enabled").and_call_original expect(Chef::Config).to receive(:export_proxies).and_return(true) end |