berkshelf 3.0.0.beta2 → 3.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/CHANGELOG.md +8 -0
  4. data/Gemfile +0 -1
  5. data/Guardfile +0 -4
  6. data/README.md +1 -1
  7. data/Thorfile +2 -11
  8. data/berkshelf.gemspec +2 -5
  9. data/features/berksfile.feature +2 -10
  10. data/features/commands/apply.feature +31 -0
  11. data/features/{configure_command.feature → commands/configure.feature} +9 -11
  12. data/features/{contingent_command.feature → commands/contingent.feature} +10 -20
  13. data/features/{cookbook_command.feature → commands/cookbook.feature} +4 -11
  14. data/features/{init_command.feature → commands/init.feature} +10 -19
  15. data/features/{install_command.feature → commands/install.feature} +161 -82
  16. data/features/{list_command.feature → commands/list.feature} +4 -14
  17. data/features/{outdated_command.feature → commands/outdated.feature} +21 -63
  18. data/features/{package_command.feature → commands/package.feature} +11 -22
  19. data/features/{shelf → commands/shelf}/list.feature +3 -8
  20. data/features/{shelf → commands/shelf}/show.feature +5 -9
  21. data/features/{shelf → commands/shelf}/uninstall.feature +6 -10
  22. data/features/{show_command.feature → commands/show.feature} +13 -38
  23. data/features/commands/update.feature +48 -0
  24. data/features/commands/upload.feature +197 -0
  25. data/features/commands/vendor.feature +53 -0
  26. data/features/community_site.feature +39 -0
  27. data/features/config.feature +79 -9
  28. data/features/help.feature +10 -19
  29. data/features/json_formatter.feature +19 -44
  30. data/features/licenses.feature +27 -61
  31. data/features/lockfile.feature +120 -354
  32. data/features/resolver.feature +28 -0
  33. data/features/step_definitions/berksfile_steps.rb +39 -0
  34. data/features/step_definitions/chef/config_steps.rb +1 -1
  35. data/features/step_definitions/chef_server_steps.rb +27 -27
  36. data/features/step_definitions/config_steps.rb +3 -0
  37. data/features/step_definitions/filesystem_steps.rb +10 -0
  38. data/features/step_definitions/json_steps.rb +0 -7
  39. data/features/step_definitions/lockfile_steps.rb +53 -0
  40. data/features/step_definitions/utility_steps.rb +4 -4
  41. data/features/support/env.rb +1 -0
  42. data/generator_files/Berksfile.erb +1 -1
  43. data/generator_files/README.md.erb +62 -6
  44. data/generator_files/Vagrantfile.erb +15 -4
  45. data/lib/berkshelf.rb +2 -4
  46. data/lib/berkshelf/api_client.rb +5 -7
  47. data/lib/berkshelf/berksfile.rb +24 -20
  48. data/lib/berkshelf/cached_cookbook.rb +8 -1
  49. data/lib/berkshelf/cli.rb +5 -10
  50. data/lib/berkshelf/community_rest.rb +4 -5
  51. data/lib/berkshelf/config.rb +8 -2
  52. data/lib/berkshelf/cookbook_store.rb +9 -14
  53. data/lib/berkshelf/dependency.rb +16 -13
  54. data/lib/berkshelf/errors.rb +15 -1
  55. data/lib/berkshelf/formatters/json.rb +1 -1
  56. data/lib/berkshelf/init_generator.rb +17 -3
  57. data/lib/berkshelf/installer.rb +12 -1
  58. data/lib/berkshelf/logger.rb +7 -4
  59. data/lib/berkshelf/resolver.rb +1 -1
  60. data/lib/berkshelf/version.rb +1 -1
  61. data/spec/spec_helper.rb +0 -9
  62. data/spec/support/chef_server.rb +24 -7
  63. data/spec/unit/berkshelf/api_client/remote_cookbook_spec.rb +3 -3
  64. data/spec/unit/berkshelf/berksfile_spec.rb +35 -1
  65. data/spec/unit/berkshelf/cached_cookbook_spec.rb +8 -0
  66. data/spec/unit/berkshelf/community_rest_spec.rb +76 -25
  67. data/spec/unit/berkshelf/cookbook_generator_spec.rb +9 -3
  68. data/spec/unit/berkshelf/dependency_spec.rb +16 -1
  69. data/spec/unit/berkshelf/init_generator_spec.rb +71 -7
  70. metadata +44 -116
  71. data/.cane +0 -4
  72. data/features/apply_command.feature +0 -40
  73. data/features/groups_install.feature +0 -113
  74. data/features/update_command.feature +0 -136
  75. data/features/upload_command.feature +0 -327
  76. data/features/vendor_command.feature +0 -83
  77. data/lib/berkshelf/chef.rb +0 -7
  78. data/lib/berkshelf/chef/cookbook.rb +0 -5
  79. data/lib/berkshelf/chef/cookbook/chefignore.rb +0 -75
  80. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_download/unpacks_the_archive.json +0 -1
  81. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json +0 -1
  82. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CookbookNotFound_error_on_a_404_response_for_a_non-existent_cookbook.json +0 -1
  83. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/raises_a_CookbookNotFound_error_on_a_404_response_for_a_non-existent_version.json +0 -1
  84. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_find/returns_the_cookbook_and_version_information.json +0 -1
  85. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json +0 -1
  86. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/raises_a_CookbookNotFound_error_on_a_404_response.json +0 -1
  87. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_latest_version/returns_the_version_number_of_the_latest_version_of_the_cookbook.json +0 -1
  88. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_satisfy/returns_the_version_number_of_the_best_solution.json +0 -1
  89. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/raises_a_CommunitySiteError_error_on_any_non_200_or_404_response.json +0 -1
  90. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/raises_a_CookbookNotFound_error_on_a_404_response.json +0 -1
  91. data/spec/fixtures/cassettes/Berkshelf_CommunityREST/_versions/returns_an_array_containing_an_item_for_each_version.json +0 -1
  92. data/spec/fixtures/cassettes/Berkshelf_Resolver/_initialize/adds_the_dependencies_of_the_dependency_as_dependencies.yml +0 -3694
  93. data/spec/fixtures/cassettes/Berkshelf_Resolver/_initialize/adds_the_dependencies_of_the_source_as_sources.yml +0 -3829
  94. data/spec/unit/berkshelf/chef/cookbook/chefignore_spec.rb +0 -19
@@ -0,0 +1,48 @@
1
+ Feature: berks update
2
+ Background:
3
+ * the cookbook store has the cookbooks:
4
+ | fake | 0.1.0 |
5
+ | fake | 0.2.0 |
6
+ | fake | 1.0.0 |
7
+ | ekaf | 1.0.0 |
8
+ | ekaf | 1.0.1 |
9
+
10
+
11
+ Scenario: Without a cookbook specified
12
+ And I have a Berksfile pointing at the local Berkshelf API with:
13
+ """
14
+ cookbook 'fake', '~> 0.1'
15
+ cookbook 'ekaf', '~> 1.0.0'
16
+ """
17
+ And the Lockfile has:
18
+ | fake | 0.1.0 |
19
+ | ekaf | 1.0.0 |
20
+ When I successfully run `berks update`
21
+ Then the Lockfile should have:
22
+ | fake | 0.2.0 |
23
+ | ekaf | 1.0.1 |
24
+
25
+
26
+ Scenario: With a single cookbook specified
27
+ And I have a Berksfile pointing at the local Berkshelf API with:
28
+ """
29
+ cookbook 'fake', '~> 0.1'
30
+ cookbook 'ekaf', '~> 1.0.0'
31
+ """
32
+ And the Lockfile has:
33
+ | fake | 0.1.0 |
34
+ | ekaf | 1.0.0 |
35
+ When I successfully run `berks update fake`
36
+ Then the Lockfile should have:
37
+ | fake | 0.2.0 |
38
+ | ekaf | 1.0.0 |
39
+
40
+
41
+ Scenario: With a cookbook that does not exist
42
+ Given I have a Berksfile pointing at the local Berkshelf API
43
+ When I run `berks update not_real`
44
+ Then the output should contain:
45
+ """
46
+ Could not find cookbook(s) 'not_real' in any of the configured dependencies. Is it in your Berksfile?
47
+ """
48
+ And the exit status should be "DependencyNotFound"
@@ -0,0 +1,197 @@
1
+ Feature: berks upload
2
+ Background:
3
+ * the Berkshelf API server's cache is empty
4
+ * the Chef Server is empty
5
+ * the cookbook store has the cookbooks:
6
+ | fake | 1.0.0 |
7
+ | ekaf | 2.0.0 |
8
+ | oops | 3.0.0 |
9
+
10
+
11
+ Scenario: multiple cookbooks with no arguments
12
+ And I have a Berksfile pointing at the local Berkshelf API with:
13
+ """
14
+ cookbook 'fake', '1.0.0'
15
+ cookbook 'ekaf', '2.0.0'
16
+ """
17
+ When I successfully run `berks upload`
18
+ Then the Chef Server should have the cookbooks:
19
+ | fake | 1.0.0 |
20
+ | ekaf | 2.0.0 |
21
+
22
+
23
+ Scenario: a cookbook with a path location
24
+ Given a cookbook named "fake"
25
+ And I have a Berksfile pointing at the local Berkshelf API with:
26
+ """
27
+ cookbook 'fake', path: './fake'
28
+ """
29
+ When I successfully run `berks upload`
30
+ Then the Chef Server should have the cookbooks:
31
+ | fake | 0.0.0 |
32
+
33
+
34
+ Scenario: specifying a single cookbook with dependencies
35
+ Given the cookbook store contains a cookbook "reset" "3.4.5" with dependencies:
36
+ | fake | = 1.0.0 |
37
+ And I have a Berksfile pointing at the local Berkshelf API with:
38
+ """
39
+ cookbook 'fake', '1.0.0'
40
+ cookbook 'ekaf', '2.0.0'
41
+ cookbook 'reset', '3.4.5'
42
+ """
43
+ When I successfully run `berks upload reset`
44
+ Then the Chef Server should have the cookbooks:
45
+ | reset | 3.4.5 |
46
+ | fake | 1.0.0 |
47
+ And the Chef Server should not have the cookbooks:
48
+ | ekaf | 2.0.0 |
49
+
50
+
51
+ Scenario: specifying a dependency not defined in the Berksfile
52
+ Given I have a Berksfile pointing at the local Berkshelf API
53
+ When I run `berks upload reset`
54
+ Then the output should contain:
55
+ """
56
+ Could not find cookbook(s) 'reset' in any of the configured dependencies. Is it in your Berksfile?
57
+ """
58
+ And the exit status should be "DependencyNotFound"
59
+
60
+
61
+ Scenario: specifying multiple cookbooks to upload
62
+ Given I have a Berksfile pointing at the local Berkshelf API with:
63
+ """
64
+ cookbook 'fake', '1.0.0'
65
+ cookbook 'ekaf', '2.0.0'
66
+ cookbook 'oops', '3.0.0'
67
+ """
68
+ When I successfully run `berks upload fake ekaf`
69
+ Then the Chef Server should have the cookbooks:
70
+ | fake |
71
+ | ekaf |
72
+ And the Chef Server should not have the cookbooks:
73
+ | oops |
74
+
75
+
76
+ Scenario: uploading a single groups of demands with the --only flag
77
+ Given I have a Berksfile pointing at the local Berkshelf API with:
78
+ """
79
+ cookbook 'fake', group: :take_me
80
+ cookbook 'ekaf', group: :not_me
81
+ """
82
+ When I successfully run `berks upload --only take_me`
83
+ Then the Chef Server should have the cookbooks:
84
+ | fake | 1.0.0 |
85
+ And the Chef Server should not have the cookbooks:
86
+ | ekaf | 2.0.0 |
87
+
88
+
89
+ Scenario: uploading multiple groups of demands with the --only flag
90
+ Given I have a Berksfile pointing at the local Berkshelf API with:
91
+ """
92
+ cookbook 'fake', group: :take_me
93
+ cookbook 'ekaf', group: :not_me
94
+ """
95
+ When I successfully run `berks upload --only take_me not_me`
96
+ And the Chef Server should have the cookbooks:
97
+ | fake | 1.0.0 |
98
+ | ekaf | 2.0.0 |
99
+
100
+
101
+ Scenario: skipping a single group to upload with the --except flag
102
+ Given I have a Berksfile pointing at the local Berkshelf API with:
103
+ """
104
+ cookbook 'fake', group: :take_me
105
+ cookbook 'ekaf', group: :not_me
106
+ """
107
+ When I successfully run `berks upload --except not_me`
108
+ And the Chef Server should have the cookbooks:
109
+ | fake | 1.0.0 |
110
+ And the Chef Server should not have the cookbooks:
111
+ | ekaf | 2.0.0 |
112
+
113
+
114
+ Scenario: skipping multiple groups with the --except flag
115
+ Given I have a Berksfile pointing at the local Berkshelf API with:
116
+ """
117
+ cookbook 'fake', group: :take_me
118
+ cookbook 'ekaf', group: :not_me
119
+ """
120
+ When I successfully run `berks upload --except take_me not_me`
121
+ And the Chef Server should not have the cookbooks:
122
+ | fake | 1.0.0 |
123
+ | ekaf | 2.0.0 |
124
+
125
+
126
+ Scenario: attempting to upload an invalid cookbook
127
+ Given a cookbook named "cookbook with spaces"
128
+ And I have a Berksfile pointing at the local Berkshelf API with:
129
+ """
130
+ cookbook 'cookbook with spaces', path: './cookbook with spaces'
131
+ """
132
+ When I run `berks upload`
133
+ Then the output should contain:
134
+ """
135
+ The cookbook 'cookbook with spaces' has invalid filenames:
136
+ """
137
+ And the exit status should be "InvalidCookbookFiles"
138
+
139
+
140
+ Scenario: With unicode characters
141
+ Given a cookbook named "fake"
142
+ And I cd to "fake"
143
+ And I write to "README.md" with:
144
+ """
145
+ Jamié Wiñsor
146
+ 赛斯瓦戈
147
+ Μιψηαελ Ιωευ
148
+ جوستين كامبل
149
+ """
150
+ And I have a Berksfile pointing at the local Berkshelf API with:
151
+ """
152
+ metadata
153
+ """
154
+ When I successfully run `berks upload fake`
155
+ Then the output should contain:
156
+ """
157
+ Uploading fake (0.0.0)
158
+ """
159
+
160
+
161
+ Scenario: When the cookbook already exist
162
+ And the Chef Server has frozen cookbooks:
163
+ | fake | 1.0.0 |
164
+ Given I have a Berksfile pointing at the local Berkshelf API with:
165
+ """
166
+ cookbook 'fake', '1.0.0'
167
+ """
168
+ When I successfully run `berks upload`
169
+ Then the output should contain:
170
+ """
171
+ Skipping fake (1.0.0) (already uploaded)
172
+ """
173
+ And the output should contain:
174
+ """
175
+ Skipped uploading some cookbooks because they already existed on the remote server. Re-run with the `--force` flag to force overwrite these cookbooks:
176
+
177
+ * fake (1.0.0)
178
+ """
179
+
180
+
181
+ Scenario: When the cookbook already exist and is a metadata location
182
+ Given a cookbook named "fake"
183
+ And the cookbook "fake" has the file "Berksfile" with:
184
+ """
185
+ metadata
186
+ """
187
+ And the Chef Server has frozen cookbooks:
188
+ | fake | 0.0.0 |
189
+ And I cd to "fake"
190
+ When I successfully run `berks upload`
191
+ Then the output should contain:
192
+ """
193
+ Skipping fake (0.0.0) (already uploaded)
194
+ Skipped uploading some cookbooks because they already existed on the remote server. Re-run with the `--force` flag to force overwrite these cookbooks:
195
+
196
+ * fake (0.0.0)
197
+ """
@@ -0,0 +1,53 @@
1
+ Feature: Vendoring cookbooks to a directory
2
+ Background:
3
+ * the Berkshelf API server's cache is empty
4
+ * the Chef Server has cookbooks:
5
+ | fake | 1.0.0 |
6
+ | ekaf | 2.0.0 |
7
+ * the Berkshelf API server's cache is up to date
8
+
9
+
10
+ Scenario: successfully vendoring a Berksfile with multiple cookbook demands
11
+ Given I have a Berksfile pointing at the local Berkshelf API with:
12
+ """
13
+ cookbook 'fake'
14
+ cookbook 'ekaf'
15
+ """
16
+ When I successfully run `berks vendor cukebooks`
17
+ Then the directory "cukebooks/fake" should contain version "1.0.0" of the "fake" cookbook
18
+ And the directory "cukebooks/ekaf" should contain version "2.0.0" of the "ekaf" cookbook
19
+
20
+
21
+ Scenario: attempting to vendor when no Berksfile is present
22
+ When I run `berks vendor cukebooks`
23
+ Then the exit status should be "BerksfileNotFound"
24
+
25
+
26
+ Scenario: vendoring a Berksfile with a metadata demand
27
+ Given a cookbook named "fake"
28
+ And I cd to "fake"
29
+ And I have a Berksfile pointing at the local Berkshelf API with:
30
+ """
31
+ metadata
32
+ """
33
+ When I successfully run `berks vendor cukebooks`
34
+ And the directory "cukebooks/fake" should contain version "0.0.0" of the "fake" cookbook
35
+
36
+
37
+ Scenario: vendoring without an explicit path to vendor into
38
+ Given I have a Berksfile pointing at the local Berkshelf API with:
39
+ """
40
+ cookbook 'fake'
41
+ """
42
+ When I successfully run `berks vendor`
43
+ And the directory "berks-cookbooks/fake" should contain version "1.0.0" of the "fake" cookbook
44
+
45
+
46
+ Scenario: vendoring to a directory that already exists
47
+ Given I have a Berksfile pointing at the local Berkshelf API with:
48
+ """
49
+ cookbook 'fake'
50
+ """
51
+ And a directory named "cukebooks"
52
+ When I run `berks vendor cukebooks`
53
+ And the exit status should be "VendorError"
@@ -0,0 +1,39 @@
1
+ Feature: Installing cookbooks from the community site
2
+ Scenario: when the cookbook exists
3
+ Given I have a Berksfile pointing at the community API endpoint with:
4
+ """
5
+ cookbook 'apache2', '1.6.6'
6
+ """
7
+ When I successfully run `berks install`
8
+ Then the output should contain:
9
+ """
10
+ Installing apache2 (1.6.6)
11
+ """
12
+ And the cookbook store should have the cookbooks:
13
+ | apache2 | 1.6.6 |
14
+
15
+
16
+ Scenario: when the cookbook does not exist
17
+ Given I have a Berksfile pointing at the community API endpoint with:
18
+ """
19
+ cookbook '1234567890'
20
+ """
21
+ When I run `berks install`
22
+ Then the output should contain:
23
+ """
24
+ Unable to find a solution for demands: 1234567890 (>= 0.0.0)
25
+ """
26
+ And the exit status should be "NoSolutionError"
27
+
28
+
29
+ Scenario: when the cookbook exists, but the version does not
30
+ Given I have a Berksfile pointing at the community API endpoint with:
31
+ """
32
+ cookbook 'apache2', '0.0.0'
33
+ """
34
+ When I run `berks install`
35
+ Then the output should contain:
36
+ """
37
+ Unable to find a solution for demands: apache2 (= 0.0.0)
38
+ """
39
+ And the exit status should be "NoSolutionError"
@@ -1,20 +1,55 @@
1
1
  Feature: Reading a Berkshelf configuration file
2
- As a Cookbook author
3
- I want to quickly generate a cookbook with my own customizations
4
- So that I don't have to spend time modifying the default generated output each time
5
-
6
2
  Scenario: Missing a Berkshelf configuration file
7
3
  When I successfully run `berks cookbook sparkle_motion`
8
4
  Then the resulting "sparkle_motion" Vagrantfile should contain:
9
- | config.vm.box = "Berkshelf-CentOS-6.3-x86_64-minimal" |
10
- | config.vm.box_url = "https://dl.dropbox.com/u/31081437/Berkshelf-CentOS-6.3-x86_64-minimal.box" |
5
+ | config.omnibus.chef_version = :latest |
6
+ | config.vm.box = "opscode_ubuntu-12.04_provisionerless" |
7
+ | config.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box" |
8
+
9
+
10
+ Scenario: Using a Berkshelf configuration file that disables the vagrant-omnibus plugin
11
+ Given I have a Berkshelf config file containing:
12
+ """
13
+ {
14
+ "vagrant": {
15
+ "omnibus": {
16
+ "enabled": false,
17
+ "version": "11.4.4"
18
+ },
19
+ "vm": {
20
+ "box": "my_box",
21
+ "box_url": "http://files.vagrantup.com/lucid64.box",
22
+ "forward_port": {
23
+ "12345": "54321"
24
+ },
25
+ "network": {
26
+ "bridged": true,
27
+ "hostonly": "12.34.56.78"
28
+ }
29
+ }
30
+ }
31
+ }
32
+ """
33
+ When I successfully run `berks cookbook sparkle_motion`
34
+ Then the resulting "sparkle_motion" Vagrantfile should contain:
35
+ | #config.omnibus.chef_version = :latest |
36
+ | config.vm.box = "my_box" |
37
+ | config.vm.box_url = "http://files.vagrantup.com/lucid64.box" |
38
+ | config.vm.network :forwarded_port, guest: 12345, host: 54321 |
39
+ | config.vm.network :private_network, ip: "12.34.56.78" |
40
+ | config.vm.network :public_network |
11
41
  And the exit status should be 0
12
42
 
13
- Scenario: Using a Berkshelf configuration file
43
+
44
+ Scenario: Using a Berkshelf configuration file that sets the vagrant-omnibus plugin chef version
14
45
  Given I have a Berkshelf config file containing:
15
46
  """
16
47
  {
17
48
  "vagrant": {
49
+ "omnibus": {
50
+ "enabled": true,
51
+ "version": "11.4.4"
52
+ },
18
53
  "vm": {
19
54
  "box": "my_box",
20
55
  "box_url": "http://files.vagrantup.com/lucid64.box",
@@ -31,6 +66,7 @@ Feature: Reading a Berkshelf configuration file
31
66
  """
32
67
  When I successfully run `berks cookbook sparkle_motion`
33
68
  Then the resulting "sparkle_motion" Vagrantfile should contain:
69
+ | config.omnibus.chef_version = "11.4.4" |
34
70
  | config.vm.box = "my_box" |
35
71
  | config.vm.box_url = "http://files.vagrantup.com/lucid64.box" |
36
72
  | config.vm.network :forwarded_port, guest: 12345, host: 54321 |
@@ -38,6 +74,40 @@ Feature: Reading a Berkshelf configuration file
38
74
  | config.vm.network :public_network |
39
75
  And the exit status should be 0
40
76
 
77
+
78
+ Scenario: Using a Berkshelf configuration file that sets the vagrant-omnibus plugin chef version to latest
79
+ Given I have a Berkshelf config file containing:
80
+ """
81
+ {
82
+ "vagrant": {
83
+ "omnibus": {
84
+ "enabled": true,
85
+ "version": "latest"
86
+ },
87
+ "vm": {
88
+ "box": "my_box",
89
+ "box_url": "http://files.vagrantup.com/lucid64.box",
90
+ "forward_port": {
91
+ "12345": "54321"
92
+ },
93
+ "network": {
94
+ "bridged": true,
95
+ "hostonly": "12.34.56.78"
96
+ }
97
+ }
98
+ }
99
+ }
100
+ """
101
+ When I successfully run `berks cookbook sparkle_motion`
102
+ Then the resulting "sparkle_motion" Vagrantfile should contain:
103
+ | config.omnibus.chef_version = :latest |
104
+ | config.vm.box = "my_box" |
105
+ | config.vm.box_url = "http://files.vagrantup.com/lucid64.box" |
106
+ | config.vm.network :forwarded_port, guest: 12345, host: 54321 |
107
+ | config.vm.network :private_network, ip: "12.34.56.78" |
108
+ | config.vm.network :public_network |
109
+
110
+
41
111
  Scenario: Using a partial Berkshelf configuration file
42
112
  Given I have a Berkshelf config file containing:
43
113
  """
@@ -54,7 +124,7 @@ Feature: Reading a Berkshelf configuration file
54
124
  When I successfully run `berks cookbook sparkle_motion`
55
125
  Then the resulting "sparkle_motion" Vagrantfile should contain:
56
126
  | config.vm.network :forwarded_port, guest: 12345, host: 54321 |
57
- And the exit status should be 0
127
+
58
128
 
59
129
  Scenario: Using an invalid Berkshelf configuration file
60
130
  Given I have a Berkshelf config file containing:
@@ -72,6 +142,7 @@ Feature: Reading a Berkshelf configuration file
72
142
  And the output should contain "vagrant.vm.box Expected attribute: 'vagrant.vm.box' to be a type of: 'String'"
73
143
  And the exit status should be "InvalidConfiguration"
74
144
 
145
+
75
146
  Scenario: Using a Berkshelf configuration file with Chef configuration information
76
147
  Given I have a Berkshelf config file containing:
77
148
  """
@@ -94,4 +165,3 @@ Feature: Reading a Berkshelf configuration file
94
165
  | chef.chef_server_url = "localhost:4000" |
95
166
  | chef.validation_client_name = "my_client-validator" |
96
167
  | chef.validation_key_path = "/a/b/c/my_client-validator.pem" |
97
- Then the exit status should be 0