[features] test for thin_dump with small metadata
This commit is contained in:
parent
311034f771
commit
2ea9cf9961
@ -53,3 +53,12 @@ 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 -ub #{dump_files[d1.to_i]} #{dump_files[d2.to_i]}", true)
|
run_simple("diff -ub #{dump_files[d1.to_i]} #{dump_files[d2.to_i]}", true)
|
||||||
end
|
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
|
||||||
|
@ -50,4 +50,9 @@ Feature: thin_restore
|
|||||||
Scenario: dump matches original metadata
|
Scenario: dump matches original metadata
|
||||||
Given valid metadata
|
Given valid metadata
|
||||||
When I dump
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user