-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.feature
More file actions
71 lines (60 loc) · 2.5 KB
/
Copy pathdeploy.feature
File metadata and controls
71 lines (60 loc) · 2.5 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
68
69
70
@provider @git @deploy @provider_deploy
Feature: Deploy
In order to repeatably and reliably deploy web apps from a source repository from the comfort of chef
As an OpsDev
I want to have automated deployments
Scenario: Deploy an app for the first time
Given a validated node
And it includes the recipe 'deploy'
And I have a clone of typo in the data/tmp dir
When I run the chef-client
Then the run should exit '0'
And a file named 'deploy/shared' should exist
And a file named 'deploy/shared/cached-copy/.git' should exist
And a file named 'deploy/current/app' should exist
And a file named 'deploy/current/config/database.yml' should exist
And a file named 'deploy/current/db/production.sqlite3' should exist
And a file named 'deploy/current/tmp/restart.txt' should exist
Scenario: Deploy an app again
Given a validated node
And it includes the recipe 'deploy'
And I have a clone of typo in the data/tmp dir
When I run the chef-client
And I run the chef-client again
And there should be 'two' releases
Scenario: Deploy an app with custom layout attributes and callbacks
Given a validated node
And it includes the recipe 'deploy::callbacks'
And I have a clone of typo in the data/tmp dir
When I run the chef-client
Then the run should exit '0'
And a callback named <callback_file> should exist
| before_migrate.rb |
| before_symlink.rb |
| before_restart.rb |
| after_restart.rb |
And the callback named <callback> should have run
| before_restart.rb |
| after_restart.rb |
Scenario: Deploy an app with resources inside the callbacks (embedded recipes)
Given a validated node
And it includes the recipe 'deploy::embedded_recipe_callbacks'
And I have a clone of typo in the data/tmp dir
When I run the chef-client
Then the run should exit '0'
And a file named 'deploy/current/app/before_symlink_was_here.txt' should exist
And a file named 'deploy/current/tmp/restart.txt' should exist
Scenario: Rollback an app
Given a validated node
And it includes the recipe 'deploy::rollback'
When I run the chef-client
Then there should be 'one' release
Scenario: Deploy an app twice using the idempotent revision deploy strategy
Given a validated node
And it includes the recipe 'deploy::revision_deploy'
And I have a clone of typo in the data/tmp dir
When I run the chef-client
And I run the chef-client at log level 'info'
Then the run should exit '0'
And there should be 'one' release
And the second chef run should have skipped deployment