diff --git a/test/acceptance/base.rb b/test/acceptance/base.rb index 7026e1239..68e3dfe2b 100644 --- a/test/acceptance/base.rb +++ b/test/acceptance/base.rb @@ -47,6 +47,10 @@ class AcceptanceTest < Test::Unit::TestCase # variables to pass in. apps = { "vagrant" => config.vagrant_path } @environment = Acceptance::IsolatedEnvironment.new(apps, config.env) + + # Setup a logger for this test, since tests often log to assist + # with the debugging process in case of failure. + @logger = Log4r::Logger.new("acceptance::#{self.class.name.downcase.gsub("test", "")}") end teardown do diff --git a/test/acceptance/box_test.rb b/test/acceptance/box_test.rb index d186cbe0d..82b937e26 100644 --- a/test/acceptance/box_test.rb +++ b/test/acceptance/box_test.rb @@ -67,6 +67,7 @@ class BoxTest < AcceptanceTest require_box("default") original_size = File.size(config.boxes["default"]) + @logger.debug("Original package size: #{original_size}") # Add the box, repackage it, and verify that a package.box is # dumped of relatively similar size. @@ -79,6 +80,7 @@ class BoxTest < AcceptanceTest # Compare the sizes repackaged_size = repackaged_file.size + @logger.debug("Repackaged size: #{repackaged_size}") size_diff = (repackaged_size - original_size).abs assert(size_diff < 1000, "Sizes should be very similar") end