chef 16.4.41 → 16.5.64

Sign up to get free protection for your applications and to get access to all the features.
Files changed (268) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/Rakefile +2 -2
  4. data/bin/knife +1 -1
  5. data/chef.gemspec +2 -1
  6. data/lib/chef/application.rb +18 -16
  7. data/lib/chef/application/apply.rb +12 -7
  8. data/lib/chef/application/base.rb +26 -23
  9. data/lib/chef/application/client.rb +10 -4
  10. data/lib/chef/application/exit_code.rb +13 -4
  11. data/lib/chef/application/knife.rb +22 -11
  12. data/lib/chef/application/solo.rb +2 -1
  13. data/lib/chef/application/windows_service.rb +14 -14
  14. data/lib/chef/application/windows_service_manager.rb +6 -6
  15. data/lib/chef/chef_fs/knife.rb +2 -2
  16. data/lib/chef/chef_fs/parallelizer.rb +0 -1
  17. data/lib/chef/client.rb +10 -11
  18. data/lib/chef/cookbook/cookbook_version_loader.rb +1 -1
  19. data/lib/chef/cookbook/synchronizer.rb +2 -2
  20. data/lib/chef/cookbook_site_streaming_uploader.rb +13 -11
  21. data/lib/chef/cookbook_uploader.rb +1 -1
  22. data/lib/chef/data_collector.rb +6 -5
  23. data/lib/chef/data_collector/config_validation.rb +22 -13
  24. data/lib/chef/data_collector/run_end_message.rb +2 -2
  25. data/lib/chef/data_collector/run_start_message.rb +1 -1
  26. data/lib/chef/deprecated.rb +1 -1
  27. data/lib/chef/deprecation/warnings.rb +2 -2
  28. data/lib/chef/digester.rb +2 -2
  29. data/lib/chef/dsl/chef_vault.rb +1 -1
  30. data/lib/chef/dsl/data_query.rb +2 -2
  31. data/lib/chef/dsl/platform_introspection.rb +1 -1
  32. data/lib/chef/encrypted_data_bag_item.rb +3 -4
  33. data/lib/chef/encrypted_data_bag_item/decryptor.rb +3 -3
  34. data/lib/chef/encrypted_data_bag_item/encryptor.rb +3 -3
  35. data/lib/chef/environment.rb +2 -2
  36. data/lib/chef/event_loggers/windows_eventlog.rb +2 -2
  37. data/lib/chef/exceptions.rb +4 -4
  38. data/lib/chef/file_access_control/windows.rb +5 -1
  39. data/lib/chef/formatters/doc.rb +7 -6
  40. data/lib/chef/formatters/error_inspectors/api_error_formatting.rb +6 -5
  41. data/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +3 -3
  42. data/lib/chef/formatters/error_inspectors/registration_error_inspector.rb +9 -9
  43. data/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +2 -2
  44. data/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb +3 -3
  45. data/lib/chef/formatters/minimal.rb +5 -4
  46. data/lib/chef/http.rb +6 -4
  47. data/lib/chef/http/auth_credentials.rb +5 -1
  48. data/lib/chef/http/authenticator.rb +1 -1
  49. data/lib/chef/http/basic_client.rb +4 -2
  50. data/lib/chef/http/decompressor.rb +1 -1
  51. data/lib/chef/http/http_request.rb +7 -5
  52. data/lib/chef/http/socketless_chef_zero_client.rb +5 -2
  53. data/lib/chef/http/ssl_policies.rb +1 -1
  54. data/lib/chef/json_compat.rb +1 -1
  55. data/lib/chef/knife.rb +4 -4
  56. data/lib/chef/knife/bootstrap.rb +16 -14
  57. data/lib/chef/knife/bootstrap/chef_vault_handler.rb +1 -1
  58. data/lib/chef/knife/bootstrap/templates/chef-full.erb +3 -3
  59. data/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb +7 -7
  60. data/lib/chef/knife/client_create.rb +3 -3
  61. data/lib/chef/knife/config_get.rb +8 -97
  62. data/lib/chef/knife/config_get_profile.rb +9 -9
  63. data/lib/chef/knife/config_list.rb +139 -0
  64. data/lib/chef/knife/config_list_profiles.rb +8 -98
  65. data/lib/chef/knife/config_show.rb +127 -0
  66. data/lib/chef/knife/config_use.rb +61 -0
  67. data/lib/chef/knife/config_use_profile.rb +9 -24
  68. data/lib/chef/knife/configure.rb +2 -2
  69. data/lib/chef/knife/core/bootstrap_context.rb +2 -2
  70. data/lib/chef/knife/core/object_loader.rb +1 -1
  71. data/lib/chef/knife/core/windows_bootstrap_context.rb +11 -11
  72. data/lib/chef/knife/exec.rb +2 -2
  73. data/lib/chef/knife/node_show.rb +2 -2
  74. data/lib/chef/knife/serve.rb +3 -3
  75. data/lib/chef/knife/ssh.rb +16 -1
  76. data/lib/chef/knife/ssl_check.rb +3 -3
  77. data/lib/chef/knife/status.rb +2 -2
  78. data/lib/chef/knife/user_create.rb +2 -2
  79. data/lib/chef/knife/yaml_convert.rb +1 -1
  80. data/lib/chef/local_mode.rb +2 -2
  81. data/lib/chef/log/syslog.rb +2 -2
  82. data/lib/chef/log/winevt.rb +2 -2
  83. data/lib/chef/mixin/deep_merge.rb +0 -12
  84. data/lib/chef/mixin/openssl_helper.rb +1 -4
  85. data/lib/chef/mixin/template.rb +2 -2
  86. data/lib/chef/mixin/uris.rb +2 -2
  87. data/lib/chef/mixin/versioned_api.rb +1 -2
  88. data/lib/chef/monkey_patches/net_http.rb +4 -4
  89. data/lib/chef/node_map.rb +2 -2
  90. data/lib/chef/policy_builder/policyfile.rb +2 -2
  91. data/lib/chef/provider.rb +0 -4
  92. data/lib/chef/provider/file.rb +2 -2
  93. data/lib/chef/provider/ifconfig.rb +1 -1
  94. data/lib/chef/provider/launchd.rb +2 -2
  95. data/lib/chef/provider/mount/linux.rb +63 -0
  96. data/lib/chef/provider/package/rubygems.rb +21 -18
  97. data/lib/chef/provider/package/snap.rb +0 -1
  98. data/lib/chef/provider/package/windows.rb +2 -2
  99. data/lib/chef/provider/package/windows/registry_uninstall_entry.rb +3 -1
  100. data/lib/chef/provider/package/zypper.rb +1 -1
  101. data/lib/chef/provider/remote_file/content.rb +3 -0
  102. data/lib/chef/provider/remote_file/ftp.rb +6 -4
  103. data/lib/chef/provider/remote_file/sftp.rb +6 -4
  104. data/lib/chef/provider/route.rb +2 -6
  105. data/lib/chef/provider/service/macosx.rb +2 -2
  106. data/lib/chef/provider/template_finder.rb +2 -10
  107. data/lib/chef/provider/user/dscl.rb +3 -3
  108. data/lib/chef/provider/user/mac.rb +1 -1
  109. data/lib/chef/provider/windows_task.rb +1 -2
  110. data/lib/chef/provider/zypper_repository.rb +2 -2
  111. data/lib/chef/provider_resolver.rb +1 -1
  112. data/lib/chef/providers.rb +1 -0
  113. data/lib/chef/recipe.rb +2 -2
  114. data/lib/chef/resource.rb +1 -1
  115. data/lib/chef/resource/apt_repository.rb +1 -1
  116. data/lib/chef/resource/bff_package.rb +22 -0
  117. data/lib/chef/resource/breakpoint.rb +57 -2
  118. data/lib/chef/resource/build_essential.rb +1 -1
  119. data/lib/chef/resource/cab_package.rb +29 -0
  120. data/lib/chef/resource/chef_client_cron.rb +32 -25
  121. data/lib/chef/resource/chef_client_launchd.rb +194 -0
  122. data/lib/chef/resource/chef_client_scheduled_task.rb +21 -18
  123. data/lib/chef/resource/chef_client_systemd_timer.rb +24 -17
  124. data/lib/chef/resource/chef_client_trusted_certificate.rb +101 -0
  125. data/lib/chef/resource/chef_gem.rb +10 -10
  126. data/lib/chef/resource/chef_handler.rb +148 -4
  127. data/lib/chef/resource/chef_sleep.rb +2 -2
  128. data/lib/chef/resource/chef_vault_secret.rb +1 -1
  129. data/lib/chef/resource/cookbook_file.rb +2 -2
  130. data/lib/chef/resource/cron/cron_d.rb +0 -1
  131. data/lib/chef/resource/dnf_package.rb +2 -2
  132. data/lib/chef/resource/dsc_resource.rb +0 -1
  133. data/lib/chef/resource/dsc_script.rb +2 -2
  134. data/lib/chef/resource/execute.rb +6 -6
  135. data/lib/chef/resource/file.rb +4 -4
  136. data/lib/chef/resource/gem_package.rb +5 -5
  137. data/lib/chef/resource/homebrew_package.rb +3 -3
  138. data/lib/chef/resource/homebrew_update.rb +5 -5
  139. data/lib/chef/resource/hostname.rb +2 -2
  140. data/lib/chef/resource/launchd.rb +2 -1
  141. data/lib/chef/resource/locale.rb +2 -2
  142. data/lib/chef/resource/macos_userdefaults.rb +3 -3
  143. data/lib/chef/resource/notify_group.rb +0 -1
  144. data/lib/chef/resource/ohai.rb +46 -3
  145. data/lib/chef/resource/ohai_hint.rb +33 -0
  146. data/lib/chef/resource/openssl_dhparam.rb +27 -5
  147. data/lib/chef/resource/openssl_ec_private_key.rb +6 -3
  148. data/lib/chef/resource/openssl_ec_public_key.rb +2 -2
  149. data/lib/chef/resource/openssl_rsa_private_key.rb +6 -3
  150. data/lib/chef/resource/openssl_x509_certificate.rb +14 -14
  151. data/lib/chef/resource/openssl_x509_crl.rb +19 -10
  152. data/lib/chef/resource/openssl_x509_request.rb +14 -16
  153. data/lib/chef/resource/osx_profile.rb +77 -13
  154. data/lib/chef/resource/plist.rb +1 -1
  155. data/lib/chef/resource/powershell_package_source.rb +5 -5
  156. data/lib/chef/resource/reboot.rb +2 -2
  157. data/lib/chef/resource/remote_file.rb +3 -3
  158. data/lib/chef/resource/rhsm_register.rb +22 -10
  159. data/lib/chef/resource/ruby_block.rb +2 -2
  160. data/lib/chef/resource/scm/subversion.rb +2 -2
  161. data/lib/chef/resource/service.rb +3 -3
  162. data/lib/chef/resource/ssh_known_hosts_entry.rb +2 -2
  163. data/lib/chef/resource/support/cron.d.erb +1 -1
  164. data/lib/chef/resource/support/cron_access.erb +1 -1
  165. data/lib/chef/resource/support/sudoer.erb +1 -1
  166. data/lib/chef/resource/support/ulimit.erb +1 -1
  167. data/lib/chef/resource/sysctl.rb +1 -5
  168. data/lib/chef/resource/systemd_unit.rb +2 -2
  169. data/lib/chef/resource/template.rb +2 -2
  170. data/lib/chef/resource/windows_ad_join.rb +10 -3
  171. data/lib/chef/resource/windows_certificate.rb +6 -4
  172. data/lib/chef/resource/windows_firewall_profile.rb +22 -20
  173. data/lib/chef/resource/windows_package.rb +28 -5
  174. data/lib/chef/resource/windows_printer.rb +5 -3
  175. data/lib/chef/resource/windows_printer_port.rb +6 -4
  176. data/lib/chef/resource/windows_user_privilege.rb +53 -54
  177. data/lib/chef/resource/windows_workgroup.rb +3 -3
  178. data/lib/chef/resource/yum_package.rb +2 -2
  179. data/lib/chef/resources.rb +3 -1
  180. data/lib/chef/run_context.rb +2 -2
  181. data/lib/chef/run_context/cookbook_compiler.rb +1 -1
  182. data/lib/chef/run_lock.rb +2 -2
  183. data/lib/chef/search/query.rb +4 -5
  184. data/lib/chef/shell.rb +31 -26
  185. data/lib/chef/shell/ext.rb +11 -11
  186. data/lib/chef/shell/shell_session.rb +2 -2
  187. data/lib/chef/train_transport.rb +5 -104
  188. data/lib/chef/util/diff.rb +3 -3
  189. data/lib/chef/util/powershell/cmdlet.rb +3 -1
  190. data/lib/chef/util/powershell/ps_credential.rb +18 -14
  191. data/lib/chef/util/threaded_job_queue.rb +0 -2
  192. data/lib/chef/version.rb +1 -1
  193. data/lib/chef/win32/crypto.rb +1 -1
  194. data/lib/chef/win32/registry.rb +1 -2
  195. data/spec/data/shef-config.rb +1 -1
  196. data/spec/functional/event_loggers/windows_eventlog_spec.rb +6 -5
  197. data/spec/functional/resource/aix_service_spec.rb +2 -2
  198. data/spec/functional/resource/aixinit_service_spec.rb +1 -1
  199. data/spec/functional/resource/insserv_spec.rb +1 -1
  200. data/spec/functional/resource/user/dscl_spec.rb +1 -1
  201. data/spec/functional/resource/user/mac_user_spec.rb +1 -1
  202. data/spec/functional/resource/windows_task_spec.rb +13 -13
  203. data/spec/functional/version_spec.rb +3 -3
  204. data/spec/integration/client/client_spec.rb +4 -4
  205. data/spec/integration/client/exit_code_spec.rb +3 -2
  206. data/spec/integration/client/ipv6_spec.rb +1 -1
  207. data/spec/integration/knife/{config_list_profiles_spec.rb → config_list_spec.rb} +30 -29
  208. data/spec/integration/knife/{config_get_spec.rb → config_show_spec.rb} +3 -3
  209. data/spec/integration/knife/{config_use_profile_spec.rb → config_use_spec.rb} +53 -10
  210. data/spec/integration/knife/cookbook_api_ipv6_spec.rb +1 -1
  211. data/spec/integration/ohai/ohai_spec.rb +61 -0
  212. data/spec/integration/recipes/remote_directory.rb +1 -1
  213. data/spec/integration/solo/solo_spec.rb +5 -5
  214. data/spec/spec_helper.rb +6 -3
  215. data/spec/stress/win32/file_spec.rb +1 -1
  216. data/spec/support/chef_helpers.rb +2 -2
  217. data/spec/support/matchers/leak.rb +2 -2
  218. data/spec/support/platform_helpers.rb +16 -34
  219. data/spec/support/shared/functional/securable_resource.rb +108 -27
  220. data/spec/support/shared/functional/win32_service.rb +1 -1
  221. data/spec/support/shared/unit/application_dot_d.rb +5 -3
  222. data/spec/tiny_server.rb +0 -1
  223. data/spec/unit/application/client_spec.rb +2 -2
  224. data/spec/unit/application/exit_code_spec.rb +10 -0
  225. data/spec/unit/application_spec.rb +4 -6
  226. data/spec/unit/chef_fs/parallelizer_spec.rb +5 -1
  227. data/spec/unit/chef_fs/path_util_spec.rb +1 -1
  228. data/spec/unit/cookbook/synchronizer_spec.rb +2 -2
  229. data/spec/unit/cookbook_spec.rb +2 -2
  230. data/spec/unit/data_collector/config_validation_spec.rb +208 -0
  231. data/spec/unit/data_collector_spec.rb +0 -113
  232. data/spec/unit/dsl/declare_resource_spec.rb +1 -1
  233. data/spec/unit/file_access_control_spec.rb +1 -1
  234. data/spec/unit/knife/bootstrap_spec.rb +6 -6
  235. data/spec/unit/knife/core/ui_spec.rb +1 -0
  236. data/spec/unit/knife/ssh_spec.rb +2 -2
  237. data/spec/unit/lwrp_spec.rb +3 -3
  238. data/spec/unit/mixin/deep_merge_spec.rb +15 -0
  239. data/spec/unit/mixin/openssl_helper_spec.rb +1 -1
  240. data/spec/unit/mixin/powershell_exec_spec.rb +1 -1
  241. data/spec/unit/mixin/securable_spec.rb +2 -2
  242. data/spec/unit/node/immutable_collections_spec.rb +2 -2
  243. data/spec/unit/provider/mount/linux_spec.rb +97 -0
  244. data/spec/unit/provider/package/chocolatey_spec.rb +1 -1
  245. data/spec/unit/provider/package/powershell_spec.rb +1 -1
  246. data/spec/unit/provider/package/rubygems_spec.rb +4 -1
  247. data/spec/unit/provider/route_spec.rb +0 -2
  248. data/spec/unit/recipe_spec.rb +1 -1
  249. data/spec/unit/resource/chef_client_cron_spec.rb +35 -14
  250. data/spec/unit/resource/chef_client_launchd_spec.rb +127 -0
  251. data/spec/unit/resource/chef_client_systemd_timer_spec.rb +36 -1
  252. data/spec/unit/resource/chef_client_trusted_certificate_spec.rb +54 -0
  253. data/spec/unit/resource/launchd_spec.rb +8 -0
  254. data/spec/unit/resource/osx_profile_spec.rb +67 -1
  255. data/spec/unit/resource/rhsm_register_spec.rb +56 -18
  256. data/spec/unit/resource/windows_uac_spec.rb +1 -1
  257. data/spec/unit/resource/windows_user_privilege_spec.rb +55 -0
  258. data/spec/unit/run_lock_spec.rb +5 -1
  259. data/spec/unit/runner_spec.rb +1 -2
  260. data/spec/unit/shell/shell_ext_spec.rb +46 -3
  261. data/spec/unit/shell/shell_session_spec.rb +35 -64
  262. data/spec/unit/shell_spec.rb +16 -19
  263. data/spec/unit/train_transport_spec.rb +14 -13
  264. data/spec/unit/util/selinux_spec.rb +2 -0
  265. data/tasks/rspec.rb +0 -2
  266. metadata +41 -17
  267. data/lib/chef/dist.rb +0 -68
  268. data/spec/integration/knife/config_get_profile_spec.rb +0 -114
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.4.41
4
+ version: 16.5.64
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-19 00:00:00.000000000 Z
11
+ date: 2020-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-config
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 16.4.41
19
+ version: 16.5.64
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 16.4.41
26
+ version: 16.5.64
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: chef-utils
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 16.4.41
33
+ version: 16.5.64
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 16.4.41
40
+ version: 16.5.64
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: train-core
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -76,22 +76,22 @@ dependencies:
76
76
  name: license-acceptance
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '1.0'
82
79
  - - ">="
83
80
  - !ruby/object:Gem::Version
84
81
  version: 1.0.5
82
+ - - "<"
83
+ - !ruby/object:Gem::Version
84
+ version: '3'
85
85
  type: :runtime
86
86
  prerelease: false
87
87
  version_requirements: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - "~>"
90
- - !ruby/object:Gem::Version
91
- version: '1.0'
92
89
  - - ">="
93
90
  - !ruby/object:Gem::Version
94
91
  version: 1.0.5
92
+ - - "<"
93
+ - !ruby/object:Gem::Version
94
+ version: '3'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: mixlib-cli
97
97
  requirement: !ruby/object:Gem::Requirement
@@ -370,6 +370,20 @@ dependencies:
370
370
  - - "~>"
371
371
  - !ruby/object:Gem::Version
372
372
  version: '0.6'
373
+ - !ruby/object:Gem::Dependency
374
+ name: tty-table
375
+ requirement: !ruby/object:Gem::Requirement
376
+ requirements:
377
+ - - "~>"
378
+ - !ruby/object:Gem::Version
379
+ version: 0.11.0
380
+ type: :runtime
381
+ prerelease: false
382
+ version_requirements: !ruby/object:Gem::Requirement
383
+ requirements:
384
+ - - "~>"
385
+ - !ruby/object:Gem::Version
386
+ version: 0.11.0
373
387
  - !ruby/object:Gem::Dependency
374
388
  name: pastel
375
389
  requirement: !ruby/object:Gem::Requirement
@@ -740,7 +754,6 @@ files:
740
754
  - lib/chef/deprecated.rb
741
755
  - lib/chef/deprecation/warnings.rb
742
756
  - lib/chef/digester.rb
743
- - lib/chef/dist.rb
744
757
  - lib/chef/dsl.rb
745
758
  - lib/chef/dsl/chef_vault.rb
746
759
  - lib/chef/dsl/cheffish.rb
@@ -854,7 +867,10 @@ files:
854
867
  - lib/chef/knife/client_show.rb
855
868
  - lib/chef/knife/config_get.rb
856
869
  - lib/chef/knife/config_get_profile.rb
870
+ - lib/chef/knife/config_list.rb
857
871
  - lib/chef/knife/config_list_profiles.rb
872
+ - lib/chef/knife/config_show.rb
873
+ - lib/chef/knife/config_use.rb
858
874
  - lib/chef/knife/config_use_profile.rb
859
875
  - lib/chef/knife/configure.rb
860
876
  - lib/chef/knife/configure_client.rb
@@ -1096,6 +1112,7 @@ files:
1096
1112
  - lib/chef/provider/lwrp_base.rb
1097
1113
  - lib/chef/provider/mount.rb
1098
1114
  - lib/chef/provider/mount/aix.rb
1115
+ - lib/chef/provider/mount/linux.rb
1099
1116
  - lib/chef/provider/mount/mount.rb
1100
1117
  - lib/chef/provider/mount/solaris.rb
1101
1118
  - lib/chef/provider/mount/windows.rb
@@ -1225,8 +1242,10 @@ files:
1225
1242
  - lib/chef/resource/build_essential.rb
1226
1243
  - lib/chef/resource/cab_package.rb
1227
1244
  - lib/chef/resource/chef_client_cron.rb
1245
+ - lib/chef/resource/chef_client_launchd.rb
1228
1246
  - lib/chef/resource/chef_client_scheduled_task.rb
1229
1247
  - lib/chef/resource/chef_client_systemd_timer.rb
1248
+ - lib/chef/resource/chef_client_trusted_certificate.rb
1230
1249
  - lib/chef/resource/chef_gem.rb
1231
1250
  - lib/chef/resource/chef_handler.rb
1232
1251
  - lib/chef/resource/chef_sleep.rb
@@ -1994,10 +2013,9 @@ files:
1994
2013
  - spec/integration/knife/client_list_spec.rb
1995
2014
  - spec/integration/knife/client_show_spec.rb
1996
2015
  - spec/integration/knife/common_options_spec.rb
1997
- - spec/integration/knife/config_get_profile_spec.rb
1998
- - spec/integration/knife/config_get_spec.rb
1999
- - spec/integration/knife/config_list_profiles_spec.rb
2000
- - spec/integration/knife/config_use_profile_spec.rb
2016
+ - spec/integration/knife/config_list_spec.rb
2017
+ - spec/integration/knife/config_show_spec.rb
2018
+ - spec/integration/knife/config_use_spec.rb
2001
2019
  - spec/integration/knife/cookbook_api_ipv6_spec.rb
2002
2020
  - spec/integration/knife/cookbook_bulk_delete_spec.rb
2003
2021
  - spec/integration/knife/cookbook_download_spec.rb
@@ -2043,6 +2061,7 @@ files:
2043
2061
  - spec/integration/knife/serve_spec.rb
2044
2062
  - spec/integration/knife/show_spec.rb
2045
2063
  - spec/integration/knife/upload_spec.rb
2064
+ - spec/integration/ohai/ohai_spec.rb
2046
2065
  - spec/integration/recipes/accumulator_spec.rb
2047
2066
  - spec/integration/recipes/lwrp_inline_resources_spec.rb
2048
2067
  - spec/integration/recipes/lwrp_spec.rb
@@ -2166,6 +2185,7 @@ files:
2166
2185
  - spec/unit/daemon_spec.rb
2167
2186
  - spec/unit/data_bag_item_spec.rb
2168
2187
  - spec/unit/data_bag_spec.rb
2188
+ - spec/unit/data_collector/config_validation_spec.rb
2169
2189
  - spec/unit/data_collector_spec.rb
2170
2190
  - spec/unit/decorator/lazy_array_spec.rb
2171
2191
  - spec/unit/decorator/lazy_spec.rb
@@ -2397,6 +2417,7 @@ files:
2397
2417
  - spec/unit/provider/log_spec.rb
2398
2418
  - spec/unit/provider/mdadm_spec.rb
2399
2419
  - spec/unit/provider/mount/aix_spec.rb
2420
+ - spec/unit/provider/mount/linux_spec.rb
2400
2421
  - spec/unit/provider/mount/mount_spec.rb
2401
2422
  - spec/unit/provider/mount/solaris_spec.rb
2402
2423
  - spec/unit/provider/mount/windows_spec.rb
@@ -2500,8 +2521,10 @@ files:
2500
2521
  - spec/unit/resource/build_essential_spec.rb
2501
2522
  - spec/unit/resource/cab_package_spec.rb
2502
2523
  - spec/unit/resource/chef_client_cron_spec.rb
2524
+ - spec/unit/resource/chef_client_launchd_spec.rb
2503
2525
  - spec/unit/resource/chef_client_scheduled_task_spec.rb
2504
2526
  - spec/unit/resource/chef_client_systemd_timer_spec.rb
2527
+ - spec/unit/resource/chef_client_trusted_certificate_spec.rb
2505
2528
  - spec/unit/resource/chef_gem_spec.rb
2506
2529
  - spec/unit/resource/chef_handler_spec.rb
2507
2530
  - spec/unit/resource/chef_sleep_spec.rb
@@ -2633,6 +2656,7 @@ files:
2633
2656
  - spec/unit/resource/windows_shortcut_spec.rb
2634
2657
  - spec/unit/resource/windows_task_spec.rb
2635
2658
  - spec/unit/resource/windows_uac_spec.rb
2659
+ - spec/unit/resource/windows_user_privilege_spec.rb
2636
2660
  - spec/unit/resource/windows_workgroup_spec.rb
2637
2661
  - spec/unit/resource/yum_package_spec.rb
2638
2662
  - spec/unit/resource/yum_repository_spec.rb
@@ -1,68 +0,0 @@
1
- class Chef
2
- class Dist
3
- require "chef-config/dist"
4
- require "chef-config/config"
5
-
6
- # This class is not fully implemented, depending on it is not recommended!
7
- # When referencing a product directly, like Chef (Now Chef Infra)
8
- PRODUCT = "Chef Infra Client".freeze
9
-
10
- # A short designation for the product, used in Windows event logs
11
- # and some nomenclature.
12
- SHORT = ChefConfig::Dist::SHORT.freeze
13
-
14
- # The name of the server product
15
- SERVER_PRODUCT = "Chef Infra Server".freeze
16
-
17
- # The client's alias (chef-client)
18
- CLIENT = ChefConfig::Dist::CLIENT.freeze
19
-
20
- # name of the automate product
21
- AUTOMATE = "Chef Automate".freeze
22
-
23
- # The chef executable, as in `chef gem install` or `chef generate cookbook`
24
- EXEC = ChefConfig::Dist::EXEC.freeze
25
-
26
- # product website address
27
- WEBSITE = "https://chef.io".freeze
28
-
29
- # Chef-Zero's product name
30
- ZERO = "Chef Infra Zero".freeze
31
-
32
- # Chef-Solo's product name
33
- SOLO = "Chef Infra Solo".freeze
34
-
35
- # The chef-zero executable (local mode)
36
- ZEROEXEC = "chef-zero".freeze
37
-
38
- # The chef-solo executable (legacy local mode)
39
- SOLOEXEC = "chef-solo".freeze
40
-
41
- # The chef-shell executable
42
- SHELL = "chef-shell".freeze
43
-
44
- # The chef-apply executable
45
- APPLY = "chef-apply".freeze
46
-
47
- # Configuration related constants
48
- # The chef-shell configuration file
49
- SHELL_CONF = "chef_shell.rb".freeze
50
-
51
- # The configuration directory
52
- CONF_DIR = ChefConfig::Config.etc_chef_dir.freeze
53
-
54
- # The user's configuration directory
55
- USER_CONF_DIR = ChefConfig::Dist::USER_CONF_DIR.freeze
56
-
57
- # The suffix for Chef's /etc/chef, /var/chef and C:\\Chef directories
58
- # "cinc" => /etc/cinc, /var/cinc, C:\\cinc
59
- DIR_SUFFIX = ChefConfig::Dist::DIR_SUFFIX.freeze
60
-
61
- # The legacy conf folder: C:/opscode/chef. Specifically the "opscode" part
62
- # DIR_SUFFIX is appended to it in code where relevant
63
- LEGACY_CONF_DIR = ChefConfig::Dist::LEGACY_CONF_DIR.freeze
64
-
65
- # The server's configuration directory
66
- SERVER_CONF_DIR = "/etc/chef-server".freeze
67
- end
68
- end
@@ -1,114 +0,0 @@
1
- #
2
- # Copyright 2018, Noah Kantrowitz
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
- require "spec_helper"
17
- require "support/shared/integration/integration_helper"
18
- require "support/shared/context/config"
19
-
20
- describe "knife config get-profile", :workstation do
21
- include IntegrationSupport
22
- include KnifeSupport
23
-
24
- include_context "default config options"
25
-
26
- let(:cmd_args) { [] }
27
-
28
- when_the_repository("has a custom env") do
29
- subject do
30
- cmd = knife("config", "get-profile", *cmd_args, instance_filter: lambda { |instance|
31
- # Fake the failsafe check because this command doesn't actually process knife.rb.
32
- $__KNIFE_INTEGRATION_FAILSAFE_CHECK << " ole"
33
- })
34
- cmd.stdout
35
- end
36
-
37
- around do |ex|
38
- # Store and reset the value of some env vars.
39
- old_chef_home = ENV["CHEF_HOME"]
40
- old_knife_home = ENV["KNIFE_HOME"]
41
- old_home = ENV["HOME"]
42
- old_wd = Dir.pwd
43
- ChefConfig::PathHelper.per_tool_home_environment = "KNIFE_HOME"
44
- # Clear these out because they are cached permanently.
45
- ChefConfig::PathHelper.class_exec { remove_class_variable(:@@home_dir) }
46
- Chef::Knife::ConfigGetProfile.reset_config_loader!
47
- begin
48
- ex.run
49
- ensure
50
- ENV["CHEF_HOME"] = old_chef_home
51
- ENV["KNIFE_HOME"] = old_knife_home
52
- ENV["HOME"] = old_home
53
- Dir.chdir(old_wd)
54
- ENV[ChefUtils.windows? ? "CD" : "PWD"] = Dir.pwd
55
- ChefConfig::PathHelper.per_tool_home_environment = nil
56
- end
57
- end
58
-
59
- before do
60
- # Always run from the temp folder. This can't be in the `around` block above
61
- # because it has to run after the before set in the "with a chef repo" shared context.
62
- directory("repo")
63
- Dir.chdir(path_to("repo"))
64
- ENV[ChefUtils.windows? ? "CD" : "PWD"] = Dir.pwd
65
- ENV["HOME"] = path_to(".")
66
- end
67
-
68
- context "with no configuration" do
69
- it { is_expected.to eq "default\n" }
70
- end
71
-
72
- context "with --profile" do
73
- let(:cmd_args) { %w{--profile production} }
74
- it { is_expected.to eq "production\n" }
75
- end
76
-
77
- context "with an environment variable" do
78
- around do |ex|
79
- old_chef_profile = ENV["CHEF_PROFILE"]
80
- begin
81
- ENV["CHEF_PROFILE"] = "staging"
82
- ex.run
83
- ensure
84
- ENV["CHEF_PROFILE"] = old_chef_profile
85
- end
86
- end
87
-
88
- it { is_expected.to eq "staging\n" }
89
- end
90
-
91
- context "with a context file" do
92
- before { file(".chef/context", "development\n") }
93
- it { is_expected.to eq "development\n" }
94
- end
95
-
96
- context "with a context file under $CHEF_HOME" do
97
- before do
98
- file("chefhome/.chef/context", "other\n")
99
- ENV["CHEF_HOME"] = path_to("chefhome")
100
- end
101
-
102
- it { is_expected.to eq "other\n" }
103
- end
104
-
105
- context "with a context file under $KNIFE_HOME" do
106
- before do
107
- file("knifehome/.chef/context", "other\n")
108
- ENV["KNIFE_HOME"] = path_to("knifehome")
109
- end
110
-
111
- it { is_expected.to eq "other\n" }
112
- end
113
- end
114
- end