diff options
author | Claire McQuin <mcquin@users.noreply.github.com> | 2014-05-29 16:50:19 -0700 |
---|---|---|
committer | Claire McQuin <mcquin@users.noreply.github.com> | 2014-05-29 16:50:19 -0700 |
commit | a6b19c08da6365e883d38d0ed202068df16301ab (patch) | |
tree | f062813b74e892fe5e4359ded2c9c2618b546a94 /spec/integration/knife | |
parent | 901479d9e4d42f186ede7baf5fa964c4dfa8eb26 (diff) | |
parent | 0e8208ff64e228cbf2b2dda679756b3e83cf9823 (diff) | |
download | chef-a6b19c08da6365e883d38d0ed202068df16301ab.tar.gz |
Merge pull request #1442 from opscode/CHEF-5259
Put cache at HOME/.chef if /var/chef can't be accessed.
Diffstat (limited to 'spec/integration/knife')
-rw-r--r-- | spec/integration/knife/chef_repo_path_spec.rb | 3 | ||||
-rw-r--r-- | spec/integration/knife/deps_spec.rb | 3 | ||||
-rw-r--r-- | spec/integration/knife/list_spec.rb | 3 | ||||
-rw-r--r-- | spec/integration/knife/raw_spec.rb | 3 | ||||
-rw-r--r-- | spec/integration/knife/redirection_spec.rb | 3 | ||||
-rw-r--r-- | spec/integration/knife/show_spec.rb | 3 |
6 files changed, 18 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..72d2ffbf75 100644 --- a/spec/integration/knife/chef_repo_path_spec.rb +++ b/spec/integration/knife/chef_repo_path_spec.rb @@ -16,6 +16,7 @@ # limitations under the License. require 'support/shared/integration/integration_helper' +require 'support/shared/context/config' require 'chef/knife/list' require 'chef/knife/show' @@ -801,6 +802,8 @@ EOM end context 'when data_bag_path is set and nothing else' do + include_context "default config options" + before :each do %w(client cookbook environment node role user).each do |object_name| Chef::Config.delete("#{object_name}_path".to_sym) diff --git a/spec/integration/knife/deps_spec.rb b/spec/integration/knife/deps_spec.rb index 5ede0caef3..7f434f844d 100644 --- a/spec/integration/knife/deps_spec.rb +++ b/spec/integration/knife/deps_spec.rb @@ -16,6 +16,7 @@ # limitations under the License. require 'support/shared/integration/integration_helper' +require 'support/shared/context/config' require 'chef/knife/deps' describe 'knife deps' do @@ -340,6 +341,8 @@ EOM end context 'remote' do + include_context "default config options" + 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..b9e72c5573 100644 --- a/spec/integration/knife/list_spec.rb +++ b/spec/integration/knife/list_spec.rb @@ -16,12 +16,15 @@ # limitations under the License. require 'support/shared/integration/integration_helper' +require 'support/shared/context/config' require 'chef/knife/list' describe 'knife list' do extend IntegrationSupport include KnifeSupport + include_context "default config options" + 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 c2ef02175b..2a9b5d8904 100644 --- a/spec/integration/knife/raw_spec.rb +++ b/spec/integration/knife/raw_spec.rb @@ -16,6 +16,7 @@ # limitations under the License. require 'support/shared/integration/integration_helper' +require 'support/shared/context/config' require 'chef/knife/raw' require 'chef/knife/show' @@ -24,6 +25,8 @@ describe 'knife raw' do include KnifeSupport include AppServerSupport + include_context "default config options" + 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 b92e3252c7..ebfd40966e 100644 --- a/spec/integration/knife/redirection_spec.rb +++ b/spec/integration/knife/redirection_spec.rb @@ -16,6 +16,7 @@ # limitations under the License. require 'support/shared/integration/integration_helper' +require 'support/shared/context/config' require 'chef/knife/list' describe 'redirection' do @@ -23,6 +24,8 @@ describe 'redirection' do include KnifeSupport include AppServerSupport + include_context "default config options" + 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..5b15110e41 100644 --- a/spec/integration/knife/show_spec.rb +++ b/spec/integration/knife/show_spec.rb @@ -16,12 +16,15 @@ # limitations under the License. require 'support/shared/integration/integration_helper' +require 'support/shared/context/config' require 'chef/knife/show' describe 'knife show' do extend IntegrationSupport include KnifeSupport + include_context "default config options" + when_the_chef_server "has one of each thing" do client 'x', '{}' cookbook 'x', '1.0.0', { 'metadata.rb' => 'version "1.0.0"' } |