diff options
author | Jeff Blaine <jblaine@kickflop.net> | 2015-08-31 17:26:10 -0400 |
---|---|---|
committer | Bryan McLellan <btm@chef.io> | 2015-11-23 18:05:01 -0500 |
commit | ced05a7932f1ab29b4d985d95c4084a108aa3f13 (patch) | |
tree | 43a04d1e14939b8f15f20b192caa7c301b39ea43 | |
parent | 925317bfd39a6b395a7117e01dd1dea78e240f40 (diff) | |
download | chef-ced05a7932f1ab29b4d985d95c4084a108aa3f13.tar.gz |
Fix tests
-rw-r--r-- | spec/functional/knife/ssh_spec.rb | 10 | ||||
-rw-r--r-- | spec/unit/knife/bootstrap_spec.rb | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/spec/functional/knife/ssh_spec.rb b/spec/functional/knife/ssh_spec.rb index 51524b7009..0844a0aa85 100644 --- a/spec/functional/knife/ssh_spec.rb +++ b/spec/functional/knife/ssh_spec.rb @@ -56,7 +56,7 @@ describe Chef::Knife::Ssh do it "uses the ssh_identity_file" do @knife.run - expect(@knife.config[:identity_file]).to eq("~/.ssh/aws.rsa") + expect(@knife.config[:ssh_identity_file]).to eq("~/.ssh/aws.rsa") end end @@ -68,7 +68,7 @@ describe Chef::Knife::Ssh do it "uses the ssh_identity_file" do @knife.run - expect(@knife.config[:identity_file]).to eq("~/.ssh/aws.rsa") + expect(@knife.config[:ssh_identity_file]).to eq("~/.ssh/aws.rsa") end end @@ -80,13 +80,13 @@ describe Chef::Knife::Ssh do it "should use the value on the command line" do @knife.run - expect(@knife.config[:identity_file]).to eq("~/.ssh/aws.rsa") + expect(@knife.config[:ssh_identity_file]).to eq("~/.ssh/aws.rsa") end it "should override what is set in knife.rb" do Chef::Config[:knife][:ssh_identity_file] = "~/.ssh/other.rsa" @knife.run - expect(@knife.config[:identity_file]).to eq("~/.ssh/aws.rsa") + expect(@knife.config[:ssh_identity_file]).to eq("~/.ssh/aws.rsa") end end @@ -98,7 +98,7 @@ describe Chef::Knife::Ssh do it "uses the default" do @knife.run - expect(@knife.config[:identity_file]).to eq(nil) + expect(@knife.config[:ssh_identity_file]).to eq(nil) end end end diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb index 8c5a62e6f0..19146ea8e3 100644 --- a/spec/unit/knife/bootstrap_spec.rb +++ b/spec/unit/knife/bootstrap_spec.rb @@ -499,7 +499,7 @@ describe Chef::Knife::Bootstrap do Chef::Config[:knife][:ssh_user] = nil Chef::Config[:knife][:ssh_port] = nil knife.config[:forward_agent] = true - knife.config[:identity_file] = "~/.ssh/me.rsa" + knife.config[:ssh_identity_file] = "~/.ssh/me.rsa" allow(knife).to receive(:render_template).and_return("") knife.knife_ssh end @@ -525,7 +525,7 @@ describe Chef::Knife::Bootstrap do end it "configures the ssh identity file" do - expect(knife_ssh.config[:identity_file]).to eq('~/.ssh/me.rsa') + expect(knife_ssh.config[:ssh_identity_file]).to eq('~/.ssh/me.rsa') end end @@ -560,7 +560,7 @@ describe Chef::Knife::Bootstrap do Chef::Config[:knife][:ssh_user] = "curiosity" Chef::Config[:knife][:ssh_port] = "2430" Chef::Config[:knife][:forward_agent] = true - Chef::Config[:knife][:identity_file] = "~/.ssh/you.rsa" + Chef::Config[:knife][:ssh_identity_file] = "~/.ssh/you.rsa" Chef::Config[:knife][:ssh_gateway] = "towel.blinkenlights.nl" Chef::Config[:knife][:host_key_verify] = true allow(knife).to receive(:render_template).and_return("") @@ -582,7 +582,7 @@ describe Chef::Knife::Bootstrap do end it "configures the ssh identity file" do - expect(knife_ssh.config[:identity_file]).to eq('~/.ssh/you.rsa') + expect(knife_ssh.config[:ssh_identity_file]).to eq('~/.ssh/you.rsa') end it "configures the ssh gateway" do @@ -598,7 +598,7 @@ describe Chef::Knife::Bootstrap do let(:knife_ssh_with_password_auth) do knife.name_args = ["foo.example.com"] knife.config[:ssh_user] = "rooty" - knife.config[:identity_file] = "~/.ssh/me.rsa" + knife.config[:ssh_identity_file] = "~/.ssh/me.rsa" allow(knife).to receive(:render_template).and_return("") k = knife.knife_ssh allow(k).to receive(:get_password).and_return('typed_in_password') @@ -611,7 +611,7 @@ describe Chef::Knife::Bootstrap do end it "configures knife not to use the identity file that didn't work previously" do - expect(knife_ssh_with_password_auth.config[:identity_file]).to be_nil + expect(knife_ssh_with_password_auth.config[:ssh_identity_file]).to be_nil end end end @@ -627,7 +627,7 @@ describe Chef::Knife::Bootstrap do knife.name_args = ["foo.example.com"] knife.config[:chef_node_name] = "foo.example.com" knife.config[:ssh_user] = "rooty" - knife.config[:identity_file] = "~/.ssh/me.rsa" + knife.config[:ssh_identity_file] = "~/.ssh/me.rsa" allow(knife).to receive(:render_template).and_return("") knife_ssh = knife.knife_ssh allow(knife).to receive(:knife_ssh).and_return(knife_ssh) |