berkshelf 7.0.7 → 7.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/Rakefile +4 -4
- data/berkshelf.gemspec +10 -12
- data/bin/berks +5 -0
- data/lib/berkshelf.rb +8 -9
- data/lib/berkshelf/api_client/chef_server_connection.rb +3 -2
- data/lib/berkshelf/api_client/connection.rb +1 -1
- data/lib/berkshelf/api_client/remote_cookbook.rb +1 -1
- data/lib/berkshelf/berksfile.rb +41 -39
- data/lib/berkshelf/cached_cookbook.rb +6 -4
- data/lib/berkshelf/chef_config_compat.rb +2 -1
- data/lib/berkshelf/chef_repo_universe.rb +6 -4
- data/lib/berkshelf/cli.rb +6 -6
- data/lib/berkshelf/commands/shelf.rb +1 -1
- data/lib/berkshelf/community_rest.rb +6 -6
- data/lib/berkshelf/config.rb +3 -3
- data/lib/berkshelf/cookbook_store.rb +2 -4
- data/lib/berkshelf/core_ext.rb +1 -1
- data/lib/berkshelf/core_ext/file_utils.rb +3 -3
- data/lib/berkshelf/dependency.rb +1 -1
- data/lib/berkshelf/downloader.rb +9 -6
- data/lib/berkshelf/errors.rb +5 -2
- data/lib/berkshelf/file_syncer.rb +7 -12
- data/lib/berkshelf/formatters/human.rb +1 -1
- data/lib/berkshelf/formatters/json.rb +4 -4
- data/lib/berkshelf/installer.rb +1 -1
- data/lib/berkshelf/location.rb +3 -3
- data/lib/berkshelf/locations/git.rb +6 -12
- data/lib/berkshelf/lockfile.rb +14 -14
- data/lib/berkshelf/logger.rb +4 -2
- data/lib/berkshelf/mixin/git.rb +3 -3
- data/lib/berkshelf/packager.rb +5 -7
- data/lib/berkshelf/resolver.rb +1 -1
- data/lib/berkshelf/ridley_compat.rb +1 -1
- data/lib/berkshelf/shell.rb +2 -1
- data/lib/berkshelf/shell_out.rb +4 -3
- data/lib/berkshelf/source.rb +8 -7
- data/lib/berkshelf/source_uri.rb +1 -1
- data/lib/berkshelf/ssl_policies.rb +5 -9
- data/lib/berkshelf/thor.rb +1 -1
- data/lib/berkshelf/thor_ext.rb +1 -1
- data/lib/berkshelf/uploader.rb +11 -9
- data/lib/berkshelf/validator.rb +2 -8
- data/lib/berkshelf/version.rb +1 -1
- data/lib/berkshelf/visualizer.rb +3 -3
- data/spec/config/knife.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/support/chef_server.rb +2 -2
- data/spec/support/git.rb +18 -18
- data/spec/support/path_helpers.rb +4 -4
- data/spec/unit/berkshelf/berksfile_spec.rb +7 -7
- data/spec/unit/berkshelf/cli_spec.rb +1 -2
- data/spec/unit/berkshelf/community_rest_spec.rb +1 -1
- data/spec/unit/berkshelf/core_ext/file_utils_spec.rb +2 -2
- data/spec/unit/berkshelf/dependency_spec.rb +5 -5
- data/spec/unit/berkshelf/downloader_spec.rb +4 -8
- data/spec/unit/berkshelf/locations/base_spec.rb +1 -2
- data/spec/unit/berkshelf/locations/git_spec.rb +2 -5
- data/spec/unit/berkshelf/locations/path_spec.rb +1 -2
- data/spec/unit/berkshelf/lockfile_spec.rb +9 -18
- data/spec/unit/berkshelf/ridley_compat_spec.rb +2 -2
- data/spec/unit/berkshelf/source_spec.rb +30 -19
- data/spec/unit/berkshelf/ssl_policies_spec.rb +3 -6
- data/spec/unit/berkshelf/uploader_spec.rb +6 -10
- data/spec/unit/berkshelf/validator_spec.rb +0 -13
- metadata +39 -193
- data/.github/lock.yml +0 -1
- data/.gitignore +0 -30
- data/.rubocop.yml +0 -12
- data/.travis.yml +0 -73
- data/CHANGELOG.legacy.md +0 -307
- data/CHANGELOG.md +0 -1589
- data/CONTRIBUTING.md +0 -68
- data/Gemfile.lock +0 -292
- data/PLUGINS.md +0 -25
- data/README.md +0 -72
- data/Thorfile +0 -61
- data/appveyor.yml +0 -31
- data/docs/berkshelf_for_newcomers.md +0 -64
- data/features/artifactory.feature +0 -70
- data/features/berksfile.feature +0 -46
- data/features/commands/apply.feature +0 -41
- data/features/commands/contingent.feature +0 -47
- data/features/commands/info.feature +0 -141
- data/features/commands/install.feature +0 -646
- data/features/commands/list.feature +0 -78
- data/features/commands/outdated.feature +0 -176
- data/features/commands/package.feature +0 -17
- data/features/commands/search.feature +0 -17
- data/features/commands/shelf/list.feature +0 -32
- data/features/commands/shelf/show.feature +0 -113
- data/features/commands/shelf/uninstall.feature +0 -96
- data/features/commands/show.feature +0 -83
- data/features/commands/update.feature +0 -142
- data/features/commands/upload.feature +0 -499
- data/features/commands/vendor.feature +0 -154
- data/features/commands/verify.feature +0 -29
- data/features/commands/viz.feature +0 -66
- data/features/community_site.feature +0 -37
- data/features/help.feature +0 -11
- data/features/json_formatter.feature +0 -158
- data/features/lifecycle.feature +0 -378
- data/features/lockfile.feature +0 -378
- data/features/step_definitions/berksfile_steps.rb +0 -54
- data/features/step_definitions/chef/config_steps.rb +0 -12
- data/features/step_definitions/chef_server_steps.rb +0 -60
- data/features/step_definitions/cli_steps.rb +0 -18
- data/features/step_definitions/config_steps.rb +0 -46
- data/features/step_definitions/environment_steps.rb +0 -11
- data/features/step_definitions/filesystem_steps.rb +0 -286
- data/features/step_definitions/gem_steps.rb +0 -13
- data/features/step_definitions/json_steps.rb +0 -29
- data/features/step_definitions/utility_steps.rb +0 -11
- data/features/support/aruba.rb +0 -12
- data/features/support/env.rb +0 -77
- data/spec/fixtures/cookbooks/example_cookbook/.gitignore +0 -2
- data/spec/fixtures/cookbooks/example_cookbook/.kitchen.yml +0 -26
@@ -1,646 +0,0 @@
|
|
1
|
-
Feature: berks install
|
2
|
-
Background:
|
3
|
-
* the Chef Server is empty
|
4
|
-
* the cookbook store is empty
|
5
|
-
|
6
|
-
Scenario: installing the version that best satisfies our demand
|
7
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
8
|
-
"""
|
9
|
-
cookbook 'berkshelf'
|
10
|
-
"""
|
11
|
-
And the Chef Server has cookbooks:
|
12
|
-
| berkshelf | 1.0.0 |
|
13
|
-
| berkshelf | 2.0.0 |
|
14
|
-
When I successfully run `berks install`
|
15
|
-
Then the output should contain:
|
16
|
-
"""
|
17
|
-
Installing berkshelf (2.0.0)
|
18
|
-
"""
|
19
|
-
And the cookbook store should have the cookbooks:
|
20
|
-
| berkshelf | 2.0.0 |
|
21
|
-
|
22
|
-
Scenario: installing an explicit version demand
|
23
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
24
|
-
"""
|
25
|
-
cookbook 'berkshelf', '1.0.0'
|
26
|
-
"""
|
27
|
-
And the Chef Server has cookbooks:
|
28
|
-
| berkshelf | 1.0.0 |
|
29
|
-
| berkshelf | 2.0.0 |
|
30
|
-
When I successfully run `berks install`
|
31
|
-
Then the output should contain:
|
32
|
-
"""
|
33
|
-
Installing berkshelf (1.0.0)
|
34
|
-
"""
|
35
|
-
And the cookbook store should have the cookbooks:
|
36
|
-
| berkshelf | 1.0.0 |
|
37
|
-
|
38
|
-
Scenario: installing demands from all groups
|
39
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
40
|
-
"""
|
41
|
-
group :one do
|
42
|
-
cookbook 'ruby'
|
43
|
-
end
|
44
|
-
|
45
|
-
group :two do
|
46
|
-
cookbook 'elixir'
|
47
|
-
end
|
48
|
-
"""
|
49
|
-
And the Chef Server has cookbooks:
|
50
|
-
| ruby | 1.0.0 |
|
51
|
-
| elixir | 1.0.0 |
|
52
|
-
When I successfully run `berks install`
|
53
|
-
Then the output should contain "Installing elixir (1.0.0)"
|
54
|
-
And the output should contain "Installing ruby (1.0.0)"
|
55
|
-
And the cookbook store should have the cookbooks:
|
56
|
-
| ruby | 1.0.0 |
|
57
|
-
| elixir | 1.0.0 |
|
58
|
-
|
59
|
-
Scenario: installing a demand that has already been installed
|
60
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
61
|
-
"""
|
62
|
-
cookbook 'berkshelf-cookbook-fixture',
|
63
|
-
github: 'RiotGames/berkshelf-cookbook-fixture',
|
64
|
-
branch: 'deps'
|
65
|
-
"""
|
66
|
-
And the cookbook store contains a cookbook "berkshelf" "1.0.0" with dependencies:
|
67
|
-
| hostsfile | = 1.0.1 |
|
68
|
-
And the cookbook store has the cookbooks:
|
69
|
-
| hostsfile | 1.0.1 |
|
70
|
-
When I successfully run `berks install`
|
71
|
-
Then the output should contain:
|
72
|
-
"""
|
73
|
-
Using hostsfile (1.0.1)
|
74
|
-
"""
|
75
|
-
|
76
|
-
Scenario: installing a single groups of demands with the --only flag
|
77
|
-
Given the cookbook store has the cookbooks:
|
78
|
-
| takeme | 1.0.0 |
|
79
|
-
| notme | 1.0.0 |
|
80
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
81
|
-
"""
|
82
|
-
cookbook 'takeme', group: :take_me
|
83
|
-
cookbook 'notme', group: :not_me
|
84
|
-
"""
|
85
|
-
When I successfully run `berks install --only take_me`
|
86
|
-
Then the output should contain "Using takeme (1.0.0)"
|
87
|
-
Then the output should not contain "Using notme (1.0.0)"
|
88
|
-
|
89
|
-
Scenario: installing multiple groups of demands with the --only flag
|
90
|
-
Given the cookbook store has the cookbooks:
|
91
|
-
| takeme | 1.0.0 |
|
92
|
-
| notme | 1.0.0 |
|
93
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
94
|
-
"""
|
95
|
-
cookbook 'takeme', group: :take_me
|
96
|
-
cookbook 'notme', group: :not_me
|
97
|
-
"""
|
98
|
-
When I successfully run `berks install --only take_me not_me`
|
99
|
-
Then the output should contain "Using takeme (1.0.0)"
|
100
|
-
Then the output should contain "Using notme (1.0.0)"
|
101
|
-
|
102
|
-
Scenario: skipping a single group to install with the --except flag
|
103
|
-
Given the cookbook store has the cookbooks:
|
104
|
-
| takeme | 1.0.0 |
|
105
|
-
| notme | 1.0.0 |
|
106
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
107
|
-
"""
|
108
|
-
cookbook 'takeme', group: :take_me
|
109
|
-
cookbook 'notme', group: :not_me
|
110
|
-
"""
|
111
|
-
When I successfully run `berks install --except not_me`
|
112
|
-
Then the output should contain "Using takeme (1.0.0)"
|
113
|
-
Then the output should not contain "Using notme (1.0.0)"
|
114
|
-
|
115
|
-
Scenario: skipping multiple groups to install with the --except flag
|
116
|
-
Given the cookbook store has the cookbooks:
|
117
|
-
| takeme | 1.0.0 |
|
118
|
-
| notme | 1.0.0 |
|
119
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
120
|
-
"""
|
121
|
-
cookbook 'takeme', group: :take_me
|
122
|
-
cookbook 'notme', group: :not_me
|
123
|
-
"""
|
124
|
-
When I successfully run `berks install --except take_me not_me`
|
125
|
-
Then the output should not contain "Using takeme (1.0.0)"
|
126
|
-
Then the output should not contain "Using notme (1.0.0)"
|
127
|
-
|
128
|
-
Scenario: installing a demand from a path location
|
129
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
130
|
-
"""
|
131
|
-
cookbook 'example_cookbook', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
|
132
|
-
"""
|
133
|
-
When I successfully run `berks install`
|
134
|
-
Then the output should contain:
|
135
|
-
"""
|
136
|
-
Using example_cookbook (0.5.0) from source at ../../spec/fixtures/cookbooks/example_cookbook-0.5.0
|
137
|
-
"""
|
138
|
-
|
139
|
-
Scenario: installing a demand from a path location with a conflicting constraint
|
140
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
141
|
-
"""
|
142
|
-
cookbook 'example_cookbook', '~> 1.0.0', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
|
143
|
-
"""
|
144
|
-
When I run `berks install`
|
145
|
-
Then the output should contain:
|
146
|
-
"""
|
147
|
-
The cookbook downloaded for example_cookbook (~> 1.0.0) did not satisfy the constraint.
|
148
|
-
"""
|
149
|
-
|
150
|
-
Scenario: installing a demand from a path location that also exists in other locations with conflicting dependencies
|
151
|
-
Given the Chef Server has cookbooks:
|
152
|
-
| example_cookbook | 0.5.0 | missing_cookbook >= 1.0.0 |
|
153
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
154
|
-
"""
|
155
|
-
cookbook 'example_cookbook', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
|
156
|
-
"""
|
157
|
-
When I successfully run `berks install`
|
158
|
-
Then the output should contain:
|
159
|
-
"""
|
160
|
-
Using example_cookbook (0.5.0) from source at ../../spec/fixtures/cookbooks/example_cookbook-0.5.0
|
161
|
-
"""
|
162
|
-
|
163
|
-
Scenario: installing a demand from a path location locks the graph to that version
|
164
|
-
Given the Chef Server has cookbooks:
|
165
|
-
| other_cookbook | 1.0.0 | example_cookbook ~> 1.0.0 |
|
166
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
167
|
-
"""
|
168
|
-
cookbook 'example_cookbook', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
|
169
|
-
cookbook 'other_cookbook'
|
170
|
-
"""
|
171
|
-
When I run `berks install`
|
172
|
-
Then the output should contain:
|
173
|
-
"""
|
174
|
-
Unable to find a solution for demands: example_cookbook (0.5.0), other_cookbook (>= 0.0.0)
|
175
|
-
"""
|
176
|
-
|
177
|
-
Scenario: installing a Berksfile from a remote directory that contains a path location
|
178
|
-
Given I have a Berksfile at "subdirectory" pointing at the local Berkshelf API with:
|
179
|
-
"""
|
180
|
-
cookbook 'example_cookbook', path: '../../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
|
181
|
-
"""
|
182
|
-
When I successfully run `berks install -b subdirectory/Berksfile`
|
183
|
-
Then the output should contain:
|
184
|
-
"""
|
185
|
-
Using example_cookbook (0.5.0) from source at ../../../spec/fixtures/cookbooks/example_cookbook-0.5.0
|
186
|
-
"""
|
187
|
-
|
188
|
-
Scenario: installing a demand from a Git location
|
189
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
190
|
-
"""
|
191
|
-
cookbook "berkshelf-cookbook-fixture", git: "git://github.com/RiotGames/berkshelf-cookbook-fixture.git"
|
192
|
-
"""
|
193
|
-
When I successfully run `berks install`
|
194
|
-
Then the cookbook store should have the git cookbooks:
|
195
|
-
| berkshelf-cookbook-fixture | 1.0.0 | a97b9447cbd41a5fe58eee2026e48ccb503bd3bc |
|
196
|
-
And the output should contain:
|
197
|
-
"""
|
198
|
-
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at master)
|
199
|
-
Fetching cookbook index from http://127.0.0.1:26310...
|
200
|
-
Using berkshelf-cookbook-fixture (1.0.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at master)
|
201
|
-
"""
|
202
|
-
|
203
|
-
Scenario: installing a demand from a Git location that has already been installed
|
204
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
205
|
-
"""
|
206
|
-
cookbook "berkshelf-cookbook-fixture", git: "git://github.com/RiotGames/berkshelf-cookbook-fixture.git"
|
207
|
-
"""
|
208
|
-
And the cookbook store has the git cookbooks:
|
209
|
-
| berkshelf-cookbook-fixture | 1.0.0 | a97b9447cbd41a5fe58eee2026e48ccb503bd3bc |
|
210
|
-
When I successfully run `berks install`
|
211
|
-
Then the output should contain:
|
212
|
-
"""
|
213
|
-
Using berkshelf-cookbook-fixture (1.0.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at master)
|
214
|
-
"""
|
215
|
-
|
216
|
-
Scenario: installing a Berksfile that contains a Git location with a rel
|
217
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
218
|
-
"""
|
219
|
-
cookbook 'berkshelf-cookbook-fixture',
|
220
|
-
github: 'RiotGames/berkshelf-cookbook-fixture',
|
221
|
-
branch: 'rel',
|
222
|
-
rel: 'cookbooks/berkshelf-cookbook-fixture'
|
223
|
-
"""
|
224
|
-
When I successfully run `berks install`
|
225
|
-
Then the cookbook store should have the git cookbooks:
|
226
|
-
| berkshelf-cookbook-fixture | 1.0.0 | 93f5768b7d14df45e10d16c8bf6fe98ba3ff809a |
|
227
|
-
And the output should contain:
|
228
|
-
"""
|
229
|
-
Fetching 'berkshelf-cookbook-fixture' from https://github.com/RiotGames/berkshelf-cookbook-fixture.git (at rel/cookbooks/berkshelf-cookbook-fixture)
|
230
|
-
Fetching cookbook index from http://127.0.0.1:26310...
|
231
|
-
Using berkshelf-cookbook-fixture (1.0.0) from https://github.com/RiotGames/berkshelf-cookbook-fixture.git (at rel/cookbooks/berkshelf-cookbook-fixture)
|
232
|
-
"""
|
233
|
-
|
234
|
-
Scenario: installing a Berksfile that contains a Git location
|
235
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
236
|
-
"""
|
237
|
-
cookbook 'berkshelf-cookbook-fixture',
|
238
|
-
git: 'git://github.com/RiotGames/berkshelf-cookbook-fixture.git',
|
239
|
-
tag: 'v0.2.0'
|
240
|
-
"""
|
241
|
-
When I successfully run `berks install`
|
242
|
-
Then the cookbook store should have the git cookbooks:
|
243
|
-
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
244
|
-
And the git cookbook "berkshelf-cookbook-fixture-70a527e17d91f01f031204562460ad1c17f972ee" should not have the following directories:
|
245
|
-
| .git |
|
246
|
-
|
247
|
-
Scenario: installing a Berksfile that contains a Git location with a tag
|
248
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
249
|
-
"""
|
250
|
-
cookbook "berkshelf-cookbook-fixture", git: "git://github.com/RiotGames/berkshelf-cookbook-fixture.git", tag: "v0.2.0"
|
251
|
-
"""
|
252
|
-
When I successfully run `berks install`
|
253
|
-
Then the cookbook store should have the git cookbooks:
|
254
|
-
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
255
|
-
And the output should contain:
|
256
|
-
"""
|
257
|
-
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
258
|
-
Fetching cookbook index from http://127.0.0.1:26310...
|
259
|
-
Using berkshelf-cookbook-fixture (0.2.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
260
|
-
"""
|
261
|
-
|
262
|
-
Scenario: installing a Berksfile that contains a Git location with a ref
|
263
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
264
|
-
"""
|
265
|
-
cookbook "berkshelf-cookbook-fixture", git: "git://github.com/RiotGames/berkshelf-cookbook-fixture.git", ref: "70a527e17d91f01f031204562460ad1c17f972ee"
|
266
|
-
"""
|
267
|
-
When I successfully run `berks install`
|
268
|
-
Then the cookbook store should have the git cookbooks:
|
269
|
-
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
270
|
-
And the output should contain:
|
271
|
-
"""
|
272
|
-
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at 70a527e)
|
273
|
-
Fetching cookbook index from http://127.0.0.1:26310...
|
274
|
-
Using berkshelf-cookbook-fixture (0.2.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at 70a527e)
|
275
|
-
"""
|
276
|
-
|
277
|
-
Scenario: installing a Berksfile that contains a Git location with an abbreviated ref
|
278
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
279
|
-
"""
|
280
|
-
cookbook "berkshelf-cookbook-fixture", git: "git://github.com/RiotGames/berkshelf-cookbook-fixture.git", ref: "70a527e"
|
281
|
-
"""
|
282
|
-
When I successfully run `berks install`
|
283
|
-
Then the cookbook store should have the git cookbooks:
|
284
|
-
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
285
|
-
And the output should contain:
|
286
|
-
"""
|
287
|
-
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at 70a527e)
|
288
|
-
Fetching cookbook index from http://127.0.0.1:26310...
|
289
|
-
Using berkshelf-cookbook-fixture (0.2.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at 70a527e)
|
290
|
-
"""
|
291
|
-
|
292
|
-
Scenario: installing a Berksfile that contains a GitHub location
|
293
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
294
|
-
"""
|
295
|
-
cookbook "berkshelf-cookbook-fixture", github: "RiotGames/berkshelf-cookbook-fixture", tag: "v0.2.0"
|
296
|
-
"""
|
297
|
-
When I successfully run `berks install`
|
298
|
-
Then the cookbook store should have the git cookbooks:
|
299
|
-
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
300
|
-
And the output should contain:
|
301
|
-
"""
|
302
|
-
Fetching 'berkshelf-cookbook-fixture' from https://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
303
|
-
Fetching cookbook index from http://127.0.0.1:26310...
|
304
|
-
Using berkshelf-cookbook-fixture (0.2.0) from https://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
305
|
-
"""
|
306
|
-
|
307
|
-
Scenario: installing a Berksfile that contains a GitHub location
|
308
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
309
|
-
"""
|
310
|
-
cookbook "berkshelf-cookbook-fixture", github: "RiotGames/berkshelf-cookbook-fixture", tag: "v0.2.0"
|
311
|
-
"""
|
312
|
-
When I successfully run `berks install`
|
313
|
-
Then the cookbook store should have the git cookbooks:
|
314
|
-
| berkshelf-cookbook-fixture | 0.2.0 | 70a527e17d91f01f031204562460ad1c17f972ee |
|
315
|
-
And the output should contain:
|
316
|
-
"""
|
317
|
-
Fetching 'berkshelf-cookbook-fixture' from https://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
318
|
-
Fetching cookbook index from http://127.0.0.1:26310...
|
319
|
-
Using berkshelf-cookbook-fixture (0.2.0) from https://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
320
|
-
"""
|
321
|
-
|
322
|
-
Scenario: running install when current project is a cookbook and the 'metadata' is specified
|
323
|
-
Given a cookbook named "sparkle_motion"
|
324
|
-
And I cd to "sparkle_motion"
|
325
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
326
|
-
"""
|
327
|
-
metadata
|
328
|
-
"""
|
329
|
-
When I successfully run `berks install`
|
330
|
-
Then the output should contain:
|
331
|
-
"""
|
332
|
-
Using sparkle_motion (0.0.0)
|
333
|
-
"""
|
334
|
-
|
335
|
-
Scenario: running install when current project is a cookbook and the 'metadata' is specified with a path
|
336
|
-
Given a cookbook named "fake"
|
337
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
338
|
-
"""
|
339
|
-
metadata path: './fake'
|
340
|
-
"""
|
341
|
-
When I successfully run `berks install`
|
342
|
-
Then the output should contain:
|
343
|
-
"""
|
344
|
-
Using fake (0.0.0)
|
345
|
-
"""
|
346
|
-
|
347
|
-
Scenario: running install when a Berksfile.lock is present
|
348
|
-
Given the Chef Server has cookbooks:
|
349
|
-
| bacon | 0.1.0 |
|
350
|
-
| bacon | 0.2.0 |
|
351
|
-
| bacon | 1.0.0 |
|
352
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
353
|
-
"""
|
354
|
-
cookbook 'bacon', '~> 0.1'
|
355
|
-
"""
|
356
|
-
And I write to "Berksfile.lock" with:
|
357
|
-
"""
|
358
|
-
DEPENDENCIES
|
359
|
-
bacon (~> 0.1)
|
360
|
-
|
361
|
-
GRAPH
|
362
|
-
bacon (0.2.0)
|
363
|
-
"""
|
364
|
-
When I successfully run `berks install`
|
365
|
-
Then the output should contain:
|
366
|
-
"""
|
367
|
-
Installing bacon (0.2.0)
|
368
|
-
"""
|
369
|
-
|
370
|
-
Scenario: running install with no Berksfile or Berksfile.lock
|
371
|
-
When I run `berks install`
|
372
|
-
Then the output should contain:
|
373
|
-
"""
|
374
|
-
No Berksfile or Berksfile.lock found at '
|
375
|
-
"""
|
376
|
-
And the exit status should be "BerksfileNotFound"
|
377
|
-
|
378
|
-
Scenario: running install when the Cookbook is not found on the remote site
|
379
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
380
|
-
"""
|
381
|
-
cookbook 'doesntexist'
|
382
|
-
cookbook 'other-failure'
|
383
|
-
"""
|
384
|
-
And I run `berks install`
|
385
|
-
Then the output should contain:
|
386
|
-
"""
|
387
|
-
Unable to find a solution for demands: doesntexist (>= 0.0.0), other-failure (>= 0.0.0)
|
388
|
-
"""
|
389
|
-
And the exit status should be "NoSolutionError"
|
390
|
-
|
391
|
-
Scenario: running install when the Cookbook from Berksfile.lock is not found in the sources
|
392
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
393
|
-
"""
|
394
|
-
cookbook 'foo'
|
395
|
-
"""
|
396
|
-
And I write to "Berksfile.lock" with:
|
397
|
-
"""
|
398
|
-
DEPENDENCIES
|
399
|
-
foo
|
400
|
-
|
401
|
-
GRAPH
|
402
|
-
foo (0.1.0)
|
403
|
-
"""
|
404
|
-
When I run `berks install`
|
405
|
-
Then the output should contain:
|
406
|
-
"""
|
407
|
-
Cookbook 'foo' (0.1.0) not found in any of the sources! This can happen if the remote cookbook has been deleted or if the sources inside the Berksfile have changed. Please run `berks update foo` to resolve to a valid version.
|
408
|
-
"""
|
409
|
-
|
410
|
-
Scenario: running install when the version from Berksfile.lock is not found in the sources
|
411
|
-
Given the Chef Server has cookbooks:
|
412
|
-
| foo | 0.3.0 |
|
413
|
-
| foo | 0.2.0 |
|
414
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
415
|
-
"""
|
416
|
-
cookbook 'foo'
|
417
|
-
"""
|
418
|
-
And I write to "Berksfile.lock" with:
|
419
|
-
"""
|
420
|
-
DEPENDENCIES
|
421
|
-
foo
|
422
|
-
|
423
|
-
GRAPH
|
424
|
-
foo (0.1.0)
|
425
|
-
"""
|
426
|
-
When I run `berks install`
|
427
|
-
Then the output should contain:
|
428
|
-
"""
|
429
|
-
Cookbook 'foo' (0.1.0) not found in any of the sources! This can happen if the remote cookbook has been deleted or if the sources inside the Berksfile have changed. Please run `berks update foo` to resolve to a valid version.
|
430
|
-
"""
|
431
|
-
|
432
|
-
Scenario: installing when there are sources with duplicate names defined in the same group
|
433
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
434
|
-
"""
|
435
|
-
cookbook 'berkshelf-cookbook-fixture'
|
436
|
-
cookbook 'berkshelf-cookbook-fixture'
|
437
|
-
"""
|
438
|
-
When I run `berks install`
|
439
|
-
Then the output should contain:
|
440
|
-
"""
|
441
|
-
Your Berksfile contains multiple entries named 'berkshelf-cookbook-fixture'. Please remove duplicate dependencies, or put them in different groups.
|
442
|
-
"""
|
443
|
-
And the exit status should be "DuplicateDependencyDefined"
|
444
|
-
|
445
|
-
Scenario: when a Git demand points to a branch that does not satisfy the version constraint
|
446
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
447
|
-
"""
|
448
|
-
cookbook "berkshelf-cookbook-fixture", "1.0.0", git: "git://github.com/RiotGames/berkshelf-cookbook-fixture.git", tag: "v0.2.0"
|
449
|
-
"""
|
450
|
-
When I run `berks install`
|
451
|
-
Then the output should contain:
|
452
|
-
"""
|
453
|
-
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v0.2.0)
|
454
|
-
The cookbook downloaded for berkshelf-cookbook-fixture (= 1.0.0) did not satisfy the constraint.
|
455
|
-
"""
|
456
|
-
And the exit status should be "CookbookValidationFailure"
|
457
|
-
|
458
|
-
Scenario: when a Git demand is defined and a cookbook of the same name and version is already in the cookbook store
|
459
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
460
|
-
"""
|
461
|
-
cookbook "berkshelf-cookbook-fixture", git: "git://github.com/RiotGames/berkshelf-cookbook-fixture.git", tag: "v1.0.0"
|
462
|
-
"""
|
463
|
-
And the cookbook store has the cookbooks:
|
464
|
-
| berkshelf-cookbook-fixture | 1.0.0 |
|
465
|
-
When I successfully run `berks install`
|
466
|
-
Then the output should contain:
|
467
|
-
"""
|
468
|
-
Fetching 'berkshelf-cookbook-fixture' from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v1.0.0)
|
469
|
-
Fetching cookbook index from http://127.0.0.1:26310...
|
470
|
-
Using berkshelf-cookbook-fixture (1.0.0) from git://github.com/RiotGames/berkshelf-cookbook-fixture.git (at v1.0.0)
|
471
|
-
"""
|
472
|
-
|
473
|
-
Scenario: with a git error during download
|
474
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
475
|
-
"""
|
476
|
-
cookbook 'berkshelf-cookbook-fixture', '1.0.0'
|
477
|
-
cookbook "doesntexist", git: "git://github.com/asdjhfkljashflkjashfakljsf"
|
478
|
-
"""
|
479
|
-
When I run `berks install`
|
480
|
-
Then the exit status should be "GitError"
|
481
|
-
|
482
|
-
Scenario: transitive dependencies in metadata
|
483
|
-
Given the cookbook store contains a cookbook "fake" "1.0.0" with dependencies:
|
484
|
-
| bacon | >= 0.0.0 |
|
485
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
486
|
-
"""
|
487
|
-
metadata
|
488
|
-
"""
|
489
|
-
And I write to "metadata.rb" with:
|
490
|
-
"""
|
491
|
-
name "myface"
|
492
|
-
depends 'fake', '1.0.0'
|
493
|
-
depends 'bacon', '0.2.0'
|
494
|
-
"""
|
495
|
-
And the Chef Server has cookbooks:
|
496
|
-
| bacon | 0.1.0 |
|
497
|
-
| bacon | 0.2.0 |
|
498
|
-
| bacon | 1.0.0 |
|
499
|
-
When I successfully run `berks install`
|
500
|
-
Then the cookbook store should have the cookbooks:
|
501
|
-
| bacon | 0.2.0 |
|
502
|
-
Then the output should contain:
|
503
|
-
"""
|
504
|
-
Installing bacon (0.2.0)
|
505
|
-
"""
|
506
|
-
|
507
|
-
Scenario: transitive dependencies in metadata when cookbooks are downloaded
|
508
|
-
Given the cookbook store contains a cookbook "fake" "1.0.0" with dependencies:
|
509
|
-
| bacon | >= 0.0.0 |
|
510
|
-
And the cookbook store has the cookbooks:
|
511
|
-
| bacon | 1.0.0 |
|
512
|
-
| bacon | 0.3.0 |
|
513
|
-
| bacon | 0.2.0 |
|
514
|
-
And I have a Berksfile pointing at the local Berkshelf API with:
|
515
|
-
"""
|
516
|
-
metadata
|
517
|
-
"""
|
518
|
-
And I write to "metadata.rb" with:
|
519
|
-
"""
|
520
|
-
name "myface"
|
521
|
-
depends 'fake', '1.0.0'
|
522
|
-
depends 'bacon', '0.2.0'
|
523
|
-
"""
|
524
|
-
When I successfully run `berks install`
|
525
|
-
Then the output should contain:
|
526
|
-
"""
|
527
|
-
Using bacon (0.2.0)
|
528
|
-
"""
|
529
|
-
|
530
|
-
Scenario: when asking for the :ruby solver engine without precedence, no error is raised
|
531
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
532
|
-
"""
|
533
|
-
cookbook 'example_cookbook', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
|
534
|
-
solver :ruby
|
535
|
-
"""
|
536
|
-
When I successfully run `berks install`
|
537
|
-
Then the output should contain:
|
538
|
-
"""
|
539
|
-
Resolving cookbook dependencies...
|
540
|
-
"""
|
541
|
-
|
542
|
-
Scenario: when asking for the :gecode solver engine without precedence, no error is raised
|
543
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
544
|
-
"""
|
545
|
-
cookbook 'example_cookbook', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
|
546
|
-
solver :gecode
|
547
|
-
"""
|
548
|
-
When I successfully run `berks install`
|
549
|
-
Then the output should contain:
|
550
|
-
"""
|
551
|
-
Resolving cookbook dependencies...
|
552
|
-
"""
|
553
|
-
|
554
|
-
Scenario: when asking for an unknown solver engine without precedence, no error is raised
|
555
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
556
|
-
"""
|
557
|
-
cookbook 'example_cookbook', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
|
558
|
-
solver :unknown
|
559
|
-
"""
|
560
|
-
When I successfully run `berks install`
|
561
|
-
Then the output should contain:
|
562
|
-
"""
|
563
|
-
Resolving cookbook dependencies...
|
564
|
-
"""
|
565
|
-
|
566
|
-
Scenario: when preferring the :gecode solver engine, no error is raised
|
567
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
568
|
-
"""
|
569
|
-
cookbook 'example_cookbook', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
|
570
|
-
solver :gecode, :preferred
|
571
|
-
"""
|
572
|
-
When I successfully run `berks install`
|
573
|
-
Then the output should contain:
|
574
|
-
"""
|
575
|
-
Resolving cookbook dependencies...
|
576
|
-
"""
|
577
|
-
|
578
|
-
Scenario: when preferring an unknown solver engine, no error is raised
|
579
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
580
|
-
"""
|
581
|
-
cookbook 'example_cookbook', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
|
582
|
-
solver :unknown, :preferred
|
583
|
-
"""
|
584
|
-
When I successfully run `berks install`
|
585
|
-
Then the output should contain:
|
586
|
-
"""
|
587
|
-
Resolving cookbook dependencies...
|
588
|
-
"""
|
589
|
-
|
590
|
-
Scenario: when requiring an unknown solver engine, an error is raised
|
591
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
592
|
-
"""
|
593
|
-
cookbook 'example_cookbook', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
|
594
|
-
solver :unknown, :required
|
595
|
-
"""
|
596
|
-
When I run `berks install`
|
597
|
-
Then the output should contain:
|
598
|
-
"""
|
599
|
-
Engine `unknown` is not supported.
|
600
|
-
"""
|
601
|
-
And the exit status should be "ArgumentError"
|
602
|
-
|
603
|
-
Scenario: when requiring the :ruby solver engine, no error is raised
|
604
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
605
|
-
"""
|
606
|
-
cookbook 'example_cookbook', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
|
607
|
-
solver :ruby, :required
|
608
|
-
"""
|
609
|
-
When I successfully run `berks install`
|
610
|
-
Then the output should contain:
|
611
|
-
"""
|
612
|
-
Resolving cookbook dependencies...
|
613
|
-
"""
|
614
|
-
|
615
|
-
Scenario: when requiring the :gecode solver engine, no error is raised
|
616
|
-
Given I have a Berksfile pointing at the local Berkshelf API with:
|
617
|
-
"""
|
618
|
-
cookbook 'example_cookbook', path: '../../spec/fixtures/cookbooks/example_cookbook-0.5.0'
|
619
|
-
solver :gecode, :required
|
620
|
-
"""
|
621
|
-
When I successfully run `berks install`
|
622
|
-
Then the output should contain:
|
623
|
-
"""
|
624
|
-
Resolving cookbook dependencies...
|
625
|
-
"""
|
626
|
-
|
627
|
-
Scenario: when using a chef_repo source
|
628
|
-
Given I use a fixture named "complex-cookbook-path"
|
629
|
-
And a file named "Berksfile" with:
|
630
|
-
"""
|
631
|
-
source chef_repo: '.'
|
632
|
-
|
633
|
-
cookbook 'jenkins-config'
|
634
|
-
"""
|
635
|
-
When I successfully run `berks install`
|
636
|
-
Then the output should contain:
|
637
|
-
"""
|
638
|
-
Installing jenkins (2.0.1) from
|
639
|
-
"""
|
640
|
-
And the output should contain:
|
641
|
-
"""
|
642
|
-
Installing jenkins-config (0.1.0) from
|
643
|
-
"""
|
644
|
-
And the cookbook store should have the cookbooks:
|
645
|
-
| jenkins | 2.0.1 |
|
646
|
-
| jenkins-config | 0.1.0 |
|