fujin (owner)

Revisions

gist: 209052 Download_button fork
public
Public Clone URL: git://gist.github.com/209052.git
Embed All Files: show embed
you-can-has-deploy.txt #
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
@provider @git @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 # features/provider/deploy/deploy.feature:8
    Given a validated node # features/steps/node_steps.rb:22
    And it includes the recipe 'deploy' # features/steps/node_steps.rb:30
    And I have a clone of typo in the data/tmp dir # features/steps/deploy_steps.rb:1
    When I run the chef-client # features/steps/run_client_steps.rb:22
    Then the run should exit '0' # features/steps/run_client_steps.rb:104
    And a file named 'deploy/shared' should exist # features/steps/file_steps.rb:39
    And a file named 'deploy/shared/cached-copy/.git' should exist # features/steps/file_steps.rb:39
    And a file named 'deploy/current/app' should exist # features/steps/file_steps.rb:39
    And a file named 'deploy/current/config/database.yml' should exist # features/steps/file_steps.rb:39
    And a file named 'deploy/current/db/production.sqlite3' should exist # features/steps/file_steps.rb:39
    And a file named 'deploy/current/tmp/restart.txt' should exist # features/steps/file_steps.rb:39
 
  Scenario: Deploy an app again # features/provider/deploy/deploy.feature:21
 ~ Loading role_test
    Given a validated node # features/steps/node_steps.rb:22
    And it includes the recipe 'deploy' # features/steps/node_steps.rb:30
    And I have a clone of typo in the data/tmp dir # features/steps/deploy_steps.rb:1
    When I run the chef-client # features/steps/run_client_steps.rb:22
    And I run the chef-client again # features/steps/run_client_steps.rb:34
    And there should be 'two' releases # features/steps/deploy_steps.rb:31
 
  Scenario: Deploy an app with custom layout attributes and callbacks # features/provider/deploy/deploy.feature:29
 ~ Loading role_test
    Given a validated node # features/steps/node_steps.rb:22
    And it includes the recipe 'deploy::callbacks' # features/steps/node_steps.rb:30
    And I have a clone of typo in the data/tmp dir # features/steps/deploy_steps.rb:1
    When I run the chef-client # features/steps/run_client_steps.rb:22
    Then the run should exit '0' # features/steps/run_client_steps.rb:104
    And a callback named <callback_file> should exist # features/steps/deploy_steps.rb:38
      | before_migrate.rb |
      | before_symlink.rb |
      | before_restart.rb |
      | after_restart.rb |
    And the callback named <callback> should have run # features/steps/deploy_steps.rb:45
      | before_restart.rb |
      | after_restart.rb |
 
  Scenario: Deploy an app with resources inside the callbacks (embedded recipes) # features/provider/deploy/deploy.feature:44
 ~ Loading role_test
    Given a validated node # features/steps/node_steps.rb:22
    And it includes the recipe 'deploy::embedded_recipe_callbacks' # features/steps/node_steps.rb:30
    And I have a clone of typo in the data/tmp dir # features/steps/deploy_steps.rb:1
    When I run the chef-client # features/steps/run_client_steps.rb:22
    Then the run should exit '0' # features/steps/run_client_steps.rb:104
    And a file named 'deploy/current/app/before_symlink_was_here.txt' should exist # features/steps/file_steps.rb:39
    And a file named 'deploy/current/tmp/restart.txt' should exist # features/steps/file_steps.rb:39
 
  Scenario: Rollback an app # features/provider/deploy/deploy.feature:55
 ~ Loading role_test
    Given a validated node # features/steps/node_steps.rb:22
    And it includes the recipe 'deploy::rollback' # features/steps/node_steps.rb:30
    When I run the chef-client # features/steps/run_client_steps.rb:22
    Then there should be 'one' release # features/steps/deploy_steps.rb:31
 
  Scenario: Deploy an app twice using the idempotent revision deploy strategy # features/provider/deploy/deploy.feature:62
 ~ Loading role_test
    Given a validated node # features/steps/node_steps.rb:22
    And it includes the recipe 'deploy::revision_deploy' # features/steps/node_steps.rb:30
    And I have a clone of typo in the data/tmp dir # features/steps/deploy_steps.rb:1
    When I run the chef-client # features/steps/run_client_steps.rb:22
    And I run the chef-client at log level 'info' # features/steps/run_client_steps.rb:58
    Then the run should exit '0' # features/steps/run_client_steps.rb:104
    And there should be 'one' release # features/steps/deploy_steps.rb:31
    And the second chef run should have skipped deployment # features/steps/deploy_steps.rb:55
 
@provider @git
Feature: Git
  In order to use files stored in git so I can deploy apps and use edge versions of software
  As a Developer
  I want to clone and update git repositories
 
  Scenario: Clone a git repo # features/provider/scm/git.feature:8
 ~ Loading role_test
    Given a validated node # features/steps/node_steps.rb:22
    And it includes the recipe 'scm::git' # features/steps/node_steps.rb:30
    When I run the chef-client # features/steps/run_client_steps.rb:22
    Then the run should exit '0' # features/steps/run_client_steps.rb:104
    And a file named 'gitchef/.git' should exist # features/steps/file_steps.rb:39
    And a file named 'gitchef/chef' should exist # features/steps/file_steps.rb:39
 
7 scenarios (7 passed)
49 steps (49 passed)
3m26.717s