Fixup some feature tests that need metadata.bin present

They were failing for the wrong reason.
This commit is contained in:
Joe Thornber 2013-09-16 13:41:55 +01:00
parent 6638f7054f
commit ea424c4134
3 changed files with 8 additions and 0 deletions

View File

@ -34,6 +34,7 @@ Feature: thin_restore
""" """
Scenario: missing input file Scenario: missing input file
Given the dev file metadata.bin
When I run cache_restore with -o metadata.bin When I run cache_restore with -o metadata.bin
Then it should fail with: Then it should fail with:
""" """
@ -41,6 +42,7 @@ Feature: thin_restore
""" """
Scenario: input file not found Scenario: input file not found
Given the dev file metadata.bin
When I run cache_restore with -i foo.xml -o metadata.bin When I run cache_restore with -i foo.xml -o metadata.bin
Then it should fail Then it should fail

View File

@ -7,6 +7,10 @@ Given(/^valid metadata$/) do
run_simple("thin_restore -i #{xml_file} -o #{dev_file}") run_simple("thin_restore -i #{xml_file} -o #{dev_file}")
end end
Given(/^the dev file metadata\.bin$/) do
run_simple("dd if=/dev/zero of=#{dev_file} bs=4k count=1024")
end
Given(/^a corrupt superblock$/) do Given(/^a corrupt superblock$/) do
in_current_dir do in_current_dir do
write_valid_xml(xml_file) write_valid_xml(xml_file)

View File

@ -34,6 +34,7 @@ Feature: thin_restore
""" """
Scenario: missing input file Scenario: missing input file
Given the dev file metadata.bin
When I run thin_restore with -o metadata.bin When I run thin_restore with -o metadata.bin
Then it should fail with: Then it should fail with:
""" """
@ -41,6 +42,7 @@ Feature: thin_restore
""" """
Scenario: input file not found Scenario: input file not found
Given the dev file metadata.bin
When I run thin_restore with -i foo.xml -o metadata.bin When I run thin_restore with -i foo.xml -o metadata.bin
Then it should fail Then it should fail