[cache_check features] rename a step
This commit is contained in:
@@ -13,19 +13,19 @@ Feature: cache_check
|
|||||||
When I run `cache_check --help`
|
When I run `cache_check --help`
|
||||||
|
|
||||||
Then it should pass
|
Then it should pass
|
||||||
And usage to stdout
|
And cache_usage to stdout
|
||||||
|
|
||||||
Scenario: print help
|
Scenario: print help
|
||||||
When I run `cache_check -h`
|
When I run `cache_check -h`
|
||||||
|
|
||||||
Then it should pass
|
Then it should pass
|
||||||
And usage to stdout
|
And cache_usage to stdout
|
||||||
|
|
||||||
Scenario: Metadata file must be specified
|
Scenario: Metadata file must be specified
|
||||||
When I run `cache_check`
|
When I run `cache_check`
|
||||||
|
|
||||||
Then it should fail
|
Then it should fail
|
||||||
And usage to stderr
|
And cache_usage to stderr
|
||||||
And the stderr should contain:
|
And the stderr should contain:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -52,6 +52,7 @@ Feature: cache_check
|
|||||||
foo: Not a block device or regular file
|
foo: Not a block device or regular file
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# This test will fail if you're running as root
|
||||||
Scenario: Metadata file exists, but can't be opened
|
Scenario: Metadata file exists, but can't be opened
|
||||||
Given input without read permissions
|
Given input without read permissions
|
||||||
When I run `cache_check input`
|
When I run `cache_check input`
|
||||||
|
@@ -34,7 +34,7 @@ Then /^it should fail$/ do
|
|||||||
assert_success(false)
|
assert_success(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
USAGE =<<EOF
|
CACHE_USAGE =<<EOF
|
||||||
Usage: cache_check [options] {device|file}
|
Usage: cache_check [options] {device|file}
|
||||||
Options:
|
Options:
|
||||||
{-q|--quiet}
|
{-q|--quiet}
|
||||||
@@ -45,12 +45,12 @@ Options:
|
|||||||
{--skip-hints}
|
{--skip-hints}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
Then /^usage to stdout$/ do
|
Then /^cache_usage to stdout$/ do
|
||||||
assert_partial_output(USAGE, all_stdout)
|
assert_partial_output(CACHE_USAGE, all_stdout)
|
||||||
end
|
end
|
||||||
|
|
||||||
Then /^usage to stderr$/ do
|
Then /^cache_usage to stderr$/ do
|
||||||
assert_partial_output(USAGE, all_stderr)
|
assert_partial_output(CACHE_USAGE, all_stderr)
|
||||||
end
|
end
|
||||||
|
|
||||||
When(/^I run cache_check with (.*?)$/) do |opts|
|
When(/^I run cache_check with (.*?)$/) do |opts|
|
||||||
|
Reference in New Issue
Block a user