diff options
Diffstat (limited to 'spec/integration/recipes')
-rw-r--r-- | spec/integration/recipes/accumulator_spec.rb | 4 | ||||
-rw-r--r-- | spec/integration/recipes/lwrp_inline_resources_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/lwrp_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/recipes/notifies_spec.rb | 20 | ||||
-rw-r--r-- | spec/integration/recipes/notifying_block_spec.rb | 4 | ||||
-rw-r--r-- | spec/integration/recipes/remote_directory.rb | 2 |
6 files changed, 17 insertions, 17 deletions
diff --git a/spec/integration/recipes/accumulator_spec.rb b/spec/integration/recipes/accumulator_spec.rb index 4a193bd7f0..65a05fcdc5 100644 --- a/spec/integration/recipes/accumulator_spec.rb +++ b/spec/integration/recipes/accumulator_spec.rb @@ -119,7 +119,7 @@ describe "Accumulators" do 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) @@ -221,7 +221,7 @@ describe "Accumulators" do 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 54ce94f263..a9832fe6b0 100644 --- a/spec/integration/recipes/lwrp_inline_resources_spec.rb +++ b/spec/integration/recipes/lwrp_inline_resources_spec.rb @@ -151,7 +151,7 @@ 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 3bc008d4f8..3494924a8f 100644 --- a/spec/integration/recipes/lwrp_spec.rb +++ b/spec/integration/recipes/lwrp_spec.rb @@ -44,7 +44,7 @@ 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 b008e4ade7..2aa02554b9 100644 --- a/spec/integration/recipes/notifies_spec.rb +++ b/spec/integration/recipes/notifies_spec.rb @@ -32,7 +32,7 @@ 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! @@ -73,7 +73,7 @@ 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! @@ -116,7 +116,7 @@ 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 @@ -163,7 +163,7 @@ 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 @@ -197,7 +197,7 @@ 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 @@ -240,7 +240,7 @@ 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 @@ -280,7 +280,7 @@ 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 @@ -317,7 +317,7 @@ 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 @@ -357,7 +357,7 @@ 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 @@ -385,7 +385,7 @@ 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 6a1287c7b1..6c50854038 100644 --- a/spec/integration/recipes/notifying_block_spec.rb +++ b/spec/integration/recipes/notifying_block_spec.rb @@ -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 @@ -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 77fe183136..a0e3e23ef3 100644 --- a/spec/integration/recipes/remote_directory.rb +++ b/spec/integration/recipes/remote_directory.rb @@ -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) |