test-kitchen 1.23.3 → 1.23.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. checksums.yaml +4 -4
  2. data/lib/kitchen/version.rb +1 -1
  3. data/support/chef-client-zero.rb +1 -1
  4. metadata +5 -324
  5. data/.gitattributes +0 -3
  6. data/.github/ISSUE_TEMPLATE.md +0 -56
  7. data/.github/lock.yml +0 -1
  8. data/.gitignore +0 -38
  9. data/.gitmodules +0 -0
  10. data/.kitchen.appveyor.yml +0 -25
  11. data/.kitchen.dokken.yml +0 -31
  12. data/.kitchen.proxy.yml +0 -27
  13. data/.rubocop.yml +0 -5
  14. data/.travis.yml +0 -57
  15. data/.yardopts +0 -3
  16. data/Berksfile +0 -3
  17. data/CHANGELOG.md +0 -1510
  18. data/CONTRIBUTING.md +0 -14
  19. data/ECOSYSTEM.md +0 -93
  20. data/Gemfile +0 -40
  21. data/Gemfile.proxy_tests +0 -4
  22. data/Guardfile +0 -42
  23. data/MAINTAINERS.md +0 -29
  24. data/README.md +0 -138
  25. data/RELEASE_NOTES.md +0 -167
  26. data/Rakefile +0 -77
  27. data/appveyor.yml +0 -47
  28. data/docs/CONTRIBUTING.md +0 -8
  29. data/docs/LICENSE +0 -22
  30. data/docs/README.md +0 -78
  31. data/docs/archetypes/default.md +0 -6
  32. data/docs/config.toml +0 -36
  33. data/docs/content/docs/_index.md +0 -5
  34. data/docs/content/docs/drivers/_index.md +0 -27
  35. data/docs/content/docs/drivers/azurerm.md +0 -44
  36. data/docs/content/docs/drivers/vagrant.md +0 -39
  37. data/docs/content/docs/getting-started/00-introduction.md +0 -14
  38. data/docs/content/docs/getting-started/01-installing.md +0 -64
  39. data/docs/content/docs/getting-started/02-getting-help.md +0 -59
  40. data/docs/content/docs/getting-started/03-creating-cookbook.md +0 -46
  41. data/docs/content/docs/getting-started/04-kitchen-yml.md +0 -56
  42. data/docs/content/docs/getting-started/05-instances.md +0 -79
  43. data/docs/content/docs/getting-started/06-writing-recipe.md +0 -21
  44. data/docs/content/docs/getting-started/07-running-converge.md +0 -134
  45. data/docs/content/docs/getting-started/08-manually-verifying.md +0 -55
  46. data/docs/content/docs/getting-started/09-writing-test.md +0 -49
  47. data/docs/content/docs/getting-started/10-running-verify.md +0 -120
  48. data/docs/content/docs/getting-started/11-running-test.md +0 -168
  49. data/docs/content/docs/getting-started/12-adding-platform.md +0 -206
  50. data/docs/content/docs/getting-started/13-adding-feature.md +0 -30
  51. data/docs/content/docs/getting-started/14-adding-suite.md +0 -60
  52. data/docs/content/docs/getting-started/15-adding-test.md +0 -66
  53. data/docs/content/docs/getting-started/16-adding-recipe.md +0 -53
  54. data/docs/content/docs/getting-started/17-excluding-platforms.md +0 -101
  55. data/docs/content/docs/getting-started/18-next-steps.md +0 -23
  56. data/docs/content/docs/getting-started/_index.md +0 -5
  57. data/docs/content/docs/provisioners/_index.md +0 -36
  58. data/docs/content/docs/provisioners/chef.md +0 -69
  59. data/docs/content/docs/provisioners/shell.md +0 -31
  60. data/docs/content/docs/reference/_index.md +0 -5
  61. data/docs/content/docs/reference/configuration.md +0 -53
  62. data/docs/content/docs/reference/examples.md +0 -97
  63. data/docs/content/docs/reference/faq.md +0 -58
  64. data/docs/content/docs/reference/fixtures.md +0 -32
  65. data/docs/content/docs/reference/glossary.md +0 -34
  66. data/docs/content/docs/reference/lifecycle-hooks.md +0 -68
  67. data/docs/content/docs/reference/reboots.md +0 -24
  68. data/docs/content/docs/verifiers/_index.md +0 -14
  69. data/docs/content/docs/verifiers/inspec.md +0 -44
  70. data/docs/content/docs/verifiers/serverspec.md +0 -20
  71. data/docs/static/images/chef-logo.png +0 -0
  72. data/docs/static/images/chef-logo.svg +0 -1
  73. data/docs/static/images/github-banner.png +0 -0
  74. data/docs/static/images/github-banner.svg +0 -71
  75. data/docs/static/images/kitchen-logo.png +0 -0
  76. data/docs/static/images/logo-block.svg +0 -222
  77. data/docs/static/images/logo.png +0 -0
  78. data/docs/static/images/logos-group.png +0 -0
  79. data/docs/static/images/terminal-1.png +0 -0
  80. data/docs/static/images/terminal-1.svg +0 -589
  81. data/docs/static/images/terminal-2.png +0 -0
  82. data/docs/static/images/terminal-2.svg +0 -235
  83. data/docs/static/images/terminal-3.png +0 -0
  84. data/docs/static/images/terminal-3.svg +0 -439
  85. data/docs/static/index.html +0 -59
  86. data/docs/static/javascripts/all.js +0 -348
  87. data/docs/static/javascripts/vendor/foundation.min.js +0 -4
  88. data/docs/static/javascripts/vendor/jquery.min.js +0 -5
  89. data/docs/static/javascripts/vendor/what-input.js +0 -336
  90. data/docs/static/stylesheets/site.css +0 -4667
  91. data/docs/themes/kitchen/layouts/_default/baseof.html +0 -53
  92. data/docs/themes/kitchen/layouts/_default/list.html +0 -4
  93. data/docs/themes/kitchen/layouts/_default/redirect.html +0 -10
  94. data/docs/themes/kitchen/layouts/_default/single.html +0 -6
  95. data/docs/themes/kitchen/layouts/partials/core/head.html +0 -6
  96. data/docs/themes/kitchen/layouts/partials/kitchen/footer.html +0 -18
  97. data/docs/themes/kitchen/layouts/partials/kitchen/head.html +0 -4
  98. data/docs/themes/kitchen/layouts/partials/kitchen/header.html +0 -26
  99. data/docs/themes/kitchen/layouts/partials/search-docs.html +0 -3
  100. data/docs/themes/kitchen/layouts/partials/sidebar.html +0 -33
  101. data/docs/themes/kitchen/layouts/shortcodes/button.html +0 -1
  102. data/docs/themes/kitchen/layouts/shortcodes/codeblock.html +0 -8
  103. data/docs/themes/kitchen/layouts/shortcodes/cta.html +0 -5
  104. data/docs/themes/kitchen/layouts/shortcodes/danger.html +0 -1
  105. data/docs/themes/kitchen/layouts/shortcodes/example_fqdn.html +0 -1
  106. data/docs/themes/kitchen/layouts/shortcodes/info.html +0 -1
  107. data/docs/themes/kitchen/layouts/shortcodes/ol-styled.html +0 -3
  108. data/docs/themes/kitchen/layouts/shortcodes/success.html +0 -1
  109. data/docs/themes/kitchen/layouts/shortcodes/tip.html +0 -1
  110. data/docs/themes/kitchen/layouts/shortcodes/warning.html +0 -1
  111. data/docs/themes/kitchen/static/css/kitchen.css +0 -10
  112. data/docs/themes/kitchen/static/css/kitchen.css.map +0 -7
  113. data/docs/themes/kitchen/static/fonts/Muli-Bold.ttf +0 -0
  114. data/docs/themes/kitchen/static/fonts/Muli-Regular.ttf +0 -0
  115. data/docs/themes/kitchen/static/fonts/Muli-SemiBold.ttf +0 -0
  116. data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.eot +0 -0
  117. data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.svg +0 -1104
  118. data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.ttf +0 -0
  119. data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.woff +0 -0
  120. data/docs/themes/kitchen/static/fonts/fontawesome/fa-brands-400.woff2 +0 -0
  121. data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.eot +0 -0
  122. data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.svg +0 -372
  123. data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.ttf +0 -0
  124. data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.woff +0 -0
  125. data/docs/themes/kitchen/static/fonts/fontawesome/fa-regular-400.woff2 +0 -0
  126. data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.eot +0 -0
  127. data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.svg +0 -1896
  128. data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.ttf +0 -0
  129. data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.woff +0 -0
  130. data/docs/themes/kitchen/static/fonts/fontawesome/fa-solid-900.woff2 +0 -0
  131. data/docs/themes/kitchen/static/images/chef-logo-light.svg +0 -36
  132. data/docs/themes/kitchen/static/images/chef-logo-white.svg +0 -38
  133. data/docs/themes/kitchen/static/images/chef-logo.svg +0 -37
  134. data/docs/themes/kitchen/static/images/favicon.ico +0 -0
  135. data/docs/themes/kitchen/static/js/scripts-all.js +0 -7
  136. data/docs/themes/kitchen/static/js/source/chef-hugo.js +0 -116
  137. data/docs/themes/kitchen/static/js/source/omnitruck.js +0 -82
  138. data/docs/themes/kitchen/static/js/source/segment.js +0 -52
  139. data/docs/themes/kitchen/static/sass/_buttons.scss +0 -161
  140. data/docs/themes/kitchen/static/sass/_core.scss +0 -24
  141. data/docs/themes/kitchen/static/sass/_forms.scss +0 -14
  142. data/docs/themes/kitchen/static/sass/_mixins.scss +0 -133
  143. data/docs/themes/kitchen/static/sass/_typography.scss +0 -34
  144. data/docs/themes/kitchen/static/sass/_variables.scss +0 -82
  145. data/docs/themes/kitchen/static/sass/kitchen.scss +0 -7
  146. data/docs/themes/kitchen/static/sass/kitchen/_footer.scss +0 -50
  147. data/docs/themes/kitchen/static/sass/kitchen/_header.scss +0 -187
  148. data/docs/themes/kitchen/static/sass/kitchen/_homepage.scss +0 -27
  149. data/docs/themes/kitchen/static/sass/kitchen/_utility-bar.scss +0 -173
  150. data/docs/themes/kitchen/static/sass/partials/_alerts.scss +0 -32
  151. data/docs/themes/kitchen/static/sass/partials/_bg.scss +0 -19
  152. data/docs/themes/kitchen/static/sass/partials/_blurbs.scss +0 -25
  153. data/docs/themes/kitchen/static/sass/partials/_callout.scss +0 -15
  154. data/docs/themes/kitchen/static/sass/partials/_cards.scss +0 -54
  155. data/docs/themes/kitchen/static/sass/partials/_dropdown.scss +0 -77
  156. data/docs/themes/kitchen/static/sass/partials/_grid.scss +0 -87
  157. data/docs/themes/kitchen/static/sass/partials/_padding.scss +0 -73
  158. data/docs/themes/kitchen/static/sass/partials/_sidebar.scss +0 -71
  159. data/docs/themes/kitchen/static/sass/partials/_tabs.scss +0 -125
  160. data/docs/themes/kitchen/static/sass/typography/_chroma.scss +0 -366
  161. data/docs/themes/kitchen/static/sass/typography/_code.scss +0 -72
  162. data/docs/themes/kitchen/static/sass/typography/_headers.scss +0 -90
  163. data/docs/themes/kitchen/static/sass/typography/_links.scss +0 -127
  164. data/docs/themes/kitchen/static/sass/typography/_lists.scss +0 -155
  165. data/docs/themes/kitchen/static/sass/typography/_prose.scss +0 -29
  166. data/docs/themes/kitchen/static/sass/typography/_text.scss +0 -221
  167. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_animated.scss +0 -20
  168. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_bordered-pulled.scss +0 -20
  169. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_core.scss +0 -16
  170. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_fixed-width.scss +0 -6
  171. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_icons.scss +0 -992
  172. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_larger.scss +0 -23
  173. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_list.scss +0 -18
  174. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_mixins.scss +0 -57
  175. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_rotated-flipped.scss +0 -23
  176. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_screen-reader.scss +0 -5
  177. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_stacked.scss +0 -31
  178. data/docs/themes/kitchen/static/sass/vendor/fontawesome/_variables.scss +0 -1005
  179. data/docs/themes/kitchen/static/sass/vendor/fontawesome/fa-brands.scss +0 -21
  180. data/docs/themes/kitchen/static/sass/vendor/fontawesome/fa-regular.scss +0 -22
  181. data/docs/themes/kitchen/static/sass/vendor/fontawesome/fa-solid.scss +0 -23
  182. data/docs/themes/kitchen/static/sass/vendor/fontawesome/fontawesome.scss +0 -16
  183. data/docs/themes/kitchen/theme.toml +0 -8
  184. data/features/kitchen_action_commands.feature +0 -164
  185. data/features/kitchen_command.feature +0 -16
  186. data/features/kitchen_console_command.feature +0 -35
  187. data/features/kitchen_defaults.feature +0 -38
  188. data/features/kitchen_diagnose_command.feature +0 -96
  189. data/features/kitchen_help_command.feature +0 -16
  190. data/features/kitchen_init_command.feature +0 -254
  191. data/features/kitchen_list_command.feature +0 -140
  192. data/features/kitchen_login_command.feature +0 -62
  193. data/features/kitchen_sink_command.feature +0 -30
  194. data/features/kitchen_test_command.feature +0 -88
  195. data/features/step_definitions/gem_steps.rb +0 -24
  196. data/features/step_definitions/git_steps.rb +0 -5
  197. data/features/step_definitions/output_steps.rb +0 -5
  198. data/features/support/env.rb +0 -74
  199. data/spec/kitchen/base64_stream_spec.rb +0 -74
  200. data/spec/kitchen/cli_spec.rb +0 -54
  201. data/spec/kitchen/collection_spec.rb +0 -76
  202. data/spec/kitchen/color_spec.rb +0 -51
  203. data/spec/kitchen/config_spec.rb +0 -434
  204. data/spec/kitchen/configurable_spec.rb +0 -1113
  205. data/spec/kitchen/data_munger_spec.rb +0 -2800
  206. data/spec/kitchen/diagnostic_spec.rb +0 -128
  207. data/spec/kitchen/driver/base_spec.rb +0 -132
  208. data/spec/kitchen/driver/dummy_spec.rb +0 -193
  209. data/spec/kitchen/driver/exec_spec.rb +0 -75
  210. data/spec/kitchen/driver/proxy_spec.rb +0 -127
  211. data/spec/kitchen/driver/ssh_base_spec.rb +0 -1136
  212. data/spec/kitchen/driver_spec.rb +0 -106
  213. data/spec/kitchen/errors_spec.rb +0 -317
  214. data/spec/kitchen/instance_spec.rb +0 -1372
  215. data/spec/kitchen/lazy_hash_spec.rb +0 -113
  216. data/spec/kitchen/lifecycle_hooks_spec.rb +0 -171
  217. data/spec/kitchen/loader/yaml_spec.rb +0 -787
  218. data/spec/kitchen/logger_spec.rb +0 -425
  219. data/spec/kitchen/logging_spec.rb +0 -56
  220. data/spec/kitchen/login_command_spec.rb +0 -67
  221. data/spec/kitchen/metadata_chopper_spec.rb +0 -79
  222. data/spec/kitchen/platform_spec.rb +0 -88
  223. data/spec/kitchen/provisioner/base_spec.rb +0 -393
  224. data/spec/kitchen/provisioner/chef/policyfile_spec.rb +0 -140
  225. data/spec/kitchen/provisioner/chef_apply_spec.rb +0 -131
  226. data/spec/kitchen/provisioner/chef_base_spec.rb +0 -1565
  227. data/spec/kitchen/provisioner/chef_solo_spec.rb +0 -602
  228. data/spec/kitchen/provisioner/chef_zero_spec.rb +0 -1013
  229. data/spec/kitchen/provisioner/dummy_spec.rb +0 -96
  230. data/spec/kitchen/provisioner/shell_spec.rb +0 -623
  231. data/spec/kitchen/provisioner_spec.rb +0 -101
  232. data/spec/kitchen/shell_out_spec.rb +0 -146
  233. data/spec/kitchen/ssh_spec.rb +0 -584
  234. data/spec/kitchen/state_file_spec.rb +0 -122
  235. data/spec/kitchen/suite_spec.rb +0 -61
  236. data/spec/kitchen/transport/base_spec.rb +0 -140
  237. data/spec/kitchen/transport/exec_spec.rb +0 -79
  238. data/spec/kitchen/transport/ssh_spec.rb +0 -1317
  239. data/spec/kitchen/transport/winrm_spec.rb +0 -1320
  240. data/spec/kitchen/transport_spec.rb +0 -106
  241. data/spec/kitchen/util_spec.rb +0 -250
  242. data/spec/kitchen/verifier/base_spec.rb +0 -346
  243. data/spec/kitchen/verifier/busser_spec.rb +0 -580
  244. data/spec/kitchen/verifier/dummy_spec.rb +0 -96
  245. data/spec/kitchen/verifier/shell_spec.rb +0 -157
  246. data/spec/kitchen/verifier_spec.rb +0 -114
  247. data/spec/kitchen_spec.rb +0 -112
  248. data/spec/spec_helper.rb +0 -110
  249. data/spec/support/powershell_max_size_spec.rb +0 -39
  250. data/test-kitchen.gemspec +0 -49
  251. data/test/cookbooks/test_cookbook/metadata.rb +0 -6
  252. data/test/cookbooks/test_cookbook/recipes/default.rb +0 -1
  253. data/test/integration/default/default_spec.rb +0 -3
  254. data/testing_windows.md +0 -38
@@ -1,31 +0,0 @@
1
- ---
2
- title: Shell
3
- slug: shell
4
- menu:
5
- docs:
6
- parent: provisioners
7
- weight: 5
8
- ---
9
-
10
- The Shell Provisioner can be used instead of managing with one of the supported configuration tools.
11
-
12
- If the only value provided to the `provisioner:` configuration is `name: shell`, then Test-Kitchen looks for a file named `bootstrap.sh` or `bootstrap.ps1` in the root of the project.
13
-
14
- ### Provisioner Default Usage
15
- ~~~
16
- ---
17
- provisioner:
18
- name: shell
19
- ~~~
20
-
21
- ### Provisioner Options
22
- ~~~
23
- ---
24
- provisioner:
25
- name: shell
26
- script: 'test/scripts/setup.sh' # Optional - default: bootstrap.sh/bootstrap.ps1
27
- arguments: ['--debug'] # Optional - Add extra arguments to the converge script.
28
- root_path: '/home/vagrant/' # Optional - default: kitchen_root ('/tmp')
29
- command: 'hostname' # Optioanl - Run a single command instead of managing and running a script.
30
- ~~~
31
-
@@ -1,5 +0,0 @@
1
- ---
2
- title: "Reference"
3
- layout: redirect
4
- redirect_url: /docs/reference/dynamic-configuration
5
- ---
@@ -1,53 +0,0 @@
1
- ---
2
- title: Configuration
3
- menu:
4
- docs:
5
- parent: reference
6
- weight: 5
7
- ---
8
-
9
- There are a few basic ways of dynamically configuring Kitchen:
10
-
11
- * A local configuration will be looked for in `.kitchen.local.yml` which could be used for development purposes. This is a file that is not typically checked into version control.
12
- * A global configuration file will also be looked for in `$HOME/.kitchen/config.yml` to set preferred defaults for all your projects.
13
- * Each YAML file can contain ERB fragments, which you could use for selecting drivers, etc. based on which platform you're currently running, or based off environment variables.
14
- * Finally, Kitchen also has several environment variables where you can set a path to a `.kitchen.yml` or `$HOME/.kitchen/config.yml` file. This can be useful if you wish to use Kitchen with a continuous integration (CI) system.
15
-
16
- To specify a path to a global `config.yml`, project or local `.kitchen.yml` file, set the following environment variables:
17
-
18
- ~~~
19
- export KITCHEN_GLOBAL_YAML=/path/to/your/global/config.yml
20
- export KITCHEN_YAML=/path/to/your/project/.kitchen.yml
21
- export KITCHEN_LOCAL_YAML=/path/to/your/local/.kitchen.local.yml
22
- ~~~
23
-
24
- **Note:** If `$HOME/.kitchen/config.yml` is present, kitchen will merge this file with your project's `.kitchen.yml`, and/or `.kitchen.local.yml` file. Merge precedence is:
25
-
26
- 1. `.kitchen.local.yml`
27
- 2. `.kitchen.yml`
28
- 3. `$HOME/.kitchen/config.yml`
29
-
30
- For example, one could modify `.kitchen.yml` (or `.kitchen.local.yml`, or `$HOME/.kitchen/config.yml`) to look like:
31
-
32
- ~~~
33
- ---
34
- driver:
35
- name: openstack
36
- openstack_username: <%= ENV['YOUR_OPENSTACK_USERNAME'] %>
37
- openstack_api_key: <%= ENV['YOUR_OPENSTACK_API_KEY'] %>
38
- openstack_auth_url: <%= ENV['YOUR_OPENSTACK_AUTH_URL'] %>
39
- image_ref: <%= ENV['SERVER_IMAGE_ID'] %>
40
- flavor_ref: <%= ENV['SERVER_FLAVOR_ID'] %>
41
- ~~~
42
-
43
- Keep in mind, this assumes you have an OpenStack deployment setup and ready to use. This is only an example so to illustrate using environment variables via ERB snippets in the configuration file.
44
-
45
- Another handy use of the ERB fragments is to dynamically override the log_level of
46
- the provisioner. Since Kitchen 1.7.0 the log level for the provisioner is now independent of the Kitchen log level. Using the following snippet, allows the environment to override the provisioner log level without modifying the config file.:
47
-
48
- ~~~
49
- ---
50
- provisioner:
51
- name: chef_zero
52
- log_level: <%= ENV['CHEF_LOG_LEVEL'] || "auto" %>
53
- ~~~
@@ -1,97 +0,0 @@
1
- ---
2
- title: "Examples"
3
- menu:
4
- docs:
5
- parent: reference
6
- weight: 10
7
- ---
8
-
9
- We've collected a variety of examples to highlight all the different things one can do with kitchen.
10
-
11
- #### kitchen-vagrant
12
-
13
- The default driver with a default provider of VirtualBox. Here is a fully annotated example of the `.kitchen.yml` generated by `chef generate`
14
-
15
- ~~~
16
- ---
17
- # Configure the driver (cloud/hypervisor)
18
- driver:
19
- name: vagrant #ec2, dokken, libvirt
20
- # provider: virtualbox
21
-
22
- # Configure the provisioner (config management)
23
- provisioner:
24
- name: chef_zero #chef_zero, chef_solo, puppet_apply, ansible_playbook, shell
25
-
26
- # Configure the verifier (testing framework)
27
- verifier:
28
- name: inspec
29
-
30
- # Enumerate platforms
31
- # A platform represents a single configuration of an operating system
32
- # While this is often 1:1, the names allow this to be customizable
33
- # At least 1 platform is **required**
34
- platforms:
35
- # Drivers may support defaults that automatically
36
- # map certain names to an image for the given driver
37
- - name: ubuntu-16.04
38
- - name: centos-7
39
-
40
- # Enumerate suites
41
- # At least 1 suite is **required**
42
- suites:
43
- # The name of each suite maps to a configuration / set of tests
44
- # Depending on the verifier, default locations may be inferred based on
45
- # directory naming
46
- - name: default
47
- run_list:
48
- - recipe[git_cookbook::default]
49
- verifier:
50
- inspec_tests:
51
- - test/integration/default
52
- attributes:
53
- ~~~
54
-
55
- Sometimes you'd like to add another NIC to your vm, or bump up the memory. You might have a `forwarded_port` you'd like
56
- to add also. The following snippet has a couple suggestions how. You can even turn on the `auto_correct` if you think
57
- you'll need it.
58
-
59
- ~~~
60
- name: vagrant
61
- network:
62
- - ["forwarded_port", {guest: 80, host: 8080, auto_correct: true}]
63
- - ["forwarded_port", {guest: 443, host: 8443}]
64
- - ["private_network", {ip: "10.0.0.1"}]
65
- customize:
66
- cpus: 2
67
- memory: 4096
68
- ~~~
69
-
70
- The driver tries to closely mirror the upstream, as illustrated by [forwarded_port](https://docs.vagrantup.com/v2/networking/forwarded_ports.html) and [private_network](https://docs.vagrantup.com/v2/networking/private_network.html).
71
-
72
- If you would like more information the [kitchen-vagrant](https://github.com/test-kitchen/kitchen-vagrant) github page has more.
73
-
74
- [hangops-jobbot/.kitchen.yml](https://github.com/rrxtns/hangops-jobbot/blob/master/cookbooks/hangops-jobbot/.kitchen.yml)
75
-
76
- ~~~
77
- ---
78
- driver:
79
- name: vagrant
80
- network:
81
- - ["forwarded_port", {guest: 8080, host: 8081}]
82
-
83
- provisioner:
84
- name: chef_solo
85
- data_bags_path: './test/integration/data_bags/'
86
- solo_rb:
87
- environment: test
88
-
89
- platforms:
90
- - name: ubuntu-16.04
91
-
92
- suites:
93
- - name: default
94
- run_list:
95
- - recipe[hangops-jobbot::default]
96
- attributes:
97
- ~~~
@@ -1,58 +0,0 @@
1
- ---
2
- title: "FAQ"
3
- menu:
4
- docs:
5
- parent: reference
6
- weight: 15
7
- ---
8
-
9
- ### FAQ
10
-
11
- These are frequently asked questions or tips that don't have a better home just yet.
12
-
13
-
14
- ##### How do I add another driver other than Vagrant?
15
-
16
- If you're using ChefDK, check for it`chef gem list | grep $DRIVER` you need to make sure the driver [exists](https://github.com/test-kitchen/test-kitchen/blob/master/ECOSYSTEM.md),
17
- if it does:
18
-
19
- ~~~
20
- ~$ gem install kitchen-openstack # for instance
21
- ~$ vi cookbooks/demo/.kitchen.yml # wherever your .kitchen.yml is for your cookbook
22
- ~~~
23
-
24
- Examples:
25
-
26
- - [kitchen-openstack](https://github.com/test-kitchen/kitchen-openstack#minimum-configuration)
27
- - [kitchen-digitalocean](https://github.com/test-kitchen/kitchen-digitalocean#installation-and-setup)
28
-
29
- Edit the `.kitchen.yml` as appropriate and run `kitchen list` to verify that everything
30
- is working as expected. There is a strong chance that the flavors, or
31
- image names are different per driver, so when migrating between drivers be prepared
32
- to change these at the very least.
33
-
34
- Certain drivers, like `kitchen-dokken` [recommend](https://github.com/someara/kitchen-dokken#usage) setting `KITCHEN_LOCAL_YAML` environment variable to ensure these configs are used when there are multiple in a directory.
35
-
36
- ##### How do I update just test-kitchen if I'm using ChefDK?
37
-
38
- Due to the nature of how the ChefDK is built, it is not possible to update a gem that is part of the package. To get the latest versions of component software, builds from the [current](https://downloads.chef.io/chefdk/current) channel can be consumed.
39
-
40
- ##### How do I change the user to access the instance?
41
-
42
- Add/edit the `transport` section in `.kitchen.yml`, for instance:
43
-
44
- ~~~
45
- transport:
46
- username: ubuntu
47
- ~~~
48
-
49
- ##### I need to set up a cache or proxy using Vagrant, what are some options for me?
50
-
51
- So there are a few things that already exist that sort of cover this in the kitchen world:
52
-
53
- - the host ENV vars for proxies are automatically passed to instances
54
- - Example of using [polipo](https://gist.github.com/fnichol/7551540) locally
55
- - [vagrant-cachier](https://github.com/fgrehm/vagrant-cachier)
56
-
57
- For the system level proxies and the polipo/squid locally you don't need to do much but you'll still need to edit the conf files for yum/apt as appropriate. If vagrant-cachier it will be used by `kitchen-vagrant` as default. This behaviour is documented [here](https://github.com/test-kitchen/kitchen-vagrant#-cachier).
58
-
@@ -1,32 +0,0 @@
1
- ---
2
- title: Fixture Cookbooks
3
- menu:
4
- docs:
5
- parent: reference
6
- weight: 20
7
- ---
8
-
9
- Cookbooks, especially ones that provide resources exclusively, often utilize what are known as "fixture cookbooks". These are cookbooks and recipes included expressly for the purpose of testing.
10
-
11
- Fixture cookbooks are most often made available via a Berksfile:
12
-
13
- ```
14
- source 'https://supermarket.chef.io'
15
-
16
- metadata
17
-
18
- group :integration do
19
- cookbook 'test_cookbook', path: './test/cookbooks/test_cookbook'
20
- end
21
- ```
22
-
23
- This will make the cookbook available and it can be called via `run_list`:
24
-
25
- ```
26
- suites:
27
- - name: default
28
- run_list:
29
- - recipe[test_cookbook::default]
30
- ```
31
-
32
- Working examples can be found in many of the chef-cookbooks, like the [openldap cookbok](https://github.com/chef-cookbooks/openldap/tree/master/test/cookbooks/openldap-test)
@@ -1,34 +0,0 @@
1
- ---
2
- title: Glossary
3
- menu:
4
- docs:
5
- parent: reference
6
- weight: 25
7
- ---
8
-
9
- Berksfile
10
- : the file `berks` loads to determine sources and dependencies
11
-
12
- Berkshelf
13
- : a tool to resolve cookbook dependencies
14
-
15
- hypervisor
16
- : a piece of software that allows one to create and run virtual machines
17
-
18
- regular expression
19
- : a "a sequence of characters that define a search pattern", in the context of kitchen we allow a user to specify instances with regular expressions like `^default-ubuntu`
20
-
21
- Vagrant
22
- : a piece of software that makes abstracts away hypervisor details to provide a consistent experience and interface to virtual machines
23
-
24
- virtual machine
25
- : a machine that is virtualized, i.e. running on a hypervisor
26
-
27
- VirtualBox
28
- : a freely available hypervisor from Oracle
29
-
30
- VMware Fusion
31
- : a for-pay hypervisor from VMware exclusively for macOS/OS X
32
-
33
- VMware Workstation
34
- : a for-pay hypervisor from VMware for Linux and Windows
@@ -1,68 +0,0 @@
1
- ---
2
- title: Lifecycle Hooks
3
- menu:
4
- docs:
5
- parent: reference
6
- weight: 30
7
- ---
8
-
9
- The life cycle hooks system allows running commands before or after any phase
10
- of Test Kitchen (`create`, `converge`, `verify`, or `destroy`). Commands can be
11
- run either locally on your workstation (the default) or remotely on the test instance.
12
-
13
- These hooks are configured under a new `lifecycle:` section in `kitchen.yml`:
14
-
15
- ```
16
- lifecycle:
17
- pre_create: echo before
18
- post_create:
19
- - echo after
20
- - local: echo also after
21
- - remote: echo after but in the instance
22
- ```
23
-
24
- You can also configure hooks on a single platform or suite:
25
-
26
- ```
27
- platforms:
28
- - name: ubuntu-18.04
29
- lifecycle:
30
- pre_converge:
31
- - remote: apt update
32
-
33
- suites:
34
- - name: default
35
- lifecycle:
36
- post_verify:
37
- - my_coverage_formatter
38
- ```
39
-
40
- Local commands automatically get some environment variables with information
41
- about which instance the hook is evaluating against:
42
-
43
- * `KITCHEN_INSTANCE_NAME` - The full name of the instance
44
- * `KITCHEN_SUITE_NAME` - The name of the suite of the instance
45
- * `KITCHEN_PLATFORM_NAME` - The name of the platform of the instance
46
- * `KITCHEN_INSTANCE_HOSTNAME` - The hostname of the instance as reported by the driver plugin
47
-
48
- You can also pass additional configuration for local commands:
49
-
50
- ```
51
- lifecycle:
52
- pre_converge:
53
- - local: ./setup.sh
54
- environment:
55
- API_KEY: asdf1234
56
- timeout: 60
57
- ```
58
-
59
- Remote commands are normally not allowed during `pre_create` or `post_destroy`
60
- hooks as there is generally no instance running at that point, but with `pre_destroy`
61
- hooks you may want to use the `skippable` flag so as to not fail during `kitchen test`:
62
-
63
- ```
64
- lifecycle:
65
- pre_destroy:
66
- - remote: myapp --unregister-license
67
- skippable: true
68
- ```
@@ -1,24 +0,0 @@
1
- ---
2
- title: Reboots
3
- menu:
4
- docs:
5
- parent: reference
6
- weight: 35
7
- ---
8
-
9
- Test-kitchen has support for enduring reboots initiated by a Chef provisioner.
10
-
11
- ```
12
- provisioner:
13
- name: chef_zero
14
- max_retries: 3 # tweak in conjunction with wait_for_retry
15
- wait_for_retry: 90 # tweak based on machine shutdown speed
16
- retry_on_exit_code: [35, 213] # retry for array of exit codes
17
- client_rb:
18
- exit_status: :enabled # default in 13+, only required for 12.x
19
- client_fork: false # don't fork so we get true exit code, not needed for Windows
20
- ```
21
-
22
- `wait_for_retry` is necessary so that Test-kitchen doesn't try to reconnect before the system reboots (or at least before the transport stops taking connections). This is the most likely option to need tweaking and varies between drivers as well as the specifications of the instances.
23
-
24
- `retry_on_exit_code` does not typically need to be set. The default value is `[35, 213]` - `35` from chef-client indicates a reboot has been scheduled during the run, while `213` indicates an exit due to a chef-client upgrade.
@@ -1,14 +0,0 @@
1
- ---
2
- title: Verifiers
3
- menu:
4
- docs:
5
- parent: verifiers
6
- weight: 1
7
- ---
8
-
9
- A Test-Kitchen *verifier* tests the configuration applied by the *provisioner*. This is most commonly a InSpec or ServerSpec, both of which are included in the ChefDK/Workstation.
10
-
11
- Other verifiers:
12
-
13
- * shell (built-in)
14
- * [busser-bats](https://github.com/test-kitchen/busser-bats/)
@@ -1,44 +0,0 @@
1
- ---
2
- title: InSpec
3
- slug: inspec
4
- menu:
5
- docs:
6
- parent: verifiers
7
- weight: 5
8
- ---
9
-
10
- [InSpec](https://www.inspec.io/) framework for testing and auditing your applications and infrastructure. It can be utilized for validating test-kitchen instance via the[kitchen-inspec plugin](https://github.com/inspec/kitchen-inspec).
11
-
12
- To enable kitchen-inspec in your `.kitchen.yml`:
13
-
14
- ```
15
- verifier:
16
- name: inspec
17
- ```
18
-
19
- Example test to check that the httpd package is installed:
20
-
21
- ```
22
- describe package('httpd') do
23
- it { should be_installed }
24
- end
25
- ```
26
-
27
- The plugin requires no configuration by default and expects tests exist as per:
28
-
29
- ```
30
- .
31
- ├── Berksfile
32
- ├── Gemfile
33
- ├── README.md
34
- ├── metadata.rb
35
- ├── recipes
36
- │ ├── default.rb
37
- │ └── nginx.rb
38
- └── test
39
- └── integration
40
- └── default
41
- └── web_spec.rb
42
- ```
43
-
44
- More configuration options can be found in the project's [README](https://github.com/inspec/kitchen-inspec/blob/master/README.md)