summaryrefslogtreecommitdiff
path: root/spec/integration/client/client_spec.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-10-09 16:59:38 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-10-09 16:59:38 -0700
commit2a214bcff7174b61129a7a8a642b8df5b5f4afee (patch)
tree5b04e9e034fa209a54575b4df24f1fac0661fe78 /spec/integration/client/client_spec.rb
parentf9521c3aaa6aaa42f94bbf81b260797da199f6a9 (diff)
downloadchef-2a214bcff7174b61129a7a8a642b8df5b5f4afee.tar.gz
Pick up knife config instead of /etc/chef/client.rb if local mode is specified
Diffstat (limited to 'spec/integration/client/client_spec.rb')
-rw-r--r--spec/integration/client/client_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb
index fa17bc99e5..37b96e12fd 100644
--- a/spec/integration/client/client_spec.rb
+++ b/spec/integration/client/client_spec.rb
@@ -37,6 +37,13 @@ EOM
result.exitstatus.should == 1
end
+ it 'should load .chef/knife.rb when -. is specified' do
+ file '.chef/knife.rb', 'xxx.xxx'
+ chef_dir = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "..", "bin"))
+ result = shell_out("#{chef_dir}/chef-client -. -o 'x::default'", :cwd => path_to(''))
+ result.exitstatus.should == 2
+ end
+
it "should complete with success" do
file 'config/client.rb', <<EOM
local_mode true