2013-08-16 20:59:41 +05:30
|
|
|
Feature: thin_restore
|
|
|
|
Scenario: print version (-V flag)
|
|
|
|
When I run cache_restore with -V
|
|
|
|
Then it should pass with version
|
|
|
|
|
|
|
|
Scenario: print version (--version flag)
|
|
|
|
When I run cache_restore with --version
|
|
|
|
Then it should pass with version
|
|
|
|
|
|
|
|
Scenario: print help (-h)
|
|
|
|
When I run cache_restore with -h
|
2013-10-15 14:54:12 +05:30
|
|
|
Then it should pass
|
|
|
|
And the output should contain exactly:
|
2013-08-16 20:59:41 +05:30
|
|
|
|
|
|
|
"""
|
|
|
|
Usage: cache_restore [options]
|
|
|
|
Options:
|
|
|
|
{-h|--help}
|
|
|
|
{-i|--input} <input xml file>
|
|
|
|
{-o|--output} <output device or file>
|
|
|
|
{-V|--version}
|
2013-10-15 14:54:12 +05:30
|
|
|
|
|
|
|
{--debug-override-metadata-version} <integer>
|
2013-10-29 18:16:23 +05:30
|
|
|
{--omit-clean-shutdown}
|
2013-10-15 14:54:12 +05:30
|
|
|
|
2013-08-16 20:59:41 +05:30
|
|
|
"""
|
|
|
|
|
|
|
|
Scenario: print help (--help)
|
|
|
|
When I run cache_restore with -h
|
2013-10-15 14:54:12 +05:30
|
|
|
Then it should pass
|
|
|
|
And the output should contain exactly:
|
2013-08-16 20:59:41 +05:30
|
|
|
|
|
|
|
"""
|
|
|
|
Usage: cache_restore [options]
|
|
|
|
Options:
|
|
|
|
{-h|--help}
|
|
|
|
{-i|--input} <input xml file>
|
|
|
|
{-o|--output} <output device or file>
|
|
|
|
{-V|--version}
|
2013-10-15 14:54:12 +05:30
|
|
|
|
|
|
|
{--debug-override-metadata-version} <integer>
|
2013-10-29 18:16:23 +05:30
|
|
|
{--omit-clean-shutdown}
|
2013-10-15 14:54:12 +05:30
|
|
|
|
2013-08-16 20:59:41 +05:30
|
|
|
"""
|
|
|
|
|
|
|
|
Scenario: missing input file
|
2013-09-16 18:11:55 +05:30
|
|
|
Given the dev file metadata.bin
|
2013-08-16 20:59:41 +05:30
|
|
|
When I run cache_restore with -o metadata.bin
|
|
|
|
Then it should fail with:
|
|
|
|
"""
|
|
|
|
No input file provided.
|
|
|
|
"""
|
|
|
|
|
2013-09-11 16:10:46 +05:30
|
|
|
Scenario: input file not found
|
2013-09-16 18:11:55 +05:30
|
|
|
Given the dev file metadata.bin
|
2013-09-11 16:10:46 +05:30
|
|
|
When I run cache_restore with -i foo.xml -o metadata.bin
|
|
|
|
Then it should fail
|
|
|
|
|
2013-08-16 20:59:41 +05:30
|
|
|
Scenario: missing output file
|
|
|
|
When I run cache_restore with -i metadata.xml
|
|
|
|
Then it should fail with:
|
|
|
|
"""
|
|
|
|
No output file provided.
|
|
|
|
"""
|
2013-08-19 17:10:03 +05:30
|
|
|
|
2013-09-11 16:10:46 +05:30
|
|
|
Scenario: successfully restores a valid xml file
|
|
|
|
Given a small xml file
|
|
|
|
And an empty dev file
|
|
|
|
When I run cache_restore with -i metadata.xml -o metadata.bin
|
|
|
|
Then it should pass
|
2013-10-15 14:54:12 +05:30
|
|
|
|
|
|
|
Scenario: accepts --debug-override-metadata-version
|
|
|
|
Given a small xml file
|
|
|
|
And an empty dev file
|
|
|
|
When I run cache_restore with -i metadata.xml -o metadata.bin --debug-override-metadata-version 10298
|
|
|
|
Then it should pass
|
2013-10-29 18:16:23 +05:30
|
|
|
|
|
|
|
Scenario: accepts --omit-clean-shutdown
|
|
|
|
Given a small xml file
|
|
|
|
And an empty dev file
|
|
|
|
When I run cache_restore with -i metadata.xml -o metadata.bin --omit-clean-shutdown
|
|
|
|
Then it should pass
|