summaryrefslogtreecommitdiff
path: root/spec/integration/solo
diff options
context:
space:
mode:
authorsersut <serdar@opscode.com>2013-06-14 13:53:23 -0700
committersersut <serdar@opscode.com>2013-06-14 14:40:54 -0700
commit42700be6af79e6154993608aaa375fd4af359cdb (patch)
treedfbc5f87679072e7bf52919c87dfc4567ee2f791 /spec/integration/solo
parent126635988ecebd582e89afa4b6b5e6d8d07fa1ef (diff)
downloadchef-42700be6af79e6154993608aaa375fd4af359cdb.tar.gz
Better error logging in solo integration test.
Diffstat (limited to 'spec/integration/solo')
-rw-r--r--spec/integration/solo/solo_spec.rb19
1 files changed, 14 insertions, 5 deletions
diff --git a/spec/integration/solo/solo_spec.rb b/spec/integration/solo/solo_spec.rb
index 25db2c0b97..667a9ad87b 100644
--- a/spec/integration/solo/solo_spec.rb
+++ b/spec/integration/solo/solo_spec.rb
@@ -14,17 +14,26 @@ describe "chef-solo" do
file 'cookbooks/x/metadata.rb', 'version "1.0.0"'
file 'cookbooks/x/recipes/default.rb', ''
- it "should complete with success" do
- config_file = canonicalize_path(File.join(@repository_dir, 'config', 'solo.rb'))
+ before do
+ @chef_file_cache = Dir.mktmpdir('file_cache')
+ end
+
+ after do
+ FileUtils.rm_rf(@chef_file_cache) if @chef_file_cache
+ end
+ it "should complete with success" do
# prepare the solo config
directory 'config'
- file 'config/solo.rb', "cookbook_path \"#{File.join(@repository_dir, 'cookbooks')}\""
+ file 'config/solo.rb', <<EOM
+cookbook_path "#{File.join(@repository_dir, 'cookbooks')}"
+file_cache_path "#{@chef_file_cache}"
+EOM
+ config_file = canonicalize_path(File.join(@repository_dir, 'config', 'solo.rb'))
chef_dir = File.join(File.dirname(__FILE__), "..", "..", "..", "bin")
result = shell_out("chef-solo -c \"#{config_file}\" -o 'x::default' -l debug", :cwd => chef_dir)
-
- result.exitstatus.should == 0
+ result.error!
end
end