summaryrefslogtreecommitdiff
path: root/spec/integration/recipes
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-07-05 12:58:00 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2019-07-05 12:58:00 -0700
commit2a4916b7f01940d1199c35645c1b2172f5bd74b2 (patch)
treedf7370ed682895857181f14bb66cad8db18b298e /spec/integration/recipes
parent8215091264d67d81f0da9a13f968b864ff736cb2 (diff)
downloadchef-2a4916b7f01940d1199c35645c1b2172f5bd74b2.tar.gz
Style/StringLiteralsInInterpolation
since we use double quotes, be consistent everywhere. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/integration/recipes')
-rw-r--r--spec/integration/recipes/accumulator_spec.rb8
-rw-r--r--spec/integration/recipes/lwrp_inline_resources_spec.rb4
-rw-r--r--spec/integration/recipes/lwrp_spec.rb4
-rw-r--r--spec/integration/recipes/notifies_spec.rb40
-rw-r--r--spec/integration/recipes/notifying_block_spec.rb8
-rw-r--r--spec/integration/recipes/remote_directory.rb4
6 files changed, 34 insertions, 34 deletions
diff --git a/spec/integration/recipes/accumulator_spec.rb b/spec/integration/recipes/accumulator_spec.rb
index d19d8637bb..98e3581071 100644
--- a/spec/integration/recipes/accumulator_spec.rb
+++ b/spec/integration/recipes/accumulator_spec.rb
@@ -115,11 +115,11 @@ describe "Accumulators" do
it "should complete with success" do
file "config/client.rb", <<-EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
result.error!
# runs only a single template resource (in the outer run context, as a delayed resource)
expect(result.stdout.scan(/template\S+ action create/).size).to eql(1)
@@ -217,11 +217,11 @@ describe "Accumulators" do
it "should complete with success" do
file "config/client.rb", <<-EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
result.error!
# runs only a single template resource (in the outer run context, as a delayed resource)
expect(result.stdout.scan(/template\S+ action create/).size).to eql(1)
diff --git a/spec/integration/recipes/lwrp_inline_resources_spec.rb b/spec/integration/recipes/lwrp_inline_resources_spec.rb
index d978a18e3e..75516203b3 100644
--- a/spec/integration/recipes/lwrp_inline_resources_spec.rb
+++ b/spec/integration/recipes/lwrp_inline_resources_spec.rb
@@ -147,11 +147,11 @@ describe "LWRPs with inline resources" do
it "should complete with success" do
file "config/client.rb", <<~EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
actual = result.stdout.lines.map { |l| l.chomp }.join("\n")
expected = <<EOM
* x_my_machine[me] action create
diff --git a/spec/integration/recipes/lwrp_spec.rb b/spec/integration/recipes/lwrp_spec.rb
index ce2861d43b..957c1ea66f 100644
--- a/spec/integration/recipes/lwrp_spec.rb
+++ b/spec/integration/recipes/lwrp_spec.rb
@@ -40,11 +40,11 @@ describe "LWRPs" do
it "should complete with success" do
file "config/client.rb", <<~EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'l-w-r-p::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'l-w-r-p::default'", cwd: chef_dir)
expect(result.stdout).to match(/\* l_w_r_p_foo\[me\] action create \(up to date\)/)
expect(result.stdout).not_to match(/WARN: You are overriding l_w_r_p_foo/)
result.error!
diff --git a/spec/integration/recipes/notifies_spec.rb b/spec/integration/recipes/notifies_spec.rb
index 860a109e4d..ae534dcad4 100644
--- a/spec/integration/recipes/notifies_spec.rb
+++ b/spec/integration/recipes/notifies_spec.rb
@@ -28,11 +28,11 @@ describe "notifications" do
it "should complete with success" do
file "config/client.rb", <<~EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
# our delayed notification should run at the end of the parent run_context after the baz resource
expect(result.stdout).to match(/\* apt_update\[\] action nothing \(skipped due to action :nothing\)\s+\* log\[foo\] action write\s+\* log\[bar\] action write\s+\* apt_update\[\] action nothing \(skipped due to action :nothing\)/)
result.error!
@@ -69,11 +69,11 @@ describe "notifications" do
it "should complete with success" do
file "config/client.rb", <<~EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
# our delayed notification should run at the end of the parent run_context after the baz resource
expect(result.stdout).to match(/\* log\[bar\] action write\s+\* log\[baz\] action write\s+\* log\[foo\] action write/)
result.error!
@@ -112,11 +112,11 @@ describe "notifications" do
it "should complete with success" do
file "config/client.rb", <<~EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
# our delayed notification should run at the end of the parent run_context after the baz resource
expect(result.stdout).to match(/\* log\[bar\] action write\s+\* log\[baz\] action write\s+\* log\[foo\] action write/)
# and only run once
@@ -159,11 +159,11 @@ describe "notifications" do
it "should complete with success" do
file "config/client.rb", <<~EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
# the delayed notification from the sub-resource is de-duplicated by the notification already in the parent run_context
expect(result.stdout).to match(/\* log\[quux\] action write\s+\* notifying_test\[whatever\] action run\s+\* log\[bar\] action write\s+\* log\[baz\] action write\s+\* log\[foo\] action write\s+\* log\[baz\] action write/)
# and only run once
@@ -193,11 +193,11 @@ describe "notifications" do
it "should complete with success" do
file "config/client.rb", <<~EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
# the delayed notification from the sub-resource is de-duplicated by the notification already in the parent run_context
expect(result.stdout).to match(/\* log\[bar\] action write\s+\* log\[baz\] action write\s+\* log\[foo\] action write/)
# and only run once
@@ -236,11 +236,11 @@ describe "notifications" do
it "should complete with success" do
file "config/client.rb", <<~EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
expect(result.stdout).to match(/\* log\[bar\] action write\s+\* log\[foo\] action write\s+\* log\[baz\] action write/)
result.error!
end
@@ -276,11 +276,11 @@ describe "notifications" do
it "should complete with success" do
file "config/client.rb", <<~EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
expect(result.stdout).to match(/\* log\[bar\] action write\s+\* log\[foo\] action write\s+\* log\[baz\] action write/)
result.error!
end
@@ -313,11 +313,11 @@ describe "notifications" do
it "should complete with success" do
file "config/client.rb", <<~EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
expect(result.stdout).to match(/Chef::Exceptions::ResourceNotFound/)
expect(result.exitstatus).not_to eql(0)
end
@@ -353,11 +353,11 @@ describe "notifications" do
it "should complete with success" do
file "config/client.rb", <<~EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
expect(result.stdout).not_to match(/CHEF-3694/)
result.error!
end
@@ -381,11 +381,11 @@ describe "notifications" do
it "notifying the resource should work" do
file "config/client.rb", <<~EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
expect(result.stdout).to match /\* log\[a, b\] action write/
result.error!
end
diff --git a/spec/integration/recipes/notifying_block_spec.rb b/spec/integration/recipes/notifying_block_spec.rb
index 753e81dadb..465eca97ed 100644
--- a/spec/integration/recipes/notifying_block_spec.rb
+++ b/spec/integration/recipes/notifying_block_spec.rb
@@ -45,7 +45,7 @@ describe "notifying_block" do
end
file "config/client.rb", <<-EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
end
@@ -55,7 +55,7 @@ describe "notifying_block" do
# 2. delayed notifications are de-dup'd in the subcontext
# 3. delayed notifications (to resources inside the subcontext) are run at the end of the subcontext
it "should run alpha, beta, gamma, and delta in that order" do
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
expect(result.stdout).to match(/\* log\[alpha\] action write\s+\* log\[beta\] action write\s+\* log\[gamma\] action write\s+Converging 1 resources\s+\* log\[delta\] action write/)
result.error!
end
@@ -94,7 +94,7 @@ describe "notifying_block" do
end
file "config/client.rb", <<-EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
log_level :warn
EOM
end
@@ -103,7 +103,7 @@ describe "notifying_block" do
# 1. notifying block will correctly update wrapping new_resource updated_by_last_action status
# 2. delayed notifications from a subcontext inside a resource will notify resources in their outer run_context
it "should run foo, quux, bar, and baz in that order" do
- result = shell_out("#{chef_client} -c \"#{path_to('config/client.rb')}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
+ result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --no-color -F doc -o 'x::default'", cwd: chef_dir)
expect(result.stdout).to match(/\* log\[foo\] action write\s+\* log\[quux\] action write\s+\* log\[bar\] action write\s+\* log\[baz\] action write/)
result.error!
end
diff --git a/spec/integration/recipes/remote_directory.rb b/spec/integration/recipes/remote_directory.rb
index 6f67a38fc8..8332fb1b56 100644
--- a/spec/integration/recipes/remote_directory.rb
+++ b/spec/integration/recipes/remote_directory.rb
@@ -22,7 +22,7 @@ describe Chef::Resource::RemoteDirectory do
before do
file "config/client.rb", <<-EOM
local_mode true
- cookbook_path "#{path_to('cookbooks')}"
+ cookbook_path "#{path_to("cookbooks")}"
EOM
directory "cookbooks/test" do
directory "files/default/source_dir" do
@@ -50,7 +50,7 @@ describe Chef::Resource::RemoteDirectory do
end
EOM
end
- shell_out!("#{chef_client} -c \"#{path_to('config/client.rb')}\" -o 'test::default'", cwd: chef_dir)
+ shell_out!("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'test::default'", cwd: chef_dir)
end
def mode_of(path)