Start stubbing out cache_dump

This commit is contained in:
Joe Thornber
2013-08-19 12:40:03 +01:00
parent a933749cbf
commit d3ce6b811b
6 changed files with 125 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
Feature: cache_dump
Scenario: print version (-V flag)
When I run cache_dump with -V
Then it should pass with version
Scenario: print version (--version flag)
When I run cache_dump with --version
Then it should pass with version
Scenario: print help (-h)
When I run cache_dump with -h
Then it should pass with:
"""
Usage: cache_dump [options] {device|file}
Options:
{-h|--help}
{-V|--version}
"""
Scenario: print help (--help)
When I run cache_dump with -h
Then it should pass with:
"""
Usage: cache_dump [options] {device|file}
Options:
{-h|--help}
{-V|--version}
"""

View File

@@ -46,3 +46,10 @@ Feature: thin_restore
"""
No output file provided.
"""
Scenario: dump/restore is a noop
Given valid cache metadata
When I dump cache
And I restore cache
And I dump cache
Then cache dumps 1 and 2 should be identical

View File

@@ -64,3 +64,22 @@ When(/^I run cache_restore with (.*?)$/) do |opts|
run_simple("cache_restore #{opts}", false)
end
When(/^I run cache_dump with (.*?)$/) do |opts|
run_simple("cache_dump #{opts}", false)
end
Given(/^valid cache metadata$/) do
pending # express the regexp above with the code you wish you had
end
When(/^I dump cache$/) do
pending # express the regexp above with the code you wish you had
end
When(/^I restore cache$/) do
pending # express the regexp above with the code you wish you had
end
Then(/^cache dumps (\d+) and (\d+) should be identical$/) do |arg1, arg2|
pending # express the regexp above with the code you wish you had
end