diff options
author | Thom May <thom@chef.io> | 2018-01-19 17:05:16 +0000 |
---|---|---|
committer | Thom May <thom@chef.io> | 2018-01-19 17:05:16 +0000 |
commit | 6a0217296c45b17c6c36f31a77a26d171b5f71e2 (patch) | |
tree | 70530d0ce9232d0b00057cba50c7cf7e10afae2e /spec | |
parent | 3b6800b84eeb7bd8f84a748ac6734104fdac04b4 (diff) | |
download | chef-6a0217296c45b17c6c36f31a77a26d171b5f71e2.tar.gz |
Ensure we don't use credentials during integration teststm/creds_int_tests
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/support/shared/integration/knife_support.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/shared/integration/knife_support.rb b/spec/support/shared/integration/knife_support.rb index d873723784..86764cad66 100644 --- a/spec/support/shared/integration/knife_support.rb +++ b/spec/support/shared/integration/knife_support.rb @@ -83,6 +83,11 @@ module KnifeSupport # running test scenarios against a real chef server. If things don't # smell right, abort. + # To ensure that we don't pick up a user's credentials file we lie through our teeth about + # it's existence. + allow(File).to receive(:file?).and_call_original + allow(File).to receive(:file?).with(File.expand_path("~/.chef/credentials")).and_return(false) + $__KNIFE_INTEGRATION_FAILSAFE_CHECK = "ole" instance.configure_chef |