From 97395b8b81949a3d0c648031d71c17fbf313a28a Mon Sep 17 00:00:00 2001 From: Grant Ridder Date: Tue, 21 Feb 2017 15:06:54 -0800 Subject: Fix chefstyle Signed-off-by: Grant Ridder --- spec/functional/knife/ssh_spec.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'spec/functional/knife/ssh_spec.rb') 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"]) -- cgit v1.2.1