summaryrefslogtreecommitdiff
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
parent1c0d4f3e05c3adb88bef0a2302dcca90e885181d (diff)
downloadchef-97395b8b81949a3d0c648031d71c17fbf313a28a.tar.gz
Fix chefstyle
Signed-off-by: Grant Ridder <shortdudey123@gmail.com>
-rw-r--r--spec/functional/knife/ssh_spec.rb9
-rw-r--r--spec/unit/knife/bootstrap_spec.rb2
2 files changed, 5 insertions, 6 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"])
diff --git a/spec/unit/knife/bootstrap_spec.rb b/spec/unit/knife/bootstrap_spec.rb
index 003dd61875..c2f68277c5 100644
--- a/spec/unit/knife/bootstrap_spec.rb
+++ b/spec/unit/knife/bootstrap_spec.rb
@@ -678,7 +678,7 @@ describe Chef::Knife::Bootstrap do
end
it "configures the ssh gateway identity" do
- expect(knife_ssh.config[:ssh_gateway_identity]).to eq('~/.ssh/gateway.rsa')
+ expect(knife_ssh.config[:ssh_gateway_identity]).to eq("~/.ssh/gateway.rsa")
end
it "configures the host key verify mode" do