[features] test for thin_dump with small metadata

This commit is contained in:
Joe Thornber 2013-07-09 13:06:18 +01:00
parent 311034f771
commit 2ea9cf9961
2 changed files with 15 additions and 1 deletions

View File

@ -53,3 +53,12 @@ end
Then(/^dumps ([0-9]+) and ([0-9]+) should be identical$/) do |d1, d2|
run_simple("diff -ub #{dump_files[d1.to_i]} #{dump_files[d2.to_i]}", true)
end
Given(/^small metadata$/) do
in_current_dir do
system("thinp_xml create --nr-thins 2 --nr-mappings 1 > #{xml_file}")
end
run_simple("dd if=/dev/zero of=#{dev_file} bs=4k count=1024")
run_simple("thin_restore -i #{xml_file} -o #{dev_file}")
end

View File

@ -50,4 +50,9 @@ Feature: thin_restore
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
Scenario: dump matches original metadata (small)
Given small metadata
When I dump
Then dumps 0 and 1 should be identical