summaryrefslogtreecommitdiff
path: root/spec/functional/knife/ssh_spec.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-01-14 14:08:03 +0000
committerThom May <thom@chef.io>2016-01-14 14:08:03 +0000
commit51cfbdc4d16739caac4d946fadbe678444aafe34 (patch)
tree56dfd8f1cd9fd933de27268b32402e955a43ac2b /spec/functional/knife/ssh_spec.rb
parent05064423057d4cf46f4713b81b08829cf6d20af6 (diff)
downloadchef-51cfbdc4d16739caac4d946fadbe678444aafe34.tar.gz
Use double quotes by default
This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
Diffstat (limited to 'spec/functional/knife/ssh_spec.rb')
-rw-r--r--spec/functional/knife/ssh_spec.rb38
1 files changed, 19 insertions, 19 deletions
diff --git a/spec/functional/knife/ssh_spec.rb b/spec/functional/knife/ssh_spec.rb
index 0844a0aa85..56ba2ecfa2 100644
--- a/spec/functional/knife/ssh_spec.rb
+++ b/spec/functional/knife/ssh_spec.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'tiny_server'
+require "spec_helper"
+require "tiny_server"
describe Chef::Knife::Ssh do
@@ -50,7 +50,7 @@ describe Chef::Knife::Ssh do
describe "identity file" do
context "when knife[:ssh_identity_file] is set" do
before do
- setup_knife(['*:*', 'uptime'])
+ setup_knife(["*:*", "uptime"])
Chef::Config[:knife][:ssh_identity_file] = "~/.ssh/aws.rsa"
end
@@ -62,7 +62,7 @@ describe Chef::Knife::Ssh do
context "when knife[:ssh_identity_file] is set and frozen" do
before do
- setup_knife(['*:*', 'uptime'])
+ setup_knife(["*:*", "uptime"])
Chef::Config[:knife][:ssh_identity_file] = "~/.ssh/aws.rsa".freeze
end
@@ -74,7 +74,7 @@ describe Chef::Knife::Ssh do
context "when -i is provided" do
before do
- setup_knife(['-i ~/.ssh/aws.rsa', '*:*', 'uptime'])
+ setup_knife(["-i ~/.ssh/aws.rsa", "*:*", "uptime"])
Chef::Config[:knife][:ssh_identity_file] = nil
end
@@ -92,7 +92,7 @@ describe Chef::Knife::Ssh do
context "when knife[:ssh_identity_file] is not provided]" do
before do
- setup_knife(['*:*', 'uptime'])
+ setup_knife(["*:*", "uptime"])
Chef::Config[:knife][:ssh_identity_file] = nil
end
@@ -106,7 +106,7 @@ describe Chef::Knife::Ssh do
describe "port" do
context "when -p 31337 is provided" do
before do
- setup_knife(['-p 31337', '*:*', 'uptime'])
+ setup_knife(["-p 31337", "*:*", "uptime"])
end
it "uses the ssh_port" do
@@ -119,7 +119,7 @@ describe Chef::Knife::Ssh do
describe "user" do
context "when knife[:ssh_user] is set" do
before do
- setup_knife(['*:*', 'uptime'])
+ setup_knife(["*:*", "uptime"])
Chef::Config[:knife][:ssh_user] = "ubuntu"
end
@@ -131,7 +131,7 @@ describe Chef::Knife::Ssh do
context "when knife[:ssh_user] is set and frozen" do
before do
- setup_knife(['*:*', 'uptime'])
+ setup_knife(["*:*", "uptime"])
Chef::Config[:knife][:ssh_user] = "ubuntu".freeze
end
@@ -143,7 +143,7 @@ describe Chef::Knife::Ssh do
context "when -x is provided" do
before do
- setup_knife(['-x ubuntu', '*:*', 'uptime'])
+ setup_knife(["-x ubuntu", "*:*", "uptime"])
Chef::Config[:knife][:ssh_user] = nil
end
@@ -161,7 +161,7 @@ describe Chef::Knife::Ssh do
context "when knife[:ssh_user] is not provided]" do
before do
- setup_knife(['*:*', 'uptime'])
+ setup_knife(["*:*", "uptime"])
Chef::Config[:knife][:ssh_user] = nil
end
@@ -175,7 +175,7 @@ describe Chef::Knife::Ssh do
describe "attribute" do
context "when knife[:ssh_attribute] is set" do
before do
- setup_knife(['*:*', 'uptime'])
+ setup_knife(["*:*", "uptime"])
Chef::Config[:knife][:ssh_attribute] = "ec2.public_hostname"
end
@@ -187,7 +187,7 @@ describe Chef::Knife::Ssh do
context "when knife[:ssh_attribute] is not provided]" do
before do
- setup_knife(['*:*', 'uptime'])
+ setup_knife(["*:*", "uptime"])
Chef::Config[:knife][:ssh_attribute] = nil
end
@@ -199,7 +199,7 @@ describe Chef::Knife::Ssh do
context "when -a ec2.public_ipv4 is provided" do
before do
- setup_knife(['-a ec2.public_hostname', '*:*', 'uptime'])
+ setup_knife(["-a ec2.public_hostname", "*:*", "uptime"])
Chef::Config[:knife][:ssh_attribute] = nil
end
@@ -212,7 +212,7 @@ describe Chef::Knife::Ssh do
# This is the setting imported from knife.rb
Chef::Config[:knife][:ssh_attribute] = "fqdn"
# Then we run knife with the -a flag, which sets the above variable
- setup_knife(['-a ec2.public_hostname', '*:*', 'uptime'])
+ setup_knife(["-a ec2.public_hostname", "*:*", "uptime"])
@knife.run
expect(@knife.config[:attribute]).to eq("ec2.public_hostname")
end
@@ -222,7 +222,7 @@ describe Chef::Knife::Ssh do
describe "gateway" do
context "when knife[:ssh_gateway] is set" do
before do
- setup_knife(['*:*', 'uptime'])
+ setup_knife(["*:*", "uptime"])
Chef::Config[:knife][:ssh_gateway] = "user@ec2.public_hostname"
end
@@ -235,7 +235,7 @@ describe Chef::Knife::Ssh do
context "when -G user@ec2.public_hostname is provided" do
before do
- setup_knife(['-G user@ec2.public_hostname', '*:*', 'uptime'])
+ setup_knife(["-G user@ec2.public_hostname", "*:*", "uptime"])
Chef::Config[:knife][:ssh_gateway] = nil
end
@@ -248,7 +248,7 @@ describe Chef::Knife::Ssh do
context "when the gateway requires a password" do
before do
- setup_knife(['-G user@ec2.public_hostname', '*:*', 'uptime'])
+ setup_knife(["-G user@ec2.public_hostname", "*:*", "uptime"])
Chef::Config[:knife][:ssh_gateway] = nil
allow(@knife.session).to receive(:via) do |host, user, options|
raise Net::SSH::AuthenticationFailed unless options[:password]
@@ -274,7 +274,7 @@ describe Chef::Knife::Ssh do
Chef::Config[:node_name] = nil
Chef::Config[:client_key] = nil
- Chef::Config[:chef_server_url] = 'http://localhost:9000'
+ Chef::Config[:chef_server_url] = "http://localhost:9000"
@api.get("/search/node?q=*:*&sort=X_CHEF_id_CHEF_X%20asc&start=0", 200) {
%({"total":1, "start":0, "rows":[{"name":"i-xxxxxxxx", "json_class":"Chef::Node", "automatic":{"fqdn":"the.fqdn", "ec2":{"public_hostname":"the_public_hostname"}},"recipes":[]}]})