chef-dk 3.6.57 → 3.7.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -2
  3. data/Gemfile.lock +54 -54
  4. data/Rakefile +6 -2
  5. data/chef-dk.gemspec +2 -2
  6. data/lib/chef-dk/cli.rb +1 -1
  7. data/lib/chef-dk/command/clean_policy_cookbooks.rb +1 -1
  8. data/lib/chef-dk/command/clean_policy_revisions.rb +1 -1
  9. data/lib/chef-dk/command/delete_policy.rb +1 -1
  10. data/lib/chef-dk/command/delete_policy_group.rb +1 -1
  11. data/lib/chef-dk/command/diff.rb +1 -1
  12. data/lib/chef-dk/command/export.rb +1 -1
  13. data/lib/chef-dk/command/generate.rb +1 -1
  14. data/lib/chef-dk/command/generator_commands/generator_generator.rb +1 -1
  15. data/lib/chef-dk/command/install.rb +1 -1
  16. data/lib/chef-dk/command/provision.rb +6 -3
  17. data/lib/chef-dk/command/push.rb +1 -1
  18. data/lib/chef-dk/command/push_archive.rb +1 -1
  19. data/lib/chef-dk/command/shell_init.rb +1 -1
  20. data/lib/chef-dk/command/show_policy.rb +1 -1
  21. data/lib/chef-dk/command/undelete.rb +1 -1
  22. data/lib/chef-dk/command/update.rb +1 -1
  23. data/lib/chef-dk/command/verify.rb +2 -2
  24. data/lib/chef-dk/generator.rb +4 -4
  25. data/lib/chef-dk/policyfile/git_lock_fetcher.rb +1 -1
  26. data/lib/chef-dk/policyfile/uploader.rb +1 -1
  27. data/lib/chef-dk/policyfile_services/export_repo.rb +2 -2
  28. data/lib/chef-dk/policyfile_services/push_archive.rb +1 -1
  29. data/lib/chef-dk/service_exception_inspectors/http.rb +1 -1
  30. data/lib/chef-dk/version.rb +1 -1
  31. data/spec/unit/cli_spec.rb +1 -1
  32. data/spec/unit/command/base_spec.rb +3 -3
  33. data/spec/unit/command/clean_policy_cookbooks_spec.rb +2 -2
  34. data/spec/unit/command/clean_policy_revisions_spec.rb +2 -2
  35. data/spec/unit/command/delete_policy_group_spec.rb +2 -2
  36. data/spec/unit/command/delete_policy_spec.rb +2 -2
  37. data/spec/unit/command/export_spec.rb +3 -3
  38. data/spec/unit/command/generate_spec.rb +1 -1
  39. data/spec/unit/command/generator_commands/build_cookbook_spec.rb +2 -2
  40. data/spec/unit/command/generator_commands/cookbook_spec.rb +15 -15
  41. data/spec/unit/command/generator_commands/generator_generator_spec.rb +1 -1
  42. data/spec/unit/command/generator_commands/policyfile_spec.rb +1 -1
  43. data/spec/unit/command/generator_commands/repo_spec.rb +3 -3
  44. data/spec/unit/command/install_spec.rb +2 -2
  45. data/spec/unit/command/provision_spec.rb +7 -7
  46. data/spec/unit/command/push_spec.rb +2 -2
  47. data/spec/unit/command/shell_init_spec.rb +5 -5
  48. data/spec/unit/command/show_policy_spec.rb +2 -2
  49. data/spec/unit/command/undelete_spec.rb +2 -2
  50. data/spec/unit/command/update_spec.rb +4 -4
  51. data/spec/unit/policyfile/chef_server_lock_fetcher_spec.rb +1 -1
  52. data/spec/unit/policyfile/comparison_base_spec.rb +1 -1
  53. data/spec/unit/policyfile/differ_spec.rb +8 -8
  54. data/spec/unit/policyfile/git_lock_fetcher_spec.rb +8 -8
  55. data/spec/unit/policyfile/local_lock_fetcher_spec.rb +1 -1
  56. data/spec/unit/policyfile/reports/upload_spec.rb +1 -1
  57. data/spec/unit/policyfile_demands_spec.rb +5 -5
  58. data/spec/unit/policyfile_evaluation_spec.rb +3 -3
  59. data/spec/unit/policyfile_lock_build_spec.rb +14 -14
  60. data/spec/unit/policyfile_lock_validation_spec.rb +13 -13
  61. data/spec/unit/policyfile_services/clean_policies_spec.rb +3 -3
  62. data/spec/unit/policyfile_services/export_repo_spec.rb +2 -2
  63. data/spec/unit/policyfile_services/install_spec.rb +1 -1
  64. data/spec/unit/policyfile_services/push_archive_spec.rb +2 -2
  65. data/spec/unit/policyfile_services/push_spec.rb +1 -1
  66. data/spec/unit/policyfile_services/show_policy_spec.rb +13 -13
  67. data/spec/unit/policyfile_services/undelete_spec.rb +1 -1
  68. data/spec/unit/policyfile_services/update_attributes_spec.rb +1 -1
  69. data/spec/unit/policyfile_services/update_spec.rb +1 -1
  70. data/spec/unit/service_exception_inspectors/http_spec.rb +2 -2
  71. metadata +9 -29
  72. data/acceptance/.shared/kitchen_acceptance/.kitchen.digitalocean.yml +0 -27
  73. data/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +0 -287
  74. data/acceptance/.shared/kitchen_acceptance/.kitchen.vagrant.yml +0 -52
  75. data/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb +0 -51
  76. data/acceptance/.shared/kitchen_acceptance/metadata.rb +0 -1
  77. data/acceptance/Gemfile +0 -21
  78. data/acceptance/Gemfile.lock +0 -335
  79. data/acceptance/README.md +0 -132
  80. data/acceptance/trivial/.acceptance/acceptance-cookbook/.gitignore +0 -2
  81. data/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb +0 -2
  82. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -1
  83. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -1
  84. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -1
  85. data/acceptance/trivial/.kitchen.yml +0 -7
  86. data/acceptance/trivial/test/integration/chefdk-current-install/inspec/chef_client_spec.rb +0 -5
  87. data/tasks/announce.rb +0 -57
  88. data/tasks/bin/bundle-platform.bat +0 -2
  89. data/tasks/dependencies.rb +0 -56
  90. data/tasks/templates/prerelease.md.erb +0 -26
  91. data/tasks/templates/release.md.erb +0 -26
@@ -1,51 +0,0 @@
1
- module KitchenAcceptance
2
- class Kitchen < Chef::Resource
3
- resource_name :kitchen
4
-
5
- property :command, String, name_property: true
6
- property :driver, %w(ec2 vagrant), coerce: proc { |v| v.to_s }, default: lazy { ENV["KITCHEN_DRIVER"] || :ec2 }
7
- property :instances, String, default: lazy { ENV["KITCHEN_INSTANCES"] ? ENV["KITCHEN_INSTANCES"] : "" }
8
- property :kitchen_dir, String, default: Chef.node['chef-acceptance']['suite-dir']
9
- property :chef_product, String, default: lazy {
10
- ENV["KITCHEN_CHEF_PRODUCT"] || begin
11
- # Figure out if we're in chefdk or chef
12
- if ::File.exist?(::File.expand_path("../../chef-dk.gemspec", node['chef-acceptance']['suite-dir']))
13
- "chefdk"
14
- else
15
- "chef"
16
- end
17
- end
18
- }
19
- property :chef_channel, String, default: lazy {
20
- ENV["KITCHEN_CHEF_CHANNEL"] ||
21
- # Pick up current if we can't connect to artifactory
22
- (ENV["ARTIFACTORY_USERNAME"] ? "unstable" : "current")
23
- }
24
- property :chef_version, String, default: lazy {
25
- ENV["KITCHEN_CHEF_VERSION"] ||
26
- # If we're running the chef or chefdk projects in jenkins, pick up the project name.
27
- (ENV["PROJECT_NAME"] == chef_product ? ENV["OMNIBUS_BUILD_VERSION"] : nil) ||
28
- "latest"
29
- }
30
- property :artifactory_username, String, default: lazy { ENV["ARTIFACTORY_USERNAME"] ? ENV["ARTIFACTORY_USERNAME"] : "" }
31
- property :artifactory_password, String, default: lazy { ENV["ARTIFACTORY_PASSWORD"] ? ENV["ARTIFACTORY_PASSWORD"] : "" }
32
- property :env, Hash, default: {}
33
- property :kitchen_options, String, default: lazy { ENV["PROJECT_NAME"] ? "-c -l debug" : "-c" }
34
-
35
- action :run do
36
- execute "bundle exec kitchen #{command}#{instances ? " #{instances}" : ""}#{kitchen_options ? " #{kitchen_options}" : ""}" do
37
- cwd kitchen_dir
38
- env({
39
- "KITCHEN_DRIVER" => driver,
40
- "KITCHEN_INSTANCES" => instances,
41
- "KITCHEN_LOCAL_YAML" => ::File.expand_path("../../.kitchen.#{driver}.yml", __FILE__),
42
- "KITCHEN_CHEF_PRODUCT" => chef_product,
43
- "KITCHEN_CHEF_CHANNEL" => chef_channel,
44
- "KITCHEN_CHEF_VERSION" => chef_version,
45
- "ARTIFACTORY_USERNAME" => artifactory_username,
46
- "ARTIFACTORY_PASSWORD" => artifactory_password
47
- }.merge(new_resource.env))
48
- end
49
- end
50
- end
51
- end
@@ -1 +0,0 @@
1
- name "kitchen_acceptance"
@@ -1,21 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gem "chef-acceptance", git: "https://github.com/chef/chef-acceptance"
4
- gem "test-kitchen"
5
- gem "kitchen-ec2"
6
- gem "kitchen-inspec"
7
- gem "kitchen-vagrant"
8
- gem "windows_chef_zero"
9
- gem "winrm-fs"
10
- gem "winrm-elevated"
11
- gem "berkshelf"
12
- gem "inspec", "~> 1.0" # until we pull 2.0 into chefDK
13
-
14
- # Workaround to address https://github.com/sickill/rainbow/issues/44
15
- gem "rainbow", ">= 2.1.0", "< 2.2"
16
-
17
- # TODO remove this when we update Chef to use the new api exposed in 3.5.1
18
- gem "rspec-core", "= 3.4.4"
19
-
20
- # until 2.0.0 is fixed for unstable packages
21
- gem "mixlib-install", "1.2.3"
@@ -1,335 +0,0 @@
1
- GIT
2
- remote: https://github.com/chef/chef-acceptance
3
- revision: 3877c344098021ac66134e8edb5eb805d14d4643
4
- specs:
5
- chef-acceptance (0.2.0)
6
- mixlib-shellout (~> 2.0)
7
- thor (~> 0.19)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- addressable (2.5.2)
13
- public_suffix (>= 2.0.2, < 4.0)
14
- artifactory (2.8.2)
15
- aws-sdk (2.11.126)
16
- aws-sdk-resources (= 2.11.126)
17
- aws-sdk-core (2.11.126)
18
- aws-sigv4 (~> 1.0)
19
- jmespath (~> 1.0)
20
- aws-sdk-resources (2.11.126)
21
- aws-sdk-core (= 2.11.126)
22
- aws-sigv4 (1.0.3)
23
- berkshelf (6.3.4)
24
- buff-config (~> 2.0)
25
- buff-extensions (~> 2.0)
26
- chef (>= 12.7.2, < 14.0)
27
- cleanroom (~> 1.0)
28
- concurrent-ruby (~> 1.0)
29
- faraday (~> 0.9)
30
- httpclient (~> 2.7)
31
- minitar (~> 0.5, >= 0.5.4)
32
- mixlib-archive (~> 0.4)
33
- mixlib-shellout (~> 2.0)
34
- octokit (~> 4.0)
35
- retryable (~> 2.0)
36
- ridley (~> 5.0)
37
- solve (~> 4.0)
38
- thor (~> 0.19, < 0.19.2)
39
- buff-config (2.0.0)
40
- buff-extensions (~> 2.0)
41
- varia_model (~> 0.6)
42
- buff-extensions (2.0.0)
43
- buff-ignore (1.2.0)
44
- buff-ruby_engine (1.0.0)
45
- buff-shell_out (1.1.0)
46
- buff-ruby_engine (~> 1.0)
47
- builder (3.2.3)
48
- celluloid (0.16.0)
49
- timers (~> 4.0.0)
50
- celluloid-io (0.16.2)
51
- celluloid (>= 0.16.0)
52
- nio4r (>= 1.1.0)
53
- chef (12.12.15)
54
- bundler (>= 1.10)
55
- chef-config (= 12.12.15)
56
- chef-zero (~> 4.5)
57
- diff-lcs (~> 1.2, >= 1.2.4)
58
- erubis (~> 2.7)
59
- ffi-yajl (~> 2.2)
60
- highline (~> 1.6, >= 1.6.9)
61
- iniparse (~> 1.4)
62
- mixlib-authentication (~> 1.4)
63
- mixlib-cli (~> 1.4)
64
- mixlib-log (~> 1.3)
65
- mixlib-shellout (~> 2.0)
66
- net-sftp (~> 2.1, >= 2.1.2)
67
- net-ssh (>= 2.9, < 4.0)
68
- net-ssh-multi (~> 1.1)
69
- ohai (>= 8.6.0.alpha.1, < 9)
70
- plist (~> 3.2)
71
- proxifier (~> 1.0)
72
- rspec-core (~> 3.4)
73
- rspec-expectations (~> 3.4)
74
- rspec-mocks (~> 3.4)
75
- rspec_junit_formatter (~> 0.2.0)
76
- serverspec (~> 2.7)
77
- specinfra (~> 2.10)
78
- syslog-logger (~> 1.6)
79
- uuidtools (~> 2.1.5)
80
- chef-config (12.12.15)
81
- fuzzyurl (~> 0.8.0)
82
- mixlib-config (~> 2.0)
83
- mixlib-shellout (~> 2.0)
84
- chef-zero (4.9.0)
85
- ffi-yajl (~> 2.2)
86
- hashie (>= 2.0, < 4.0)
87
- mixlib-log (~> 1.3)
88
- rack (< 2)
89
- uuidtools (~> 2.1)
90
- cleanroom (1.0.0)
91
- coderay (1.1.2)
92
- concurrent-ruby (1.0.5)
93
- diff-lcs (1.3)
94
- docker-api (1.34.2)
95
- excon (>= 0.47.0)
96
- multi_json
97
- erubis (2.7.0)
98
- excon (0.62.0)
99
- faraday (0.15.2)
100
- multipart-post (>= 1.2, < 3)
101
- ffi (1.9.25)
102
- ffi-yajl (2.3.1)
103
- libyajl2 (~> 1.2)
104
- fuzzyurl (0.8.0)
105
- gssapi (1.2.0)
106
- ffi (>= 1.0.1)
107
- gyoku (1.3.1)
108
- builder (>= 2.1.2)
109
- hashie (3.6.0)
110
- highline (1.7.10)
111
- hitimes (1.3.0)
112
- htmlentities (4.3.4)
113
- httpclient (2.8.3)
114
- iniparse (1.4.4)
115
- inspec (1.51.25)
116
- addressable (~> 2.4)
117
- faraday (>= 0.9.0)
118
- hashie (~> 3.4)
119
- htmlentities
120
- json (>= 1.8, < 3.0)
121
- method_source (~> 0.8)
122
- mixlib-log
123
- parallel (~> 1.9)
124
- parslet (~> 1.5)
125
- pry (~> 0)
126
- rspec (~> 3)
127
- rspec-its (~> 1.2)
128
- rubyzip (~> 1.1)
129
- semverse
130
- sslshake (~> 1.2)
131
- thor (~> 0.19)
132
- tomlrb (~> 1.2)
133
- train (~> 0.32)
134
- ipaddress (0.8.3)
135
- jmespath (1.4.0)
136
- json (2.1.0)
137
- kitchen-ec2 (2.2.2)
138
- aws-sdk (~> 2)
139
- excon
140
- multi_json
141
- retryable (~> 2.0)
142
- test-kitchen (~> 1.4, >= 1.4.1)
143
- kitchen-inspec (0.23.1)
144
- hashie (~> 3.4)
145
- inspec (>= 0.34.0, < 3.0.0)
146
- test-kitchen (~> 1.6)
147
- kitchen-vagrant (1.3.3)
148
- test-kitchen (~> 1.4)
149
- libyajl2 (1.2.0)
150
- little-plugger (1.1.4)
151
- logging (2.2.2)
152
- little-plugger (~> 1.1)
153
- multi_json (~> 1.10)
154
- method_source (0.9.0)
155
- minitar (0.6.1)
156
- mixlib-archive (0.4.16)
157
- mixlib-log
158
- mixlib-authentication (1.4.2)
159
- mixlib-cli (1.7.0)
160
- mixlib-config (2.2.13)
161
- tomlrb
162
- mixlib-install (1.2.3)
163
- artifactory
164
- mixlib-shellout
165
- mixlib-versioning
166
- mixlib-log (1.7.1)
167
- mixlib-shellout (2.4.0)
168
- mixlib-versioning (1.2.2)
169
- molinillo (0.6.6)
170
- multi_json (1.13.1)
171
- multipart-post (2.0.0)
172
- net-scp (1.2.1)
173
- net-ssh (>= 2.6.5)
174
- net-sftp (2.1.2)
175
- net-ssh (>= 2.6.5)
176
- net-ssh (3.2.0)
177
- net-ssh-gateway (1.3.0)
178
- net-ssh (>= 2.6.5)
179
- net-ssh-multi (1.2.1)
180
- net-ssh (>= 2.6.5)
181
- net-ssh-gateway (>= 1.2.0)
182
- net-telnet (0.2.0)
183
- nio4r (2.3.1)
184
- nori (2.6.0)
185
- octokit (4.11.0)
186
- sawyer (~> 0.8.0, >= 0.5.3)
187
- ohai (8.26.1)
188
- chef-config (>= 12.5.0.alpha.1, < 14)
189
- ffi (~> 1.9)
190
- ffi-yajl (~> 2.2)
191
- ipaddress
192
- mixlib-cli
193
- mixlib-config (~> 2.0)
194
- mixlib-log (>= 1.7.1, < 2.0)
195
- mixlib-shellout (~> 2.0)
196
- plist (~> 3.1)
197
- systemu (~> 2.6.4)
198
- wmi-lite (~> 1.0)
199
- parallel (1.12.1)
200
- parslet (1.8.2)
201
- plist (3.4.0)
202
- proxifier (1.0.3)
203
- pry (0.11.3)
204
- coderay (~> 1.1.0)
205
- method_source (~> 0.9.0)
206
- public_suffix (3.0.3)
207
- rack (1.6.10)
208
- rainbow (2.1.0)
209
- retryable (2.0.4)
210
- ridley (5.1.1)
211
- addressable
212
- buff-config (~> 2.0)
213
- buff-extensions (~> 2.0)
214
- buff-ignore (~> 1.2)
215
- buff-shell_out (~> 1.0)
216
- celluloid (~> 0.16.0)
217
- celluloid-io (~> 0.16.1)
218
- chef-config (>= 12.5.0)
219
- erubis
220
- faraday (~> 0.9)
221
- hashie (>= 2.0.2, < 4.0.0)
222
- httpclient (~> 2.7)
223
- json (>= 1.7.7)
224
- mixlib-authentication (>= 1.3.0)
225
- retryable (~> 2.0)
226
- semverse (~> 2.0)
227
- varia_model (~> 0.6)
228
- rspec (3.4.0)
229
- rspec-core (~> 3.4.0)
230
- rspec-expectations (~> 3.4.0)
231
- rspec-mocks (~> 3.4.0)
232
- rspec-core (3.4.4)
233
- rspec-support (~> 3.4.0)
234
- rspec-expectations (3.4.0)
235
- diff-lcs (>= 1.2.0, < 2.0)
236
- rspec-support (~> 3.4.0)
237
- rspec-its (1.2.0)
238
- rspec-core (>= 3.0.0)
239
- rspec-expectations (>= 3.0.0)
240
- rspec-mocks (3.4.1)
241
- diff-lcs (>= 1.2.0, < 2.0)
242
- rspec-support (~> 3.4.0)
243
- rspec-support (3.4.1)
244
- rspec_junit_formatter (0.2.3)
245
- builder (< 4)
246
- rspec-core (>= 2, < 4, != 2.12.0)
247
- rubyntlm (0.6.2)
248
- rubyzip (1.2.2)
249
- safe_yaml (1.0.4)
250
- sawyer (0.8.1)
251
- addressable (>= 2.3.5, < 2.6)
252
- faraday (~> 0.8, < 1.0)
253
- semverse (2.0.0)
254
- serverspec (2.41.3)
255
- multi_json
256
- rspec (~> 3.0)
257
- rspec-its
258
- specinfra (~> 2.72)
259
- sfl (2.3)
260
- solve (4.0.0)
261
- molinillo (~> 0.6)
262
- semverse (>= 1.1, < 3.0)
263
- specinfra (2.76.1)
264
- net-scp
265
- net-ssh (>= 2.7)
266
- net-telnet
267
- sfl
268
- sslshake (1.2.0)
269
- syslog-logger (1.6.8)
270
- systemu (2.6.5)
271
- test-kitchen (1.17.0)
272
- mixlib-install (>= 1.2, < 3.0)
273
- mixlib-shellout (>= 1.2, < 3.0)
274
- net-scp (~> 1.1)
275
- net-ssh (>= 2.9, < 5.0)
276
- net-ssh-gateway (~> 1.2)
277
- safe_yaml (~> 1.0)
278
- thor (~> 0.19, < 0.19.2)
279
- thor (0.19.1)
280
- timers (4.0.4)
281
- hitimes
282
- tomlrb (1.2.7)
283
- train (0.32.0)
284
- docker-api (~> 1.26)
285
- json (>= 1.8, < 3.0)
286
- mixlib-shellout (~> 2.0)
287
- net-scp (~> 1.2)
288
- net-ssh (>= 2.9, < 5.0)
289
- winrm (~> 2.0)
290
- winrm-fs (~> 1.0)
291
- uuidtools (2.1.5)
292
- varia_model (0.6.0)
293
- buff-extensions (~> 2.0)
294
- hashie (>= 2.0.2, < 4.0.0)
295
- windows_chef_zero (2.0.0)
296
- test-kitchen (>= 1.2.1)
297
- winrm (2.2.3)
298
- builder (>= 2.1.2)
299
- erubis (~> 2.7)
300
- gssapi (~> 1.2)
301
- gyoku (~> 1.0)
302
- httpclient (~> 2.2, >= 2.2.0.2)
303
- logging (>= 1.6.1, < 3.0)
304
- nori (~> 2.0)
305
- rubyntlm (~> 0.6.0, >= 0.6.1)
306
- winrm-elevated (1.1.0)
307
- winrm (~> 2.0)
308
- winrm-fs (~> 1.0)
309
- winrm-fs (1.3.0)
310
- erubis (~> 2.7)
311
- logging (>= 1.6.1, < 3.0)
312
- rubyzip (~> 1.1)
313
- winrm (~> 2.0)
314
- wmi-lite (1.0.0)
315
-
316
- PLATFORMS
317
- ruby
318
-
319
- DEPENDENCIES
320
- berkshelf
321
- chef-acceptance!
322
- inspec (~> 1.0)
323
- kitchen-ec2
324
- kitchen-inspec
325
- kitchen-vagrant
326
- mixlib-install (= 1.2.3)
327
- rainbow (>= 2.1.0, < 2.2)
328
- rspec-core (= 3.4.4)
329
- test-kitchen
330
- windows_chef_zero
331
- winrm-elevated
332
- winrm-fs
333
-
334
- BUNDLED WITH
335
- 1.16.4
@@ -1,132 +0,0 @@
1
- # Acceptance Testing for Chef DK
2
- This folder contains acceptance tests that are required for ChefDK
3
- release readiness.
4
-
5
- ## Getting started
6
- The tests use the _chef-acceptance_ gem as the high level framework.
7
- All the gems needed to run these tests can be installed with Bundler.
8
-
9
- ### Important Note!
10
- Before running chef-acceptance, you *MUST* do the following on your current session:
11
-
12
- ```
13
- export APPBUNDLER_ALLOW_RVM=true
14
- ```
15
-
16
- ## Pre-requisites / One time set up
17
-
18
- ### Set up for local VM (Vagrant)
19
-
20
- If you intend to run the acceptance tests on a local VM, the supported solution is to use Vagrant.
21
- Ensure that Vagrant is installed on the machine that tests will run from, along with a
22
- virtualization driver (E.g.: VirtualBox).
23
-
24
- Set up the KITCHEN_DRIVER environment variable appropriately (value should be "vagrant"). E.g.:
25
- ```
26
- export KITCHEN_DRIVER=vagrant
27
- ```
28
- Add this to your shell profile or startup script as needed.
29
-
30
- ### Set up for cloud VM (EC2)
31
-
32
- If you intend to run the acceptance tests on a cloud VM, the supported solution is to use EC2.
33
-
34
- The steps you will need to do are:
35
-
36
- 1. Add your AWS credentials to the machine - e.g., to the ~/.aws/credentials directory.
37
- - The easiest way to do this is to download the aws command line (`brew install awscli` on OS/X) and run `aws configure`.
38
- 2. Create or import a SSH key to AWS. (If you already have one, you can skip the import/create)
39
- - In the AWS console, click Key Pairs, then Create Key Pair or Import Key Pair.
40
- 3. Copy or move the private key file (USERNAME.pem) to the SSH folder (e.g. `~/.ssh/USERNAME.pem`).
41
- - If you Created a key pair in step 2, download the private key and move it to `~/.ssh`.
42
- - If you Importd a key pair in step 2, just ensure your private key is in `~/.ssh` and has the same name as the key pair (`~/.ssh/USERNAME` or `~/.ssh/USERNAME.pem`).
43
- 4. Set AWS_SSH_KEY_ID to the SSH key name.
44
- - This is **optional** if your AWS SSH key name is your local username.
45
- - You may want to set this in your shell `.profile`.
46
-
47
- ```shell
48
- export AWS_SSH_KEY_ID=name-of-private-key
49
- ```
50
- 5. Set the private key to only be readable by root
51
-
52
- ```shell
53
- chmod 0400 ~/.ssh/USERNAME.pem
54
- ```
55
- 6. Set up the KITCHEN_DRIVER environment variable appropriately (value should be "ec2"). (This is optional, as ec2 is the default.) E.g.:
56
-
57
- ```shell
58
- export KITCHEN_DRIVER=ec2
59
- ```
60
- Add this to your shell profile or startup script as needed.
61
- 7. **Connect to Chef VPN**. The instances you create will not have public IPs!
62
-
63
- ## Setting up and running a test suite
64
- To get started, do a bundle install from the acceptance directory:
65
- ```shell
66
- chef/acceptance$ bundle install --binstubs
67
- ```
68
-
69
- To get some basic info and ensure chef-acceptance can be run, do:
70
- ```shell
71
- chef/acceptance$ bin/chef-acceptance info
72
- ```
73
-
74
- To run a particular test suite, do the following:
75
- ```shell
76
- chef/acceptance$ bin/chef-acceptance test TEST_SUITE
77
- ```
78
-
79
- To restrict which OS's will run, use the KITCHEN_INSTANCES environment variable:
80
-
81
- ```shell
82
- chef/acceptance$ export KITCHEN_INSTANCES=*-ubuntu-1404
83
- chef/acceptance$ bin/chef-acceptance test cookbook-git
84
- ```
85
-
86
- If KITCHEN_INSTANCES is not specified, the default instances are default-ubuntu-1404 and default-windows-windows-2012r2. All selected instances will be run in *parallel* if the driver supports it (ec2 does, vagrant doesn't).
87
-
88
- ## Optional Settings
89
-
90
- In addition to the environment settings above, there are a number of
91
- key values that are available to set for changing the way the acceptance
92
- tests are run.
93
-
94
- ### KITCHEN_CHEF_CHANNEL
95
-
96
- Use this setting to specify which channel we will pull the chef build from.
97
- The default is to use the "current" channel, unless the ARTIFACTORY_USERNAME is set
98
- (which normally happens when running under Jenkins), in which case the default is
99
- changed to "unstable".
100
-
101
- ```shell
102
- export KITCHEN_CHEF_CHANNEL=name-of-channel
103
- ```
104
-
105
-
106
- ### KITCHEN_CHEF_VERSION
107
-
108
- Use this setting to override the version of the Chef client that is installed. The default is to get the latest version in the desired channel.
109
-
110
- ```shell
111
- export KITCHEN_CHEF_VERSION=version-of-chef-client
112
- ```
113
-
114
- ### ARTIFACTORY_USERNAME / ARTIFACTORY_PASSWORD
115
-
116
- If the desired channel to get the Chef client from is "unstable", the following settings need to be exported:
117
-
118
- ```shell
119
- export ARTIFACTORY_USERNAME=username
120
- export ARTIFACTORY_PASSWORD=password
121
- ```
122
-
123
- ## Future Work
124
-
125
- Currently, there is no simple mechanism for chef-acceptance
126
- to build an Omnibus package of the developers local chef
127
- instance and run acceptance tests on it - the only packages
128
- that can be exercised are ones that come from one of the
129
- pipeline channels (unstable, current or stable).
130
-
131
- This is not an issue when adding acceptance tests for pre-existing functionality (as that functionality is presumed
132
- to already be in a build in one of the pipeline channels).