summaryrefslogtreecommitdiff
path: root/spec/functional/knife/ssh_spec.rb
diff options
context:
space:
mode:
authorGrant Ridder <shortdudey123@gmail.com>2017-02-21 15:06:54 -0800
committerGrant Ridder <shortdudey123@gmail.com>2017-02-21 15:06:54 -0800
commit97395b8b81949a3d0c648031d71c17fbf313a28a (patch)
treef74508acb1067d900862b77a2b6b11dd7639cc7d /spec/functional/knife/ssh_spec.rb
parent1c0d4f3e05c3adb88bef0a2302dcca90e885181d (diff)
downloadchef-97395b8b81949a3d0c648031d71c17fbf313a28a.tar.gz
Fix chefstyle
Signed-off-by: Grant Ridder <shortdudey123@gmail.com>
Diffstat (limited to 'spec/functional/knife/ssh_spec.rb')
-rw-r--r--spec/functional/knife/ssh_spec.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/functional/knife/ssh_spec.rb b/spec/functional/knife/ssh_spec.rb
index 911ef14a72..dae4029946 100644
--- a/spec/functional/knife/ssh_spec.rb
+++ b/spec/functional/knife/ssh_spec.rb
@@ -248,13 +248,13 @@ describe Chef::Knife::Ssh do
context "when knife[:ssh_gateway_identity] is set" do
before do
- setup_knife(['*:*','uptime'])
+ setup_knife(["*:*", "uptime"])
Chef::Config[:knife][:ssh_gateway] = "user@ec2.public_hostname"
Chef::Config[:knife][:ssh_gateway_identity] = "~/.ssh/aws-gateway.rsa"
end
it "uses the ssh_gateway_identity file" do
- expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user",{:keys=>"~/.ssh/aws-gateway.rsa"})
+ expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", { :keys => "~/.ssh/aws-gateway.rsa", :keys_only => true })
@knife.run
expect(@knife.config[:ssh_gateway_identity]).to eq("~/.ssh/aws-gateway.rsa")
end
@@ -262,19 +262,18 @@ describe Chef::Knife::Ssh do
context "when -ssh-gateway-identity is provided and knife[:ssh_gateway] is set" do
before do
- setup_knife(['--ssh-gateway-identity','~/.ssh/aws-gateway.rsa','*:*','uptime'])
+ setup_knife(["--ssh-gateway-identity", "~/.ssh/aws-gateway.rsa", "*:*", "uptime"])
Chef::Config[:knife][:ssh_gateway] = "user@ec2.public_hostname"
Chef::Config[:knife][:ssh_gateway_identity] = nil
end
it "uses the ssh_gateway_identity file" do
- expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user",{:keys=>"~/.ssh/aws-gateway.rsa"})
+ expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", { :keys => "~/.ssh/aws-gateway.rsa", :keys_only => true })
@knife.run
expect(@knife.config[:ssh_gateway_identity]).to eq("~/.ssh/aws-gateway.rsa")
end
end
-
context "when the gateway requires a password" do
before do
setup_knife(["-G user@ec2.public_hostname", "*:*", "uptime"])