This repository was archived by the owner on Jan 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy patherror_handlers.feature
More file actions
67 lines (60 loc) · 3.34 KB
/
error_handlers.feature
File metadata and controls
67 lines (60 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Feature: Test tasks for error handlers
Background:
Given a test app with the default configuration
And the remote server is cleared
And I extend the development capistrano configuration from the fixture file default_deployment_behaviour.rb
And the project is deployed
Scenario: When deployment fails before symlinking the new release
Given I store the symlink source of current
And I provoke an exception for testing purposes before symlinking the new release
And a remote file named "shared_path/config/maintenance.json" should not exist
Then I run `cap dev deploy`
And the output should contain "Failing this deployment on purpose!"
And the exit status should not be 0
And a remote file named "shared_path/config/maintenance.json" should not exist
And the symlink source of current should not have changed
And the exit status should not be 0
Scenario: When deployment fails after symlinking the new release
Given I store the symlink source of current
And I provoke an exception for testing purposes after symlinking the new release
And a remote file named "shared_path/config/maintenance.json" should not exist
Then I run `cap dev deploy`
And the output should contain "Failing this deployment on purpose!"
And the exit status should not be 0
And a remote file named "shared_path/config/maintenance.json" should not exist
And the symlink source of current should not have changed
Scenario: Deployment rollback to last stable version on failure when failing before symlinking
Given I successfully run `cap dev deploy`
And I successfully run `cap dev deploy`
And I successfully run `cap dev deploy`
And I store the symlink source of current
And I provoke an exception for testing purposes before symlinking the new release
Then I run `cap dev deploy`
And the output should contain "Failing this deployment on purpose!"
And the exit status should not be 0
And the symlink source of current should not have changed
Scenario: Deployment rollback to last stable version on failure when failing after symlinking
Given I successfully run `cap dev deploy`
And I successfully run `cap dev deploy`
And I successfully run `cap dev deploy`
And I store the symlink source of current
And I provoke an exception for testing purposes after symlinking the new release
Then I run `cap dev deploy`
And the output should contain "Failing this deployment on purpose!"
And the exit status should not be 0
And the symlink source of current should not have changed
Scenario: Deployment do not execute project task at rollback behaviour
Given I successfully run `cap dev deploy`
And I successfully run `cap dev deploy`
And I provoke an exception for testing purposes before symlinking the new release
And I extend the development capistrano configuration from the fixture file add_output_after_create_symlink.rb
Then I run `cap dev deploy`
And the output should not contain "Task 'deploy:symlink:release' executed"
And the exit status should not be 0
Scenario: Rollback execute all tasks
Given I successfully run "cap dev deploy"
And I provoke an exception for testing purposes after symlinking the new release
And I extend the development capistrano configuration from the fixture file second_server.rb
Then I run `cap dev deploy`
And the output should not contain "Skipping task"
And the exit status should not be 0