diff options
author | Claire McQuin <claire@getchef.com> | 2014-05-19 13:55:18 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-05-22 12:16:36 -0700 |
commit | 7d2891419ef04288ddd7bb2322df41cc9bd203dd (patch) | |
tree | 354eb64b83b99b4803fb8f7850483e9aca945f20 /spec/integration | |
parent | 92519eb2cf7ae1b362f22d5710a229c5809a47cc (diff) | |
download | chef-7d2891419ef04288ddd7bb2322df41cc9bd203dd.tar.gz |
Put cache at HOME/.chef.d if /var/chef can't be accessed.
Diffstat (limited to 'spec/integration')
-rw-r--r-- | spec/integration/knife/chef_repo_path_spec.rb | 1 | ||||
-rw-r--r-- | spec/integration/knife/deps_spec.rb | 4 | ||||
-rw-r--r-- | spec/integration/knife/list_spec.rb | 4 | ||||
-rw-r--r-- | spec/integration/knife/raw_spec.rb | 4 | ||||
-rw-r--r-- | spec/integration/knife/redirection_spec.rb | 4 | ||||
-rw-r--r-- | spec/integration/knife/show_spec.rb | 4 |
6 files changed, 21 insertions, 0 deletions
diff --git a/spec/integration/knife/chef_repo_path_spec.rb b/spec/integration/knife/chef_repo_path_spec.rb index 87619d8a58..154a8d9718 100644 --- a/spec/integration/knife/chef_repo_path_spec.rb +++ b/spec/integration/knife/chef_repo_path_spec.rb @@ -806,6 +806,7 @@ EOM Chef::Config.delete("#{object_name}_path".to_sym) end Chef::Config.delete(:chef_repo_path) + Chef::Config[:cache_path] = windows? ? 'C:\chef' : '/var/chef' Chef::Config.data_bag_path = File.join(@repository_dir, 'data_bags') end diff --git a/spec/integration/knife/deps_spec.rb b/spec/integration/knife/deps_spec.rb index 5ede0caef3..56820bc2b3 100644 --- a/spec/integration/knife/deps_spec.rb +++ b/spec/integration/knife/deps_spec.rb @@ -340,6 +340,10 @@ EOM end context 'remote' do + before do + Chef::Config[:cache_path] = windows? ? 'C:\chef' : '/var/chef' + end + when_the_chef_server 'has a role with no run_list' do role 'starring', {} it 'knife deps reports no dependencies' do diff --git a/spec/integration/knife/list_spec.rb b/spec/integration/knife/list_spec.rb index b9d75ce1f1..37e6f7fdb2 100644 --- a/spec/integration/knife/list_spec.rb +++ b/spec/integration/knife/list_spec.rb @@ -22,6 +22,10 @@ describe 'knife list' do extend IntegrationSupport include KnifeSupport + before do + Chef::Config[:cache_path] = windows? ? 'C:\chef' : '/var/chef' + end + when_the_chef_server "is empty" do it "knife list / returns all top level directories" do knife('list /').should_succeed <<EOM diff --git a/spec/integration/knife/raw_spec.rb b/spec/integration/knife/raw_spec.rb index fafd0a47ee..5cada50cc5 100644 --- a/spec/integration/knife/raw_spec.rb +++ b/spec/integration/knife/raw_spec.rb @@ -24,6 +24,10 @@ describe 'knife raw' do include KnifeSupport include AppServerSupport + before do + Chef::Config[:cache_path] = windows? ? 'C:\chef' : '/var/chef' + end + when_the_chef_server "has one of each thing" do client 'x', '{}' cookbook 'x', '1.0.0', { 'metadata.rb' => 'version "1.0.0"' } diff --git a/spec/integration/knife/redirection_spec.rb b/spec/integration/knife/redirection_spec.rb index 2ed49a7b24..481c57eebd 100644 --- a/spec/integration/knife/redirection_spec.rb +++ b/spec/integration/knife/redirection_spec.rb @@ -23,6 +23,10 @@ describe 'redirection' do include KnifeSupport include AppServerSupport + before do + Chef::Config[:cache_path] = windows? ? 'C:\chef' : '/var/chef' + end + when_the_chef_server 'has a role' do role 'x', {} diff --git a/spec/integration/knife/show_spec.rb b/spec/integration/knife/show_spec.rb index a061fab040..3755c84b9f 100644 --- a/spec/integration/knife/show_spec.rb +++ b/spec/integration/knife/show_spec.rb @@ -22,6 +22,10 @@ describe 'knife show' do extend IntegrationSupport include KnifeSupport + before do + Chef::Config[:cache_path] = windows? ? 'C:\chef' : '/var/chef' + end + when_the_chef_server "has one of each thing" do client 'x', '{}' cookbook 'x', '1.0.0', { 'metadata.rb' => 'version "1.0.0"' } |