Flatten features directory tree
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
Feature: `echo' task action
|
||||
|
||||
Scenario: prints text on standard output
|
||||
Given a recipe with:
|
||||
"""
|
||||
task :say_hello do
|
||||
echo 'hello'
|
||||
end
|
||||
"""
|
||||
When I successfully execute the recipe
|
||||
Then the output must match /\Ahello\n/
|
@@ -1,17 +0,0 @@
|
||||
@sshd
|
||||
Feature: `file_append' task action
|
||||
|
||||
Background:
|
||||
Given a remote file named "some_file" with "some content"
|
||||
|
||||
Scenario: appends given content to requested file
|
||||
Given a recipe with:
|
||||
"""
|
||||
target 'some_host.test'
|
||||
|
||||
task :append_content_to_file do
|
||||
file_append 'some_file', ' added'
|
||||
end
|
||||
"""
|
||||
When I successfully execute the recipe
|
||||
Then the remote file "some_file" must contain exactly "some content added"
|
@@ -1,29 +0,0 @@
|
||||
@sshd
|
||||
Feature: `file_replace_content' task action
|
||||
|
||||
Background:
|
||||
Given a remote file named "some_file" with "some content"
|
||||
|
||||
Scenario: replaces a string by another in the requested file
|
||||
Given a recipe with:
|
||||
"""
|
||||
target 'some_host.test'
|
||||
|
||||
task :replace_string_in_file do
|
||||
file_replace_content 'some_file', 'content', 'other content'
|
||||
end
|
||||
"""
|
||||
When I successfully execute the recipe
|
||||
And the remote file "some_file" must contain exactly "some other content"
|
||||
|
||||
Scenario: replaces a regular expression by a string in the requested file
|
||||
Given a recipe with:
|
||||
"""
|
||||
target 'some_host.test'
|
||||
|
||||
task :replace_regexp_in_file do
|
||||
file_replace_content 'some_file', /\w+\z/, 'other content'
|
||||
end
|
||||
"""
|
||||
When I successfully execute the recipe
|
||||
And the remote file "some_file" must contain exactly "some other content"
|
@@ -1,28 +0,0 @@
|
||||
@sshd
|
||||
Feature: `file_write' task action
|
||||
|
||||
Scenario: writes given data to given file path
|
||||
Given a recipe with:
|
||||
"""
|
||||
target 'some_host.test'
|
||||
|
||||
task :write_some_data do
|
||||
file_write 'some_file', 'some_content'
|
||||
end
|
||||
"""
|
||||
When I successfully execute the recipe
|
||||
Then the remote file "some_file" must contain "some_content"
|
||||
|
||||
Scenario: creates file with given permissions
|
||||
Given a recipe with:
|
||||
"""
|
||||
target 'some_host.test'
|
||||
|
||||
task :write_some_data do
|
||||
file_write 'some_file_0600', 'some_content', 0600
|
||||
file_write 'some_file_0700', 'some_content', 0700
|
||||
end
|
||||
"""
|
||||
When I successfully execute the recipe
|
||||
Then the remote file "some_file_0600" must have 0600 mode
|
||||
And the remote file "some_file_0700" must have 0700 mode
|
@@ -1,28 +0,0 @@
|
||||
@sshd
|
||||
Feature: `mkdir' task action
|
||||
|
||||
Scenario: creates directory given as argument
|
||||
Given a recipe with:
|
||||
"""
|
||||
target 'some_host.test'
|
||||
|
||||
task :create_some_dir do
|
||||
mkdir 'some_directory'
|
||||
end
|
||||
"""
|
||||
When I successfully execute the recipe
|
||||
Then the remote directory "some_directory" must exists
|
||||
|
||||
Scenario: creates directory with given permissions
|
||||
Given a recipe with:
|
||||
"""
|
||||
target 'some_host.test'
|
||||
|
||||
task :create_some_dir do
|
||||
mkdir '0700_directory', 0700
|
||||
mkdir '0500_directory', 0500
|
||||
end
|
||||
"""
|
||||
When I successfully execute the recipe
|
||||
Then the remote directory "0700_directory" must have 0700 mode
|
||||
And the remote directory "0500_directory" must have 0500 mode
|
@@ -1,51 +0,0 @@
|
||||
@sshd
|
||||
Feature: `sh' task action
|
||||
|
||||
Scenario: executes command
|
||||
Given a recipe with:
|
||||
"""
|
||||
target 'some_host.test'
|
||||
|
||||
task :some_task do
|
||||
sh '\true'
|
||||
end
|
||||
"""
|
||||
When I execute the recipe
|
||||
Then the exit status must be 0
|
||||
|
||||
Scenario: forwards standard ouput
|
||||
Given a recipe with:
|
||||
"""
|
||||
target 'some_host.test'
|
||||
|
||||
task :some_task do
|
||||
sh '\echo hello from remote'
|
||||
end
|
||||
"""
|
||||
When I successfully execute the recipe
|
||||
Then the output must contain exactly "hello from remote\n"
|
||||
|
||||
Scenario: aborts on failed command execution
|
||||
Given a recipe with:
|
||||
"""
|
||||
target 'some_host.test'
|
||||
|
||||
task :some_task do
|
||||
sh '\false'
|
||||
sh '\echo after_fail'
|
||||
end
|
||||
"""
|
||||
When I execute the recipe
|
||||
Then the output must not contain "after_fail"
|
||||
|
||||
Scenario: prints command when execution fail
|
||||
Given a recipe with:
|
||||
"""
|
||||
target 'some_host.test'
|
||||
|
||||
task :some_task do
|
||||
sh '\false'
|
||||
end
|
||||
"""
|
||||
When I execute the recipe
|
||||
Then the output must match /\A\w+Error:\s+\\false/
|
Reference in New Issue
Block a user