chef 14.14.29-universal-mingw32 → 14.15.6-universal-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (366) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +18 -7
  4. data/Rakefile +7 -4
  5. data/chef.gemspec +1 -1
  6. data/lib/chef/knife/ssh.rb +6 -0
  7. data/lib/chef/provider/ifconfig.rb +14 -5
  8. data/lib/chef/provider/windows_task.rb +9 -5
  9. data/lib/chef/resource/kernel_module.rb +61 -0
  10. data/lib/chef/resource/windows_task.rb +4 -0
  11. data/lib/chef/version.rb +1 -1
  12. data/spec/data/cookbooks/openldap/metadata.rb +2 -2
  13. data/spec/data/metadata/quick_start/metadata.rb +2 -7
  14. data/spec/functional/audit/runner_spec.rb +1 -1
  15. data/spec/functional/dsl/reboot_pending_spec.rb +7 -25
  16. data/spec/functional/event_loggers/windows_eventlog_spec.rb +6 -4
  17. data/spec/functional/file_content_management/deploy_strategies_spec.rb +21 -21
  18. data/spec/functional/knife/exec_spec.rb +1 -1
  19. data/spec/functional/knife/ssh_spec.rb +3 -3
  20. data/spec/functional/mixin/user_context_spec.rb +3 -1
  21. data/spec/functional/rebooter_spec.rb +1 -1
  22. data/spec/functional/resource/aix_service_spec.rb +1 -1
  23. data/spec/functional/resource/aixinit_service_spec.rb +1 -1
  24. data/spec/functional/resource/apt_package_spec.rb +1 -1
  25. data/spec/functional/resource/chocolatey_package_spec.rb +2 -2
  26. data/spec/functional/resource/cookbook_file_spec.rb +1 -3
  27. data/spec/functional/resource/cron_spec.rb +4 -3
  28. data/spec/functional/resource/dpkg_package_spec.rb +4 -4
  29. data/spec/functional/resource/dsc_resource_spec.rb +2 -1
  30. data/spec/functional/resource/dsc_script_spec.rb +16 -20
  31. data/spec/functional/resource/execute_spec.rb +2 -2
  32. data/spec/functional/resource/git_spec.rb +6 -6
  33. data/spec/functional/resource/group_spec.rb +8 -6
  34. data/spec/functional/resource/ifconfig_spec.rb +3 -5
  35. data/spec/functional/resource/link_spec.rb +2 -2
  36. data/spec/functional/resource/mount_spec.rb +3 -7
  37. data/spec/functional/resource/powershell_script_spec.rb +9 -8
  38. data/spec/functional/resource/reboot_spec.rb +1 -1
  39. data/spec/functional/resource/remote_file_spec.rb +2 -2
  40. data/spec/functional/resource/template_spec.rb +1 -1
  41. data/spec/functional/resource/user/windows_spec.rb +2 -2
  42. data/spec/functional/resource/windows_certificate_spec.rb +3 -3
  43. data/spec/functional/resource/windows_service_spec.rb +3 -3
  44. data/spec/functional/resource/windows_task_spec.rb +51 -0
  45. data/spec/functional/run_lock_spec.rb +10 -3
  46. data/spec/functional/shell_spec.rb +1 -1
  47. data/spec/functional/util/powershell/cmdlet_spec.rb +1 -1
  48. data/spec/functional/version_spec.rb +1 -1
  49. data/spec/functional/win32/security_spec.rb +12 -7
  50. data/spec/functional/win32/service_manager_spec.rb +1 -1
  51. data/spec/functional/win32/version_info_spec.rb +4 -4
  52. data/spec/integration/client/client_spec.rb +114 -132
  53. data/spec/integration/client/exit_code_spec.rb +8 -8
  54. data/spec/integration/client/ipv6_spec.rb +5 -5
  55. data/spec/integration/knife/chef_fs_data_store_spec.rb +38 -38
  56. data/spec/integration/knife/chef_repo_path_spec.rb +42 -42
  57. data/spec/integration/knife/chef_repository_file_system_spec.rb +9 -9
  58. data/spec/integration/knife/chefignore_spec.rb +13 -13
  59. data/spec/integration/knife/client_bulk_delete_spec.rb +8 -8
  60. data/spec/integration/knife/client_create_spec.rb +1 -1
  61. data/spec/integration/knife/client_delete_spec.rb +4 -4
  62. data/spec/integration/knife/client_key_delete_spec.rb +1 -1
  63. data/spec/integration/knife/client_key_list_spec.rb +1 -1
  64. data/spec/integration/knife/client_list_spec.rb +1 -1
  65. data/spec/integration/knife/common_options_spec.rb +1 -1
  66. data/spec/integration/knife/config_get_spec.rb +1 -1
  67. data/spec/integration/knife/config_list_profiles_spec.rb +2 -1
  68. data/spec/integration/knife/cookbook_api_ipv6_spec.rb +3 -3
  69. data/spec/integration/knife/cookbook_bulk_delete_spec.rb +3 -3
  70. data/spec/integration/knife/cookbook_download_spec.rb +4 -4
  71. data/spec/integration/knife/cookbook_list_spec.rb +2 -2
  72. data/spec/integration/knife/cookbook_show_spec.rb +3 -3
  73. data/spec/integration/knife/cookbook_upload_spec.rb +6 -6
  74. data/spec/integration/knife/data_bag_delete_spec.rb +4 -4
  75. data/spec/integration/knife/data_bag_from_file_spec.rb +7 -7
  76. data/spec/integration/knife/data_bag_list_spec.rb +1 -1
  77. data/spec/integration/knife/delete_spec.rb +37 -37
  78. data/spec/integration/knife/deps_spec.rb +23 -23
  79. data/spec/integration/knife/diff_spec.rb +23 -23
  80. data/spec/integration/knife/download_spec.rb +79 -79
  81. data/spec/integration/knife/environment_compare_spec.rb +3 -3
  82. data/spec/integration/knife/environment_from_file_spec.rb +6 -6
  83. data/spec/integration/knife/environment_list_spec.rb +1 -1
  84. data/spec/integration/knife/environment_show_spec.rb +4 -4
  85. data/spec/integration/knife/list_spec.rb +25 -25
  86. data/spec/integration/knife/node_bulk_delete_spec.rb +2 -2
  87. data/spec/integration/knife/node_delete_spec.rb +2 -2
  88. data/spec/integration/knife/node_environment_set_spec.rb +1 -1
  89. data/spec/integration/knife/node_from_file_spec.rb +2 -2
  90. data/spec/integration/knife/node_list_spec.rb +1 -1
  91. data/spec/integration/knife/raw_spec.rb +12 -12
  92. data/spec/integration/knife/redirection_spec.rb +1 -1
  93. data/spec/integration/knife/role_bulk_delete_spec.rb +2 -2
  94. data/spec/integration/knife/role_delete_spec.rb +2 -2
  95. data/spec/integration/knife/role_from_file_spec.rb +5 -5
  96. data/spec/integration/knife/role_list_spec.rb +1 -1
  97. data/spec/integration/knife/role_show_spec.rb +1 -1
  98. data/spec/integration/knife/show_spec.rb +10 -10
  99. data/spec/integration/knife/upload_spec.rb +85 -85
  100. data/spec/integration/recipes/accumulator_spec.rb +4 -4
  101. data/spec/integration/recipes/lwrp_inline_resources_spec.rb +6 -6
  102. data/spec/integration/recipes/lwrp_spec.rb +6 -6
  103. data/spec/integration/recipes/notifies_spec.rb +45 -45
  104. data/spec/integration/recipes/notifying_block_spec.rb +4 -4
  105. data/spec/integration/recipes/provider_choice.rb +1 -2
  106. data/spec/integration/recipes/recipe_dsl_spec.rb +9 -9
  107. data/spec/integration/recipes/remote_directory.rb +2 -2
  108. data/spec/integration/recipes/resource_action_spec.rb +1 -1
  109. data/spec/integration/recipes/resource_converge_if_changed_spec.rb +19 -19
  110. data/spec/integration/solo/solo_spec.rb +29 -29
  111. data/spec/scripts/ssl-serve.rb +1 -1
  112. data/spec/spec_helper.rb +11 -14
  113. data/spec/stress/win32/security_spec.rb +1 -1
  114. data/spec/support/lib/chef/resource/zen_follower.rb +1 -1
  115. data/spec/support/lib/chef/resource/zen_master.rb +1 -1
  116. data/spec/support/mock/platform.rb +2 -2
  117. data/spec/support/platform_helpers.rb +12 -3
  118. data/spec/support/platforms/win32/spec_service.rb +6 -10
  119. data/spec/support/shared/context/client.rb +2 -1
  120. data/spec/support/shared/functional/execute_resource.rb +4 -4
  121. data/spec/support/shared/functional/file_resource.rb +1 -3
  122. data/spec/support/shared/functional/http.rb +20 -44
  123. data/spec/support/shared/functional/securable_resource.rb +4 -8
  124. data/spec/support/shared/functional/win32_service.rb +1 -1
  125. data/spec/support/shared/functional/windows_script.rb +2 -1
  126. data/spec/support/shared/integration/app_server_support.rb +3 -4
  127. data/spec/support/shared/integration/integration_helper.rb +1 -0
  128. data/spec/support/shared/integration/knife_support.rb +5 -5
  129. data/spec/support/shared/unit/application_dot_d.rb +10 -4
  130. data/spec/support/shared/unit/file_system_support.rb +3 -2
  131. data/spec/support/shared/unit/platform_introspector.rb +12 -12
  132. data/spec/support/shared/unit/provider/file.rb +1 -1
  133. data/spec/support/shared/unit/script_resource.rb +1 -1
  134. data/spec/support/shared/unit/windows_script_resource.rb +1 -1
  135. data/spec/tiny_server.rb +1 -1
  136. data/spec/unit/api_client/registration_spec.rb +1 -1
  137. data/spec/unit/api_client_spec.rb +5 -5
  138. data/spec/unit/api_client_v1_spec.rb +6 -6
  139. data/spec/unit/application/client_spec.rb +8 -8
  140. data/spec/unit/application/exit_code_spec.rb +3 -2
  141. data/spec/unit/application/knife_spec.rb +1 -2
  142. data/spec/unit/audit/audit_event_proxy_spec.rb +14 -7
  143. data/spec/unit/audit/audit_reporter_spec.rb +20 -11
  144. data/spec/unit/audit/control_group_data_spec.rb +17 -12
  145. data/spec/unit/chef_fs/config_spec.rb +3 -3
  146. data/spec/unit/chef_fs/file_system/repository/directory_spec.rb +1 -1
  147. data/spec/unit/chef_fs/parallelizer.rb +1 -1
  148. data/spec/unit/client_spec.rb +3 -3
  149. data/spec/unit/config_fetcher_spec.rb +1 -1
  150. data/spec/unit/cookbook/metadata_spec.rb +13 -13
  151. data/spec/unit/cookbook/synchronizer_spec.rb +6 -6
  152. data/spec/unit/cookbook_loader_spec.rb +17 -17
  153. data/spec/unit/cookbook_manifest_spec.rb +9 -9
  154. data/spec/unit/cookbook_site_streaming_uploader_spec.rb +1 -2
  155. data/spec/unit/cookbook_uploader_spec.rb +2 -2
  156. data/spec/unit/cookbook_version_file_specificity_spec.rb +9 -9
  157. data/spec/unit/cookbook_version_spec.rb +2 -2
  158. data/spec/unit/data_bag_item_spec.rb +7 -7
  159. data/spec/unit/data_bag_spec.rb +1 -1
  160. data/spec/unit/data_collector_spec.rb +23 -23
  161. data/spec/unit/decorator_spec.rb +2 -2
  162. data/spec/unit/deprecated_spec.rb +2 -2
  163. data/spec/unit/dsl/data_query_spec.rb +3 -2
  164. data/spec/unit/dsl/declare_resource_spec.rb +1 -1
  165. data/spec/unit/dsl/platform_introspection_spec.rb +2 -2
  166. data/spec/unit/encrypted_data_bag_item/check_encrypted_spec.rb +2 -1
  167. data/spec/unit/encrypted_data_bag_item_spec.rb +2 -1
  168. data/spec/unit/environment_spec.rb +13 -13
  169. data/spec/unit/event_dispatch/dsl_spec.rb +1 -1
  170. data/spec/unit/file_content_management/deploy/mv_unix_spec.rb +3 -3
  171. data/spec/unit/file_content_management/deploy/mv_windows_spec.rb +2 -2
  172. data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +3 -3
  173. data/spec/unit/guard_interpreter/resource_guard_interpreter_spec.rb +1 -1
  174. data/spec/unit/http/authenticator_spec.rb +4 -3
  175. data/spec/unit/http/json_input_spec.rb +1 -1
  176. data/spec/unit/http/socketless_chef_zero_client_spec.rb +15 -15
  177. data/spec/unit/key_spec.rb +8 -8
  178. data/spec/unit/knife/bootstrap_spec.rb +14 -10
  179. data/spec/unit/knife/client_bulk_delete_spec.rb +4 -4
  180. data/spec/unit/knife/configure_client_spec.rb +1 -1
  181. data/spec/unit/knife/configure_spec.rb +1 -1
  182. data/spec/unit/knife/cookbook_bulk_delete_spec.rb +1 -1
  183. data/spec/unit/knife/cookbook_delete_spec.rb +2 -2
  184. data/spec/unit/knife/cookbook_download_spec.rb +2 -2
  185. data/spec/unit/knife/cookbook_metadata_spec.rb +4 -4
  186. data/spec/unit/knife/cookbook_upload_spec.rb +7 -5
  187. data/spec/unit/knife/core/bootstrap_context_spec.rb +1 -1
  188. data/spec/unit/knife/core/cookbook_scm_repo_spec.rb +2 -2
  189. data/spec/unit/knife/core/gem_glob_loader_spec.rb +4 -4
  190. data/spec/unit/knife/core/hashed_command_loader_spec.rb +4 -2
  191. data/spec/unit/knife/core/node_editor_spec.rb +12 -12
  192. data/spec/unit/knife/core/ui_spec.rb +11 -11
  193. data/spec/unit/knife/data_bag_from_file_spec.rb +2 -1
  194. data/spec/unit/knife/data_bag_show_spec.rb +2 -1
  195. data/spec/unit/knife/key_create_spec.rb +1 -1
  196. data/spec/unit/knife/key_delete_spec.rb +3 -3
  197. data/spec/unit/knife/key_edit_spec.rb +4 -4
  198. data/spec/unit/knife/key_list_spec.rb +1 -1
  199. data/spec/unit/knife/key_show_spec.rb +3 -3
  200. data/spec/unit/knife/node_bulk_delete_spec.rb +3 -3
  201. data/spec/unit/knife/node_delete_spec.rb +2 -2
  202. data/spec/unit/knife/node_edit_spec.rb +1 -1
  203. data/spec/unit/knife/node_environment_set_spec.rb +1 -1
  204. data/spec/unit/knife/node_from_file_spec.rb +1 -1
  205. data/spec/unit/knife/node_policy_set_spec.rb +1 -1
  206. data/spec/unit/knife/node_run_list_add_spec.rb +1 -1
  207. data/spec/unit/knife/node_run_list_remove_spec.rb +1 -1
  208. data/spec/unit/knife/node_run_list_set_spec.rb +1 -1
  209. data/spec/unit/knife/node_show_spec.rb +1 -1
  210. data/spec/unit/knife/raw_spec.rb +2 -2
  211. data/spec/unit/knife/role_bulk_delete_spec.rb +2 -2
  212. data/spec/unit/knife/role_create_spec.rb +1 -1
  213. data/spec/unit/knife/role_delete_spec.rb +1 -1
  214. data/spec/unit/knife/role_edit_spec.rb +1 -1
  215. data/spec/unit/knife/role_env_run_list_add_spec.rb +1 -1
  216. data/spec/unit/knife/role_env_run_list_clear_spec.rb +1 -1
  217. data/spec/unit/knife/role_env_run_list_remove_spec.rb +1 -1
  218. data/spec/unit/knife/role_env_run_list_replace_spec.rb +1 -1
  219. data/spec/unit/knife/role_env_run_list_set_spec.rb +1 -1
  220. data/spec/unit/knife/role_from_file_spec.rb +1 -1
  221. data/spec/unit/knife/role_run_list_add_spec.rb +1 -1
  222. data/spec/unit/knife/role_run_list_clear_spec.rb +1 -1
  223. data/spec/unit/knife/role_run_list_remove_spec.rb +1 -1
  224. data/spec/unit/knife/role_run_list_replace_spec.rb +1 -1
  225. data/spec/unit/knife/role_run_list_set_spec.rb +1 -1
  226. data/spec/unit/knife/ssh_spec.rb +27 -17
  227. data/spec/unit/knife/ssl_check_spec.rb +4 -4
  228. data/spec/unit/knife/ssl_fetch_spec.rb +5 -5
  229. data/spec/unit/knife/status_spec.rb +3 -2
  230. data/spec/unit/knife/supermarket_download_spec.rb +4 -4
  231. data/spec/unit/knife/supermarket_install_spec.rb +5 -4
  232. data/spec/unit/knife/supermarket_share_spec.rb +1 -1
  233. data/spec/unit/knife_spec.rb +34 -33
  234. data/spec/unit/lwrp_spec.rb +19 -19
  235. data/spec/unit/mixin/homebrew_user_spec.rb +1 -1
  236. data/spec/unit/mixin/params_validate_spec.rb +10 -10
  237. data/spec/unit/mixin/properties_spec.rb +4 -4
  238. data/spec/unit/mixin/shell_out_spec.rb +27 -27
  239. data/spec/unit/mixin/template_spec.rb +4 -8
  240. data/spec/unit/mixin/unformatter_spec.rb +1 -2
  241. data/spec/unit/mixin/user_context_spec.rb +1 -2
  242. data/spec/unit/mixin/which.rb +2 -0
  243. data/spec/unit/mixin/windows_architecture_helper_spec.rb +3 -3
  244. data/spec/unit/node/attribute_spec.rb +79 -79
  245. data/spec/unit/node/immutable_collections_spec.rb +50 -50
  246. data/spec/unit/node_spec.rb +16 -16
  247. data/spec/unit/org_spec.rb +3 -3
  248. data/spec/unit/policy_builder/policyfile_spec.rb +2 -2
  249. data/spec/unit/property/state_spec.rb +26 -25
  250. data/spec/unit/property/validation_spec.rb +14 -13
  251. data/spec/unit/property_spec.rb +10 -9
  252. data/spec/unit/provider/apt_update_spec.rb +6 -6
  253. data/spec/unit/provider/cron_spec.rb +15 -15
  254. data/spec/unit/provider/dsc_resource_spec.rb +6 -3
  255. data/spec/unit/provider/dsc_script_spec.rb +1 -1
  256. data/spec/unit/provider/execute_spec.rb +5 -5
  257. data/spec/unit/provider/git_spec.rb +39 -39
  258. data/spec/unit/provider/group/dscl_spec.rb +3 -3
  259. data/spec/unit/provider/group/groupadd_spec.rb +1 -1
  260. data/spec/unit/provider/group_spec.rb +2 -3
  261. data/spec/unit/provider/ifconfig/aix_spec.rb +1 -1
  262. data/spec/unit/provider/ifconfig/debian_spec.rb +2 -2
  263. data/spec/unit/provider/ifconfig_spec.rb +45 -16
  264. data/spec/unit/provider/launchd_spec.rb +23 -15
  265. data/spec/unit/provider/link_spec.rb +22 -11
  266. data/spec/unit/provider/mount/aix_spec.rb +6 -6
  267. data/spec/unit/provider/mount/mount_spec.rb +31 -31
  268. data/spec/unit/provider/mount/solaris_spec.rb +11 -11
  269. data/spec/unit/provider/ohai_spec.rb +1 -1
  270. data/spec/unit/provider/osx_profile_spec.rb +5 -7
  271. data/spec/unit/provider/package/apt_spec.rb +5 -5
  272. data/spec/unit/provider/package/bff_spec.rb +1 -1
  273. data/spec/unit/provider/package/cab_spec.rb +1 -1
  274. data/spec/unit/provider/package/chocolatey_spec.rb +8 -8
  275. data/spec/unit/provider/package/freebsd/pkg_spec.rb +1 -1
  276. data/spec/unit/provider/package/ips_spec.rb +6 -6
  277. data/spec/unit/provider/package/macports_spec.rb +1 -1
  278. data/spec/unit/provider/package/msu_spec.rb +1 -1
  279. data/spec/unit/provider/package/openbsd_spec.rb +15 -11
  280. data/spec/unit/provider/package/pacman_spec.rb +3 -3
  281. data/spec/unit/provider/package/paludis_spec.rb +4 -4
  282. data/spec/unit/provider/package/portage_spec.rb +1 -1
  283. data/spec/unit/provider/package/powershell_spec.rb +1 -1
  284. data/spec/unit/provider/package/smartos_spec.rb +3 -3
  285. data/spec/unit/provider/package/solaris_spec.rb +1 -1
  286. data/spec/unit/provider/package/windows/exe_spec.rb +9 -9
  287. data/spec/unit/provider/package/windows/msi_spec.rb +7 -7
  288. data/spec/unit/provider/package/windows_spec.rb +2 -1
  289. data/spec/unit/provider/package/yum/yum_cache_spec.rb +1 -1
  290. data/spec/unit/provider/package/zypper_spec.rb +4 -4
  291. data/spec/unit/provider/package_spec.rb +1 -1
  292. data/spec/unit/provider/powershell_script_spec.rb +7 -7
  293. data/spec/unit/provider/registry_key_spec.rb +1 -1
  294. data/spec/unit/provider/remote_directory_spec.rb +6 -6
  295. data/spec/unit/provider/route_spec.rb +11 -11
  296. data/spec/unit/provider/service/arch_service_spec.rb +13 -13
  297. data/spec/unit/provider/service/debian_service_spec.rb +2 -1
  298. data/spec/unit/provider/service/freebsd_service_spec.rb +28 -24
  299. data/spec/unit/provider/service/gentoo_service_spec.rb +2 -2
  300. data/spec/unit/provider/service/init_service_spec.rb +11 -11
  301. data/spec/unit/provider/service/invokercd_service_spec.rb +11 -11
  302. data/spec/unit/provider/service/macosx_spec.rb +5 -5
  303. data/spec/unit/provider/service/openbsd_service_spec.rb +15 -11
  304. data/spec/unit/provider/service/simple_service_spec.rb +7 -7
  305. data/spec/unit/provider/service/upstart_service_spec.rb +14 -14
  306. data/spec/unit/provider/service/windows_spec.rb +53 -35
  307. data/spec/unit/provider/subversion_spec.rb +8 -4
  308. data/spec/unit/provider/systemd_unit_spec.rb +142 -142
  309. data/spec/unit/provider/template/content_spec.rb +29 -29
  310. data/spec/unit/provider/windows_task_spec.rb +1 -1
  311. data/spec/unit/provider_resolver_spec.rb +75 -75
  312. data/spec/unit/provider_spec.rb +2 -4
  313. data/spec/unit/recipe_spec.rb +4 -4
  314. data/spec/unit/resource/batch_spec.rb +1 -1
  315. data/spec/unit/resource/chef_gem_spec.rb +1 -1
  316. data/spec/unit/resource/chocolatey_config_spec.rb +1 -1
  317. data/spec/unit/resource/chocolatey_source_spec.rb +1 -1
  318. data/spec/unit/resource/directory_spec.rb +1 -1
  319. data/spec/unit/resource/dnf_package_spec.rb +1 -1
  320. data/spec/unit/resource/dsc_resource_spec.rb +1 -1
  321. data/spec/unit/resource/file/verification_spec.rb +1 -2
  322. data/spec/unit/resource/file_spec.rb +1 -1
  323. data/spec/unit/resource/group_spec.rb +1 -1
  324. data/spec/unit/resource/link_spec.rb +1 -1
  325. data/spec/unit/resource/osx_profile_spec.rb +2 -1
  326. data/spec/unit/resource/powershell_script_spec.rb +12 -7
  327. data/spec/unit/resource/registry_key_spec.rb +3 -3
  328. data/spec/unit/resource/rhsm_subscription_spec.rb +1 -1
  329. data/spec/unit/resource/service_spec.rb +1 -1
  330. data/spec/unit/resource/template_spec.rb +2 -2
  331. data/spec/unit/resource/windows_env_spec.rb +1 -1
  332. data/spec/unit/resource/windows_service_spec.rb +5 -5
  333. data/spec/unit/resource/windows_task_spec.rb +6 -2
  334. data/spec/unit/resource/yum_package_spec.rb +1 -1
  335. data/spec/unit/resource_collection/resource_list_spec.rb +1 -1
  336. data/spec/unit/resource_collection/resource_set_spec.rb +7 -7
  337. data/spec/unit/resource_collection/stepable_iterator_spec.rb +2 -2
  338. data/spec/unit/resource_collection_spec.rb +4 -4
  339. data/spec/unit/resource_definition_spec.rb +2 -2
  340. data/spec/unit/resource_inspector_spec.rb +1 -1
  341. data/spec/unit/resource_reporter_spec.rb +4 -4
  342. data/spec/unit/resource_spec.rb +22 -22
  343. data/spec/unit/role_spec.rb +3 -3
  344. data/spec/unit/run_context/cookbook_compiler_spec.rb +23 -23
  345. data/spec/unit/run_list/run_list_expansion_spec.rb +9 -6
  346. data/spec/unit/run_list_spec.rb +1 -1
  347. data/spec/unit/runner_spec.rb +3 -3
  348. data/spec/unit/search/query_spec.rb +3 -2
  349. data/spec/unit/shell/model_wrapper_spec.rb +1 -1
  350. data/spec/unit/shell/shell_session_spec.rb +8 -11
  351. data/spec/unit/shell_spec.rb +1 -2
  352. data/spec/unit/user_spec.rb +4 -4
  353. data/spec/unit/user_v1_spec.rb +3 -3
  354. data/spec/unit/util/backup_spec.rb +1 -1
  355. data/spec/unit/util/dsc/lcm_output_parser_spec.rb +13 -13
  356. data/spec/unit/util/dsc/local_configuration_manager_spec.rb +3 -3
  357. data/spec/unit/util/editor_spec.rb +1 -1
  358. data/spec/unit/util/powershell/ps_credential_spec.rb +3 -2
  359. data/spec/unit/util/threaded_job_queue_spec.rb +2 -2
  360. data/spec/unit/version_class_spec.rb +4 -4
  361. data/spec/unit/win32/registry_spec.rb +5 -5
  362. data/spec/unit/win32/security_spec.rb +2 -1
  363. data/tasks/announce.rb +4 -11
  364. metadata +10 -6
  365. data/tasks/maintainers.rb +0 -211
  366. data/tasks/templates/prerelease.md.erb +0 -35
@@ -36,7 +36,8 @@ describe Chef::Provider::DscResource do
36
36
  it "raises a ProviderNotFound exception" do
37
37
  expect(provider).not_to receive(:meta_configuration)
38
38
  expect { provider.run_action(:run) }.to raise_error(
39
- Chef::Exceptions::ProviderNotFound, /5\.0\.10018\.0/)
39
+ Chef::Exceptions::ProviderNotFound, /5\.0\.10018\.0/
40
+ )
40
41
  end
41
42
  end
42
43
 
@@ -52,7 +53,8 @@ describe Chef::Provider::DscResource do
52
53
  it "raises an exception" do
53
54
  expect(provider).to receive(:dsc_refresh_mode_disabled?).and_return(false)
54
55
  expect { provider.run_action(:run) }.to raise_error(
55
- Chef::Exceptions::ProviderNotFound, /Disabled/)
56
+ Chef::Exceptions::ProviderNotFound, /Disabled/
57
+ )
56
58
  end
57
59
  end
58
60
  context "and the WMF is 5 RTM or newer" do
@@ -157,7 +159,8 @@ describe Chef::Provider::DscResource do
157
159
  [
158
160
  { "Module" => { "Name" => "ModuleName1", "Version" => "1.0.0.0" } },
159
161
  { "Module" => { "Name" => "ModuleName1", "Version" => "2.0.0.0" } },
160
- ] end
162
+ ]
163
+ end
161
164
 
162
165
  it "raises MultipleDscResourcesFound" do
163
166
  expect { provider.run_action(:run) }.to raise_error(Chef::Exceptions::MultipleDscResourcesFound)
@@ -99,7 +99,7 @@ describe Chef::Provider::DscScript do
99
99
  it "should noop if neither code or command are provided" do
100
100
  allow(provider).to receive(:load_current_resource)
101
101
  generator = double("Chef::Util::DSC::ConfigurationGenerator")
102
- expect(generator).to receive(:configuration_document_from_script_code).with("", anything(), anything(), anything())
102
+ expect(generator).to receive(:configuration_document_from_script_code).with("", anything, anything, anything)
103
103
  allow(Chef::Util::DSC::ConfigurationGenerator).to receive(:new).and_return(generator)
104
104
  provider.send(:generate_configuration_document, "tmp", nil)
105
105
  end
@@ -30,11 +30,11 @@ describe Chef::Provider::Execute do
30
30
 
31
31
  let(:opts) do
32
32
  {
33
- timeout: 3600,
34
- returns: 0,
35
- log_level: :info,
36
- default_env: false,
37
- log_tag: new_resource.to_s,
33
+ timeout: 3600,
34
+ returns: 0,
35
+ log_level: :info,
36
+ default_env: false,
37
+ log_tag: new_resource.to_s,
38
38
  }
39
39
  end
40
40
 
@@ -259,7 +259,7 @@ describe Chef::Provider::Git do
259
259
  d7b9957f67236fa54e660cc3ab45ffecd6e0ba38\trefs/tags/0.7.8
260
260
  b7d19519a1c15f1c1a324e2683bd728b6198ce5a\trefs/tags/0.7.8^{}
261
261
  ebc1b392fe7e8f0fbabc305c299b4d365d2b4d9b\trefs/tags/chef-server-package
262
- SHAS
262
+ SHAS
263
263
  @resource.revision ""
264
264
  expect(@provider).to receive(:shell_out!).with(@git_ls_remote + "\"HEAD\"", { log_tag: "git[web2.0 app]" }).and_return(double("ShellOut result", stdout: @stdout))
265
265
  expect(@provider.target_revision).to eql("28af684d8460ba4793eda3e7ac238c864a5d029a")
@@ -377,7 +377,7 @@ SHAS
377
377
  version_response = double("shell_out")
378
378
  allow(version_response).to receive(:stdout) { "git version 1.7.9" }
379
379
  expect(@provider).to receive(:shell_out!).with("git --version",
380
- log_tag: "git[web2.0 app]").and_return(version_response)
380
+ log_tag: "git[web2.0 app]").and_return(version_response)
381
381
  expect(@provider).to receive(:shell_out!).with(expected_cmd, log_tag: "git[web2.0 app]")
382
382
  @provider.clone
383
383
  end
@@ -388,7 +388,7 @@ SHAS
388
388
  version_response = double("shell_out")
389
389
  allow(version_response).to receive(:stdout) { "git version 1.7.10" }
390
390
  expect(@provider).to receive(:shell_out!).with("git --version",
391
- log_tag: "git[web2.0 app]").and_return(version_response)
391
+ log_tag: "git[web2.0 app]").and_return(version_response)
392
392
  expect(@provider).to receive(:shell_out!).with(expected_cmd, log_tag: "git[web2.0 app]")
393
393
  @provider.clone
394
394
  end
@@ -489,13 +489,13 @@ SHAS
489
489
  allow(command_response).to receive(:exitstatus) { 1 }
490
490
  expected_command = "git config --get remote.#{@resource.remote}.url"
491
491
  expect(@provider).to receive(:shell_out!).with(expected_command,
492
- cwd: "/my/deploy/dir",
493
- log_tag: "git[web2.0 app]",
494
- returns: [0, 1, 2]).and_return(command_response)
492
+ cwd: "/my/deploy/dir",
493
+ log_tag: "git[web2.0 app]",
494
+ returns: [0, 1, 2]).and_return(command_response)
495
495
  add_remote_command = "git remote add #{@resource.remote} #{@resource.repository}"
496
496
  expect(@provider).to receive(:shell_out!).with(add_remote_command,
497
- cwd: "/my/deploy/dir",
498
- log_tag: "git[web2.0 app]")
497
+ cwd: "/my/deploy/dir",
498
+ log_tag: "git[web2.0 app]")
499
499
  @provider.setup_remote_tracking_branches(@resource.remote, @resource.repository)
500
500
  end
501
501
 
@@ -507,19 +507,19 @@ SHAS
507
507
  allow(command_response).to receive(:exitstatus) { 1 }
508
508
  expected_command = "git config --get remote.#{@resource.remote}.url"
509
509
  expect(@provider).to receive(:shell_out!).with(expected_command,
510
- cwd: "/my/deploy/dir",
511
- log_tag: "git[web2.0 app]",
512
- user: "whois",
513
- group: "thisis",
514
- environment: { "HOME" => "/home/whois" },
515
- returns: [0, 1, 2]).and_return(command_response)
510
+ cwd: "/my/deploy/dir",
511
+ log_tag: "git[web2.0 app]",
512
+ user: "whois",
513
+ group: "thisis",
514
+ environment: { "HOME" => "/home/whois" },
515
+ returns: [0, 1, 2]).and_return(command_response)
516
516
  add_remote_command = "git remote add #{@resource.remote} #{@resource.repository}"
517
517
  expect(@provider).to receive(:shell_out!).with(add_remote_command,
518
- cwd: "/my/deploy/dir",
519
- log_tag: "git[web2.0 app]",
520
- user: "whois",
521
- group: "thisis",
522
- environment: { "HOME" => "/home/whois" })
518
+ cwd: "/my/deploy/dir",
519
+ log_tag: "git[web2.0 app]",
520
+ user: "whois",
521
+ group: "thisis",
522
+ environment: { "HOME" => "/home/whois" })
523
523
  @provider.setup_remote_tracking_branches(@resource.remote, @resource.repository)
524
524
  end
525
525
 
@@ -529,13 +529,13 @@ SHAS
529
529
  allow(command_response).to receive(:exitstatus) { 1 }
530
530
  check_remote_command = "git config --get remote.#{@resource.remote}.url"
531
531
  expect(@provider).to receive(:shell_out!).with(check_remote_command,
532
- cwd: "/my/deploy/dir",
533
- log_tag: "git[web2.0 app]",
534
- returns: [0, 1, 2]).and_return(command_response)
532
+ cwd: "/my/deploy/dir",
533
+ log_tag: "git[web2.0 app]",
534
+ returns: [0, 1, 2]).and_return(command_response)
535
535
  expected_command = "git remote add #{@resource.remote} #{@resource.repository}"
536
536
  expect(@provider).to receive(:shell_out!).with(expected_command,
537
- cwd: "/my/deploy/dir",
538
- log_tag: "git[web2.0 app]")
537
+ cwd: "/my/deploy/dir",
538
+ log_tag: "git[web2.0 app]")
539
539
  @provider.setup_remote_tracking_branches(@resource.remote, @resource.repository)
540
540
  end
541
541
  end
@@ -547,13 +547,13 @@ SHAS
547
547
  allow(command_response).to receive(:stdout) { "some_other_url" }
548
548
  check_remote_command = "git config --get remote.#{@resource.remote}.url"
549
549
  expect(@provider).to receive(:shell_out!).with(check_remote_command,
550
- cwd: "/my/deploy/dir",
551
- log_tag: "git[web2.0 app]",
552
- returns: [0, 1, 2]).and_return(command_response)
550
+ cwd: "/my/deploy/dir",
551
+ log_tag: "git[web2.0 app]",
552
+ returns: [0, 1, 2]).and_return(command_response)
553
553
  expected_command = "git config --replace-all remote.#{@resource.remote}.url \"#{@resource.repository}\""
554
554
  expect(@provider).to receive(:shell_out!).with(expected_command,
555
- cwd: "/my/deploy/dir",
556
- log_tag: "git[web2.0 app]")
555
+ cwd: "/my/deploy/dir",
556
+ log_tag: "git[web2.0 app]")
557
557
  @provider.setup_remote_tracking_branches(@resource.remote, @resource.repository)
558
558
  end
559
559
 
@@ -563,13 +563,13 @@ SHAS
563
563
  allow(command_response).to receive(:stdout) { @resource.repository }
564
564
  check_remote_command = "git config --get remote.#{@resource.remote}.url"
565
565
  expect(@provider).to receive(:shell_out!).with(check_remote_command,
566
- cwd: "/my/deploy/dir",
567
- log_tag: "git[web2.0 app]",
568
- returns: [0, 1, 2]).and_return(command_response)
566
+ cwd: "/my/deploy/dir",
567
+ log_tag: "git[web2.0 app]",
568
+ returns: [0, 1, 2]).and_return(command_response)
569
569
  unexpected_command = "git config --replace-all remote.#{@resource.remote}.url \"#{@resource.repository}\""
570
570
  expect(@provider).not_to receive(:shell_out!).with(unexpected_command,
571
- cwd: "/my/deploy/dir",
572
- log_tag: "git[web2.0 app]")
571
+ cwd: "/my/deploy/dir",
572
+ log_tag: "git[web2.0 app]")
573
573
  @provider.setup_remote_tracking_branches(@resource.remote, @resource.repository)
574
574
  end
575
575
 
@@ -578,13 +578,13 @@ SHAS
578
578
  allow(command_response).to receive(:exitstatus) { 2 }
579
579
  check_remote_command = "git config --get remote.#{@resource.remote}.url"
580
580
  expect(@provider).to receive(:shell_out!).with(check_remote_command,
581
- cwd: "/my/deploy/dir",
582
- log_tag: "git[web2.0 app]",
583
- returns: [0, 1, 2]).and_return(command_response)
581
+ cwd: "/my/deploy/dir",
582
+ log_tag: "git[web2.0 app]",
583
+ returns: [0, 1, 2]).and_return(command_response)
584
584
  expected_command = "git config --replace-all remote.#{@resource.remote}.url \"#{@resource.repository}\""
585
585
  expect(@provider).to receive(:shell_out!).with(expected_command,
586
- cwd: "/my/deploy/dir",
587
- log_tag: "git[web2.0 app]")
586
+ cwd: "/my/deploy/dir",
587
+ log_tag: "git[web2.0 app]")
588
588
  @provider.setup_remote_tracking_branches(@resource.remote, @resource.repository)
589
589
  end
590
590
  end
@@ -120,8 +120,8 @@ describe Chef::Provider::Group::Dscl do
120
120
  someprogram somethingElse:gid = (
121
121
  500
122
122
  )
123
- EOS
124
- )
123
+ EOS
124
+ )
125
125
  end
126
126
 
127
127
  it "should run safe_dscl with search /Groups gid" do
@@ -322,7 +322,7 @@ describe "Test DSCL loading" do
322
322
  RecordName: com.apple.aj
323
323
  RecordType: dsRecTypeStandard:Groups
324
324
  GroupMembership: waka bar
325
- EOF
325
+ EOF
326
326
  allow(@provider).to receive(:safe_dscl).with(*"read /Groups/aj".split(" ")).and_return(@output)
327
327
  @current_resource = @provider.load_current_resource
328
328
 
@@ -155,7 +155,7 @@ describe Chef::Provider::Group::Groupadd do
155
155
  end
156
156
  end
157
157
 
158
- [:add_member, :remove_member, :set_members].each do |m|
158
+ %i{add_member remove_member set_members}.each do |m|
159
159
  it "should raise an error when calling #{m}" do
160
160
  expect { provider.send(m, [ ]) }.to raise_error(Chef::Exceptions::Group, "you must override #{m} in #{provider}")
161
161
  end
@@ -39,8 +39,7 @@ describe Chef::Provider::User do
39
39
  @pw_group = double("Struct::Group",
40
40
  name: "wheel",
41
41
  gid: 20,
42
- mem: %w{root aj}
43
- )
42
+ mem: %w{root aj})
44
43
  allow(Etc).to receive(:getgrnam).with("wheel").and_return(@pw_group)
45
44
  end
46
45
 
@@ -85,7 +84,7 @@ describe Chef::Provider::User do
85
84
  end
86
85
 
87
86
  describe "when determining if the system is already in the target state" do
88
- [ :gid, :members ].each do |property|
87
+ %i{gid members}.each do |property|
89
88
  it "should return true if #{property} doesn't match" do
90
89
  allow(@current_resource).to receive(property).and_return("looooooooooooooooooool")
91
90
  expect(@provider.compare_group).to be_truthy
@@ -32,7 +32,7 @@ describe Chef::Provider::Ifconfig::Aix do
32
32
  lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>
33
33
  inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
34
34
  inet6 ::1%1/0
35
- IFCONFIG
35
+ IFCONFIG
36
36
  end
37
37
 
38
38
  before(:each) do
@@ -123,7 +123,7 @@ describe Chef::Provider::Ifconfig::Debian do
123
123
  a line
124
124
  source #{tempdir_path}/*
125
125
  another line
126
- EOF
126
+ EOF
127
127
  end
128
128
 
129
129
  before do
@@ -146,7 +146,7 @@ EOF
146
146
  a line
147
147
  another line
148
148
  source #{tempdir_path}/*
149
- EOF
149
+ EOF
150
150
  end
151
151
 
152
152
  before do
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # Author:: Prajakta Purohit (prajakta@chef.io)
3
- # Copyright:: Copyright 2008-2018, Chef Software Inc.
3
+ # Copyright:: Copyright 2008-2020, Chef Software Inc.
4
4
  # License:: Apache License, Version 2.0
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License");
@@ -44,21 +44,50 @@ describe Chef::Provider::Ifconfig do
44
44
  let(:net_tools_version) { StringIO.new <<~EOS }
45
45
  net-tools 1.60
46
46
  ifconfig 1.42 (2001-04-13)
47
- EOS
48
-
49
- before do
50
- ifconfig = double(stdout: "", exitstatus: 1)
51
- allow(@provider).to receive(:shell_out_compacted).and_return(ifconfig)
52
- ifconfig_version = double(stdout: "", stderr: net_tools_version, exitstatus: 4)
53
- allow(@provider).to receive(:shell_out_compacted).with("ifconfig", "--version").and_return(ifconfig_version)
54
- @provider.load_current_resource
55
- end
56
- it "should track state of ifconfig failure" do
57
- expect(@provider.instance_variable_get("@status").exitstatus).not_to eq(0)
58
- end
59
- it "should thrown an exception when ifconfig fails" do
60
- @provider.define_resource_requirements
61
- expect { @provider.process_resource_requirements }.to raise_error Chef::Exceptions::Ifconfig
47
+ EOS
48
+
49
+ let(:net_tools_version2) { StringIO.new <<~EOS }
50
+ net-tools 2.10-alpha
51
+ EOS
52
+
53
+ context "when ifconfig returns its version on stdout" do
54
+ before do
55
+ ifconfig = double(stdout: "", exitstatus: 1)
56
+ allow(@provider).to receive(:shell_out_compacted).and_return(ifconfig)
57
+ ifconfig_version = double(stdout: net_tools_version2, stderr: "", exitstatus: 4)
58
+ allow(@provider).to receive(:shell_out_compacted).with("ifconfig", "--version").and_return(ifconfig_version)
59
+ @provider.load_current_resource
60
+ end
61
+ it "should track state of ifconfig failure" do
62
+ expect(@provider.instance_variable_get("@status").exitstatus).not_to eq(0)
63
+ end
64
+ it "should thrown an exception when ifconfig fails" do
65
+ @provider.define_resource_requirements
66
+ expect { @provider.process_resource_requirements }.to raise_error Chef::Exceptions::Ifconfig
67
+ end
68
+ it "should grab the correct major.minor version of net-tools" do
69
+ expect(@provider.ifconfig_version).to eql("2.10")
70
+ end
71
+ end
72
+
73
+ context "when ifconfig returns its version on stderr" do
74
+ before do
75
+ ifconfig = double(stdout: "", exitstatus: 1)
76
+ allow(@provider).to receive(:shell_out_compacted).and_return(ifconfig)
77
+ ifconfig_version = double(stdout: "", stderr: net_tools_version, exitstatus: 4)
78
+ allow(@provider).to receive(:shell_out_compacted).with("ifconfig", "--version").and_return(ifconfig_version)
79
+ @provider.load_current_resource
80
+ end
81
+ it "should track state of ifconfig failure" do
82
+ expect(@provider.instance_variable_get("@status").exitstatus).not_to eq(0)
83
+ end
84
+ it "should thrown an exception when ifconfig fails" do
85
+ @provider.define_resource_requirements
86
+ expect { @provider.process_resource_requirements }.to raise_error Chef::Exceptions::Ifconfig
87
+ end
88
+ it "should grab the correct major.minor version of net-tools" do
89
+ expect(@provider.ifconfig_version).to eql("1.60")
90
+ end
62
91
  end
63
92
  end
64
93
  describe Chef::Provider::Ifconfig, "action_add" do
@@ -49,7 +49,7 @@ describe Chef::Provider::Launchd do
49
49
  \t<integer>300</integer>
50
50
  </dict>
51
51
  </plist>
52
- XML
52
+ XML
53
53
  let(:test_plist_multiple_intervals) { String.new <<~XML }
54
54
  <?xml version="1.0" encoding="UTF-8"?>
55
55
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@@ -78,7 +78,7 @@ XML
78
78
  \t<integer>300</integer>
79
79
  </dict>
80
80
  </plist>
81
- XML
81
+ XML
82
82
 
83
83
  let(:test_hash) do
84
84
  {
@@ -89,7 +89,8 @@ XML
89
89
  "Weekday" => 7,
90
90
  },
91
91
  "TimeOut" => 300,
92
- } end
92
+ }
93
+ end
93
94
 
94
95
  before(:each) do
95
96
  provider.load_current_resource
@@ -139,7 +140,7 @@ XML
139
140
  it "should allow array of Hashes" do
140
141
  allowed = (1..2).collect do |num|
141
142
  {
142
- "Hour" => 10 + num,
143
+ "Hour" => 10 + num,
143
144
  "Weekday" => num,
144
145
  }
145
146
  end
@@ -152,11 +153,11 @@ XML
152
153
 
153
154
  it "should allow all StartCalendarInterval keys" do
154
155
  allowed = {
155
- "Minute" => 1,
156
- "Hour" => 1,
157
- "Day" => 1,
156
+ "Minute" => 1,
157
+ "Hour" => 1,
158
+ "Day" => 1,
158
159
  "Weekday" => 1,
159
- "Month" => 1,
160
+ "Month" => 1,
160
161
  }
161
162
  new_resource.program "/Library/scripts/call_mom.sh"
162
163
  new_resource.time_out 300
@@ -197,9 +198,11 @@ XML
197
198
  describe "and the file has been updated" do
198
199
  before(:each) do
199
200
  allow(provider).to receive(
200
- :manage_plist).with(:create).and_return(true)
201
+ :manage_plist
202
+ ).with(:create).and_return(true)
201
203
  allow(provider).to receive(
202
- :manage_service).with(:restart).and_return(true)
204
+ :manage_service
205
+ ).with(:restart).and_return(true)
203
206
  end
204
207
 
205
208
  it "should call manage_service with a :restart action" do
@@ -215,9 +218,11 @@ XML
215
218
  describe "and the file has not been updated" do
216
219
  before(:each) do
217
220
  allow(provider).to receive(
218
- :manage_plist).with(:create).and_return(nil)
221
+ :manage_plist
222
+ ).with(:create).and_return(nil)
219
223
  allow(provider).to receive(
220
- :manage_service).with(:enable).and_return(true)
224
+ :manage_service
225
+ ).with(:enable).and_return(true)
221
226
  end
222
227
 
223
228
  it "should call manage_service with a :enable action" do
@@ -236,9 +241,11 @@ XML
236
241
  before(:each) do
237
242
  allow(File).to receive(:exists?).and_return(true)
238
243
  allow(provider).to receive(
239
- :manage_service).with(:disable).and_return(true)
244
+ :manage_service
245
+ ).with(:disable).and_return(true)
240
246
  allow(provider).to receive(
241
- :manage_plist).with(:delete).and_return(true)
247
+ :manage_plist
248
+ ).with(:delete).and_return(true)
242
249
  end
243
250
 
244
251
  it "should call manage_service with a :disable action" do
@@ -255,7 +262,8 @@ XML
255
262
  before(:each) do
256
263
  allow(File).to receive(:exists?).and_return(false)
257
264
  allow(provider).to receive(
258
- :manage_plist).with(:delete).and_return(true)
265
+ :manage_plist
266
+ ).with(:delete).and_return(true)
259
267
  end
260
268
 
261
269
  it "works with action :delete" do