[cache_dump, cache_restore] restore/dump cycle works
This commit is contained in:
@@ -41,6 +41,7 @@ Feature: cache_dump
|
||||
No input file provided.
|
||||
"""
|
||||
|
||||
@announce
|
||||
Scenario: dump/restore is a noop
|
||||
Given valid cache metadata
|
||||
When I cache_dump
|
||||
|
@@ -53,6 +53,7 @@ Feature: thin_restore
|
||||
No output file provided.
|
||||
"""
|
||||
|
||||
@announce
|
||||
Scenario: successfully restores a valid xml file
|
||||
Given a small xml file
|
||||
And an empty dev file
|
||||
|
@@ -74,14 +74,14 @@ end
|
||||
|
||||
Given(/^valid cache metadata$/) do
|
||||
in_current_dir do
|
||||
system("cache_xml create --nr-cache-blocks uniform[1000-5000] --nr-mappings uniform[500-1000] > #{xml_file}")
|
||||
system("cache_xml create --nr-cache-blocks uniform[1000..5000] --nr-mappings uniform[500..1000] > #{xml_file}")
|
||||
end
|
||||
|
||||
run_simple("dd if=/dev/zero of=#{dev_file} bs=4k count=1024")
|
||||
run_simple("cache_restore -i #{xml_file} -o #{dev_file}")
|
||||
end
|
||||
|
||||
Then(/^cache dumps (\d+) and (\d+) should be identical$/) do |arg1, arg2|
|
||||
Then(/^cache dumps (\d+) and (\d+) should be identical$/) do |d1, d2|
|
||||
run_simple("diff -ub #{dump_files[d1.to_i]} #{dump_files[d2.to_i]}", true)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user