diff options
author | danielsdeleo <dan@getchef.com> | 2015-03-27 13:12:28 -0700 |
---|---|---|
committer | danielsdeleo <dan@getchef.com> | 2015-03-27 14:54:25 -0700 |
commit | 4827c9d31e68eafdff8d865d40479a18e6382793 (patch) | |
tree | b1d632eed5b1c784eae9ac763eea5c6886f47acf /spec/integration/solo | |
parent | 0a089f77adcf988fb43858ae0c446c31ab4727e5 (diff) | |
download | chef-4827c9d31e68eafdff8d865d40479a18e6382793.tar.gz |
Add minimal ohai mode option flagminimal-ohai-mode
Diffstat (limited to 'spec/integration/solo')
-rw-r--r-- | spec/integration/solo/solo_spec.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/integration/solo/solo_spec.rb b/spec/integration/solo/solo_spec.rb index 41f5f5506f..f45933c799 100644 --- a/spec/integration/solo/solo_spec.rb +++ b/spec/integration/solo/solo_spec.rb @@ -15,6 +15,8 @@ describe "chef-solo" do let(:cookbook_ancient_100_metadata_rb) { cb_metadata("ancient", "1.0.0") } + let(:chef_solo) { "ruby bin/chef-solo --minimal-ohai" } + when_the_repository "has a cookbook with a basic recipe" do before do file 'cookbooks/x/metadata.rb', cookbook_x_100_metadata_rb @@ -26,7 +28,7 @@ describe "chef-solo" do cookbook_path "#{path_to('cookbooks')}" file_cache_path "#{path_to('config/cache')}" EOM - result = shell_out("ruby bin/chef-solo -c \"#{path_to('config/solo.rb')}\" -o 'x::default' -l debug", :cwd => chef_dir) + result = shell_out("#{chef_solo} -c \"#{path_to('config/solo.rb')}\" -o 'x::default' -l debug", :cwd => chef_dir) result.error! expect(result.stdout).to include("ITWORKS") end @@ -41,7 +43,7 @@ EOM {"run_list":["x::default"]} E - result = shell_out("ruby bin/chef-solo -c \"#{path_to('config/solo.rb')}\" -j '#{path_to('config/node.json')}' -l debug", :cwd => chef_dir) + result = shell_out("#{chef_solo} -c \"#{path_to('config/solo.rb')}\" -j '#{path_to('config/node.json')}' -l debug", :cwd => chef_dir) result.error! expect(result.stdout).to include("ITWORKS") end @@ -62,7 +64,7 @@ E cookbook_path "#{path_to('cookbooks')}" file_cache_path "#{path_to('config/cache')}" EOM - result = shell_out("ruby bin/chef-solo -c \"#{path_to('config/solo.rb')}\" -o 'x::default' -l debug", :cwd => chef_dir) + result = shell_out("#{chef_solo} -c \"#{path_to('config/solo.rb')}\" -o 'x::default' -l debug", :cwd => chef_dir) expect(result.exitstatus).to eq(0) # For CHEF-5120 this becomes 1 expect(result.stdout).to include("WARN: MissingCookbookDependency") end @@ -95,14 +97,14 @@ EOM chef_dir = File.join(File.dirname(__FILE__), "..", "..", "..") # Instantiate the first chef-solo run - s1 = Process.spawn("ruby bin/chef-solo -c \"#{path_to('config/solo.rb')}\" -o 'x::default' \ + s1 = Process.spawn("#{chef_solo} -c \"#{path_to('config/solo.rb')}\" -o 'x::default' \ -l debug -L #{path_to('logs/runs.log')}", :chdir => chef_dir) # Give it some time to progress sleep 1 # Instantiate the second chef-solo run - s2 = Process.spawn("ruby bin/chef-solo -c \"#{path_to('config/solo.rb')}\" -o 'x::default' \ + s2 = Process.spawn("#{chef_solo} -c \"#{path_to('config/solo.rb')}\" -o 'x::default' \ -l debug -L #{path_to('logs/runs.log')}", :chdir => chef_dir) Process.waitpid(s1) |