diff options
author | danielsdeleo <dan@opscode.com> | 2013-01-16 15:29:03 -0800 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-01-16 15:29:03 -0800 |
commit | 6705514c81550024fe37f62c71d85f101637dedd (patch) | |
tree | 600794cf452894d4ceb93c1392fdee31852d7775 /spec/functional/knife | |
parent | b37e869a207f07c93b7c62d27f6ffb6de2805afe (diff) | |
download | chef-6705514c81550024fe37f62c71d85f101637dedd.tar.gz |
fix knife functional tests
Diffstat (limited to 'spec/functional/knife')
-rw-r--r-- | spec/functional/knife/ssh_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/functional/knife/ssh_spec.rb b/spec/functional/knife/ssh_spec.rb index 19e63dd47a..53012ce56d 100644 --- a/spec/functional/knife/ssh_spec.rb +++ b/spec/functional/knife/ssh_spec.rb @@ -140,7 +140,7 @@ describe Chef::Knife::Ssh do it "uses the default" do @knife.run - @knife.config[:ssh_user].should == nil + @knife.config[:ssh_user].should == "root" end end end @@ -194,6 +194,10 @@ describe Chef::Knife::Ssh do def setup_knife(params=[]) @knife = Chef::Knife::Ssh.new(params) + # We explicitly avoid running #configure_chef, which would read a knife.rb + # if available, but #merge_configs (which is called by #configure_chef) is + # necessary to have default options merged in. + @knife.merge_configs @knife.stub!(:ssh_command).and_return { 0 } @api = TinyServer::API.instance @api.clear |