[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
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

View File

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

View File

@ -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