[features] dump matches original metadata

Currently failing
This commit is contained in:
Joe Thornber 2013-06-28 12:28:02 +01:00
parent 90fb1c4fb5
commit ceba0f00ec
3 changed files with 9 additions and 4 deletions

View File

@ -43,13 +43,13 @@ Then(/^it should pass with version$/) do
end end
When(/^I dump$/) do 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 end
When(/^I restore$/) do 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 end
Then(/^dumps ([0-9]+) and ([0-9]+) should be identical$/) do |d1, d2| 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 end

View File

@ -23,7 +23,7 @@ module ThinpWorld
end end
def dump_files def dump_files
@dump_files ||= [] @dump_files ||= [xml_file]
end end
def new_dump_file def new_dump_file

View File

@ -45,4 +45,9 @@ Feature: thin_restore
When I dump When I dump
And I restore And I restore
And I dump 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 Then dumps 0 and 1 should be identical