From ceba0f00eca05e9f611cea6beb1a22256fd4c12d Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Fri, 28 Jun 2013 12:28:02 +0100 Subject: [PATCH] [features] dump matches original metadata Currently failing --- features/step_definitions/thin_steps.rb | 6 +++--- features/support/world_extensions.rb | 2 +- features/thin_restore.feature | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/features/step_definitions/thin_steps.rb b/features/step_definitions/thin_steps.rb index 98a8e4f..9449fd0 100644 --- a/features/step_definitions/thin_steps.rb +++ b/features/step_definitions/thin_steps.rb @@ -43,13 +43,13 @@ Then(/^it should pass with version$/) do end When(/^I dump$/) do - run_simple("thin_dump #{dev_file} -o #{new_dump_file}", false) + run_simple("thin_dump #{dev_file} -o #{new_dump_file}", true) end When(/^I restore$/) do - run_simple("thin_restore -i #{dump_files[-1]} -o #{dev_file}", false) + run_simple("thin_restore -i #{dump_files[-1]} -o #{dev_file}", true) end Then(/^dumps ([0-9]+) and ([0-9]+) should be identical$/) do |d1, d2| - run_simple("diff -b #{dump_files[d1.to_i]} #{dump_files[d2.to_i]}", false) + run_simple("diff -ub #{dump_files[d1.to_i]} #{dump_files[d2.to_i]}", true) end diff --git a/features/support/world_extensions.rb b/features/support/world_extensions.rb index 430673e..1fc44a9 100644 --- a/features/support/world_extensions.rb +++ b/features/support/world_extensions.rb @@ -23,7 +23,7 @@ module ThinpWorld end def dump_files - @dump_files ||= [] + @dump_files ||= [xml_file] end def new_dump_file diff --git a/features/thin_restore.feature b/features/thin_restore.feature index be1a576..2ed4c2b 100644 --- a/features/thin_restore.feature +++ b/features/thin_restore.feature @@ -45,4 +45,9 @@ Feature: thin_restore When I dump And I restore And I dump + Then dumps 1 and 2 should be identical + + Scenario: dump matches original metadata + Given valid metadata + When I dump Then dumps 0 and 1 should be identical \ No newline at end of file