diff options
author | Bryan McLellan <btm@opscode.com> | 2012-11-20 12:15:48 -0800 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2012-11-20 12:27:37 -0800 |
commit | 832674e6254b287a9cd188d5a1756955bee45c6c (patch) | |
tree | da7da8354523cfe32f38097a084d3e09ef8f416a /spec/unit/knife/ssh_spec.rb | |
parent | 15f94f373d5c21593e2bad35bc81a190176f7af1 (diff) | |
parent | 8dc20721f1c4afc3e8434516d1ebf3bc0d9264d9 (diff) | |
download | chef-832674e6254b287a9cd188d5a1756955bee45c6c.tar.gz |
Merge branch '10-stable'
Conflicts:
chef-expander/lib/chef/expander/version.rb
chef-server-api/lib/chef-server-api/version.rb
chef-server-webui/lib/chef-server-webui/version.rb
chef-server/lib/chef-server/version.rb
chef-solr/lib/chef/solr/version.rb
chef/lib/chef/encrypted_data_bag_item.rb
chef/spec/unit/encrypted_data_bag_item_spec.rb
ci/jenkins_run_tests.bat
ci/jenkins_run_tests.sh
lib/chef/provider.rb
spec/unit/knife/data_bag_from_file_spec.rb
spec/unit/provider/remote_directory_spec.rb
spec/unit/provider/route_spec.rb
Diffstat (limited to 'spec/unit/knife/ssh_spec.rb')
-rw-r--r-- | spec/unit/knife/ssh_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/unit/knife/ssh_spec.rb b/spec/unit/knife/ssh_spec.rb index 6e90a87f01..1652193c0b 100644 --- a/spec/unit/knife/ssh_spec.rb +++ b/spec/unit/knife/ssh_spec.rb @@ -178,5 +178,22 @@ describe Chef::Knife::Ssh do end end + describe "#session_from_list" do + before :each do + @knife.instance_variable_set(:@longest, 0) + ssh_config = {:timeout => 50, :user => "locutus", :port => 23 } + Net::SSH.stub!(:configuration_for).with('the.b.org').and_return(ssh_config) + end + + it "uses the port from an ssh config file" do + @knife.session_from_list(['the.b.org']) + @knife.session.servers[0].port.should == 23 + end + + it "uses the user from an ssh config file" do + @knife.session_from_list(['the.b.org']) + @knife.session.servers[0].user.should == "locutus" + end + end end |