chef 12.13.37-universal-mingw32 → 12.14.60-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (338) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +48 -95
  3. data/Gemfile +6 -1
  4. data/README.md +9 -11
  5. data/VERSION +1 -1
  6. data/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +0 -1
  7. data/acceptance/Gemfile +4 -7
  8. data/acceptance/Gemfile.lock +59 -92
  9. data/acceptance/basics/test/integration/helpers/serverspec/Gemfile +8 -0
  10. data/acceptance/data-collector/test/integration/helpers/serverspec/Gemfile +8 -0
  11. data/acceptance/fips/test/integration/fips-integration/serverspec/Gemfile +6 -0
  12. data/acceptance/fips/test/integration/fips-unit-functional/serverspec/Gemfile +4 -0
  13. data/chef.gemspec +3 -2
  14. data/lib/chef/application/client.rb +4 -4
  15. data/lib/chef/application/solo.rb +2 -2
  16. data/lib/chef/chef_fs/command_line.rb +36 -34
  17. data/lib/chef/chef_fs/data_handler/data_handler_base.rb +2 -2
  18. data/lib/chef/chef_fs/file_pattern.rb +1 -1
  19. data/lib/chef/chef_fs/file_system.rb +139 -137
  20. data/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb +2 -6
  21. data/lib/chef/cookbook/cookbook_version_loader.rb +27 -22
  22. data/lib/chef/cookbook/metadata.rb +1 -1
  23. data/lib/chef/cookbook/synchronizer.rb +3 -3
  24. data/lib/chef/cookbook_site_streaming_uploader.rb +3 -3
  25. data/lib/chef/cookbook_uploader.rb +1 -1
  26. data/lib/chef/cookbook_version.rb +6 -6
  27. data/lib/chef/dsl/powershell.rb +1 -1
  28. data/lib/chef/event_dispatch/base.rb +2 -2
  29. data/lib/chef/exceptions.rb +1 -1
  30. data/lib/chef/file_cache.rb +1 -1
  31. data/lib/chef/formatters/base.rb +2 -2
  32. data/lib/chef/formatters/doc.rb +2 -2
  33. data/lib/chef/http.rb +48 -18
  34. data/lib/chef/http/auth_credentials.rb +1 -1
  35. data/lib/chef/http/basic_client.rb +11 -2
  36. data/lib/chef/http/socketless_chef_zero_client.rb +2 -2
  37. data/lib/chef/key.rb +55 -56
  38. data/lib/chef/knife.rb +70 -61
  39. data/lib/chef/knife/client_delete.rb +2 -2
  40. data/lib/chef/knife/cookbook_bulk_delete.rb +1 -1
  41. data/lib/chef/knife/cookbook_show.rb +1 -1
  42. data/lib/chef/knife/core/gem_glob_loader.rb +3 -3
  43. data/lib/chef/knife/search.rb +2 -2
  44. data/lib/chef/knife/ssh.rb +19 -21
  45. data/lib/chef/knife/status.rb +2 -2
  46. data/lib/chef/mixin/command/unix.rb +2 -2
  47. data/lib/chef/mixin/powershell_type_coercions.rb +1 -1
  48. data/lib/chef/mixin/properties.rb +3 -0
  49. data/lib/chef/mixin/securable.rb +2 -2
  50. data/lib/chef/mixin/shell_out.rb +30 -0
  51. data/lib/chef/mixin/uris.rb +2 -1
  52. data/lib/chef/mixin/windows_architecture_helper.rb +3 -4
  53. data/lib/chef/monkey_patches/webrick-utils.rb +2 -2
  54. data/lib/chef/monologger.rb +1 -1
  55. data/lib/chef/node.rb +2 -2
  56. data/lib/chef/node/attribute.rb +3 -3
  57. data/lib/chef/platform/provider_mapping.rb +5 -2
  58. data/lib/chef/property.rb +14 -3
  59. data/lib/chef/provider/apt_repository.rb +3 -7
  60. data/lib/chef/provider/apt_update.rb +4 -6
  61. data/lib/chef/provider/cron.rb +1 -2
  62. data/lib/chef/provider/dsc_script.rb +4 -4
  63. data/lib/chef/provider/group/usermod.rb +1 -1
  64. data/lib/chef/provider/link.rb +10 -3
  65. data/lib/chef/provider/osx_profile.rb +10 -10
  66. data/lib/chef/provider/package.rb +2 -12
  67. data/lib/chef/provider/package/rubygems.rb +17 -16
  68. data/lib/chef/provider/package/windows.rb +2 -0
  69. data/lib/chef/provider/package/windows/exe.rb +1 -1
  70. data/lib/chef/provider/package/windows/registry_uninstall_entry.rb +0 -2
  71. data/lib/chef/provider/package/yum/rpm_utils.rb +8 -8
  72. data/lib/chef/provider/package/yum/yum_cache.rb +1 -1
  73. data/lib/chef/provider/remote_file/ftp.rb +2 -2
  74. data/lib/chef/provider/remote_file/sftp.rb +2 -2
  75. data/lib/chef/provider/service/debian.rb +2 -2
  76. data/lib/chef/provider/service/simple.rb +4 -3
  77. data/lib/chef/provider/service/solaris.rb +1 -1
  78. data/lib/chef/provider/service/systemd.rb +2 -2
  79. data/lib/chef/provider/service/upstart.rb +8 -5
  80. data/lib/chef/provider/support/yum_repo.erb +125 -0
  81. data/lib/chef/provider/systemd_unit.rb +11 -2
  82. data/lib/chef/provider/template_finder.rb +1 -1
  83. data/lib/chef/provider/user.rb +20 -16
  84. data/lib/chef/provider/user/aix.rb +5 -2
  85. data/lib/chef/provider/user/dscl.rb +1 -0
  86. data/lib/chef/provider/user/linux.rb +128 -0
  87. data/lib/chef/provider/user/pw.rb +2 -1
  88. data/lib/chef/provider/user/solaris.rb +3 -2
  89. data/lib/chef/provider/user/useradd.rb +5 -4
  90. data/lib/chef/provider/user/windows.rb +1 -1
  91. data/lib/chef/provider/windows_script.rb +5 -2
  92. data/lib/chef/provider/yum_repository.rb +121 -0
  93. data/lib/chef/providers.rb +4 -2
  94. data/lib/chef/resource.rb +7 -9
  95. data/lib/chef/resource/conditional.rb +9 -1
  96. data/lib/chef/resource/launchd.rb +1 -1
  97. data/lib/chef/resource/user.rb +3 -3
  98. data/lib/chef/resource/user/aix_user.rb +31 -0
  99. data/lib/chef/resource/user/dscl_user.rb +31 -0
  100. data/lib/chef/resource/user/linux_user.rb +51 -0
  101. data/lib/chef/resource/user/pw_user.rb +31 -0
  102. data/lib/chef/resource/user/solaris_user.rb +31 -0
  103. data/lib/chef/resource/user/windows_user.rb +31 -0
  104. data/lib/chef/resource/yum_package.rb +13 -12
  105. data/lib/chef/resource/yum_repository.rb +76 -0
  106. data/lib/chef/resource_builder.rb +1 -1
  107. data/lib/chef/resource_collection/stepable_iterator.rb +1 -3
  108. data/lib/chef/resource_reporter.rb +5 -5
  109. data/lib/chef/resources.rb +7 -0
  110. data/lib/chef/run_context.rb +5 -3
  111. data/lib/chef/run_context/cookbook_compiler.rb +3 -2
  112. data/lib/chef/run_list.rb +2 -2
  113. data/lib/chef/search/query.rb +11 -8
  114. data/lib/chef/shell/ext.rb +2 -2
  115. data/lib/chef/shell/shell_session.rb +1 -1
  116. data/lib/chef/util/dsc/configuration_generator.rb +1 -1
  117. data/lib/chef/util/powershell/cmdlet.rb +5 -2
  118. data/lib/chef/util/selinux.rb +1 -1
  119. data/lib/chef/version.rb +1 -1
  120. data/lib/chef/version_class.rb +2 -2
  121. data/lib/chef/version_constraint.rb +2 -2
  122. data/lib/chef/win32/api/error.rb +2 -2
  123. data/lib/chef/win32/api/net.rb +1 -1
  124. data/lib/chef/win32/eventlog.rb +1 -1
  125. data/lib/chef/win32/net.rb +1 -1
  126. data/lib/chef/win32/security/sid.rb +1 -1
  127. data/spec/functional/assets/testchefsubsys +2 -3
  128. data/spec/functional/event_loggers/windows_eventlog_spec.rb +11 -8
  129. data/spec/functional/file_content_management/deploy_strategies_spec.rb +1 -1
  130. data/spec/functional/http/simple_spec.rb +2 -2
  131. data/spec/functional/knife/cookbook_delete_spec.rb +5 -5
  132. data/spec/functional/knife/exec_spec.rb +6 -6
  133. data/spec/functional/knife/ssh_spec.rb +4 -4
  134. data/spec/functional/notifications_spec.rb +2 -2
  135. data/spec/functional/provider/whyrun_safe_ruby_block_spec.rb +2 -2
  136. data/spec/functional/rebooter_spec.rb +5 -5
  137. data/spec/functional/resource/bash_spec.rb +2 -2
  138. data/spec/functional/resource/deploy_revision_spec.rb +1 -1
  139. data/spec/functional/resource/dpkg_package_spec.rb +2 -2
  140. data/spec/functional/resource/dsc_resource_spec.rb +5 -5
  141. data/spec/functional/resource/dsc_script_spec.rb +27 -22
  142. data/spec/functional/resource/env_spec.rb +4 -4
  143. data/spec/functional/resource/execute_spec.rb +4 -4
  144. data/spec/functional/resource/group_spec.rb +20 -8
  145. data/spec/functional/resource/link_spec.rb +34 -0
  146. data/spec/functional/resource/ohai_spec.rb +6 -6
  147. data/spec/functional/resource/reboot_spec.rb +2 -2
  148. data/spec/functional/resource/remote_file_spec.rb +16 -7
  149. data/spec/functional/resource/user/dscl_spec.rb +3 -3
  150. data/spec/functional/resource/user/useradd_spec.rb +32 -26
  151. data/spec/functional/resource/windows_service_spec.rb +15 -15
  152. data/spec/functional/rest_spec.rb +2 -2
  153. data/spec/functional/run_lock_spec.rb +9 -9
  154. data/spec/functional/tiny_server_spec.rb +9 -8
  155. data/spec/functional/win32/crypto_spec.rb +1 -1
  156. data/spec/functional/win32/security_spec.rb +8 -8
  157. data/spec/integration/client/client_spec.rb +6 -4
  158. data/spec/integration/knife/chef_repo_path_spec.rb +70 -1
  159. data/spec/integration/knife/upload_spec.rb +1 -1
  160. data/spec/integration/recipes/lwrp_inline_resources_spec.rb +6 -6
  161. data/spec/integration/recipes/noop_resource_spec.rb +4 -4
  162. data/spec/integration/recipes/provider_choice.rb +3 -3
  163. data/spec/integration/recipes/recipe_dsl_spec.rb +318 -317
  164. data/spec/integration/recipes/resource_action_spec.rb +50 -54
  165. data/spec/integration/recipes/resource_converge_if_changed_spec.rb +34 -34
  166. data/spec/integration/recipes/resource_load_spec.rb +24 -24
  167. data/spec/integration/solo/solo_spec.rb +21 -30
  168. data/spec/scripts/ssl-serve.rb +1 -1
  169. data/spec/spec_helper.rb +1 -0
  170. data/spec/stress/win32/security_spec.rb +4 -4
  171. data/spec/support/chef_helpers.rb +22 -0
  172. data/spec/support/platform_helpers.rb +5 -1
  173. data/spec/support/shared/context/client.rb +3 -2
  174. data/spec/support/shared/functional/file_resource.rb +5 -4
  175. data/spec/support/shared/functional/http.rb +16 -16
  176. data/spec/support/shared/functional/securable_resource.rb +5 -5
  177. data/spec/support/shared/functional/win32_service.rb +5 -7
  178. data/spec/support/shared/integration/app_server_support.rb +1 -3
  179. data/spec/support/shared/integration/knife_support.rb +0 -2
  180. data/spec/support/shared/shared_examples.rb +2 -2
  181. data/spec/support/shared/unit/api_versioning.rb +2 -2
  182. data/spec/support/shared/unit/application_dot_d.rb +9 -6
  183. data/spec/support/shared/unit/provider/file.rb +2 -2
  184. data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +49 -80
  185. data/spec/support/shared/unit/resource/static_provider_resolution.rb +2 -2
  186. data/spec/support/shared/unit/script_resource.rb +4 -4
  187. data/spec/support/shared/unit/user_and_client_shared.rb +4 -4
  188. data/spec/tiny_server.rb +51 -66
  189. data/spec/unit/api_client_v1_spec.rb +2 -2
  190. data/spec/unit/application_spec.rb +1 -1
  191. data/spec/unit/audit/audit_event_proxy_spec.rb +34 -27
  192. data/spec/unit/audit/audit_reporter_spec.rb +32 -23
  193. data/spec/unit/audit/control_group_data_spec.rb +19 -14
  194. data/spec/unit/chef_class_spec.rb +1 -1
  195. data/spec/unit/chef_fs/data_handler/group_handler_spec.rb +1 -1
  196. data/spec/unit/chef_fs/diff_spec.rb +4 -4
  197. data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +4 -4
  198. data/spec/unit/chef_fs/file_system_spec.rb +2 -2
  199. data/spec/unit/chef_fs/parallelizer.rb +5 -7
  200. data/spec/unit/cookbook/metadata_spec.rb +98 -98
  201. data/spec/unit/cookbook/synchronizer_spec.rb +7 -0
  202. data/spec/unit/cookbook_loader_spec.rb +24 -24
  203. data/spec/unit/cookbook_version_file_specificity_spec.rb +8 -8
  204. data/spec/unit/daemon_spec.rb +1 -1
  205. data/spec/unit/data_bag_item_spec.rb +18 -18
  206. data/spec/unit/data_bag_spec.rb +2 -2
  207. data/spec/unit/data_collector/messages/helpers_spec.rb +9 -9
  208. data/spec/unit/data_collector/messages_spec.rb +2 -2
  209. data/spec/unit/data_collector_spec.rb +19 -19
  210. data/spec/unit/dsl/audit_spec.rb +3 -3
  211. data/spec/unit/dsl/data_query_spec.rb +3 -2
  212. data/spec/unit/dsl/declare_resource_spec.rb +10 -10
  213. data/spec/unit/encrypted_data_bag_item/check_encrypted_spec.rb +3 -2
  214. data/spec/unit/encrypted_data_bag_item_spec.rb +3 -2
  215. data/spec/unit/environment_spec.rb +6 -6
  216. data/spec/unit/event_dispatch/dispatcher_spec.rb +2 -2
  217. data/spec/unit/file_access_control_spec.rb +3 -3
  218. data/spec/unit/file_content_management/tempfile_spec.rb +2 -2
  219. data/spec/unit/formatters/error_inspectors/api_error_formatting_spec.rb +2 -2
  220. data/spec/unit/guard_interpreter/resource_guard_interpreter_spec.rb +2 -2
  221. data/spec/unit/http/basic_client_spec.rb +20 -0
  222. data/spec/unit/http/validate_content_length_spec.rb +8 -8
  223. data/spec/unit/http_spec.rb +14 -0
  224. data/spec/unit/knife/bootstrap/chef_vault_handler_spec.rb +2 -2
  225. data/spec/unit/knife/bootstrap/client_builder_spec.rb +2 -2
  226. data/spec/unit/knife/bootstrap_spec.rb +8 -6
  227. data/spec/unit/knife/client_bulk_delete_spec.rb +8 -8
  228. data/spec/unit/knife/client_edit_spec.rb +2 -2
  229. data/spec/unit/knife/configure_client_spec.rb +2 -2
  230. data/spec/unit/knife/cookbook_metadata_spec.rb +4 -4
  231. data/spec/unit/knife/cookbook_site_install_spec.rb +6 -5
  232. data/spec/unit/knife/cookbook_site_share_spec.rb +2 -2
  233. data/spec/unit/knife/core/hashed_command_loader_spec.rb +5 -4
  234. data/spec/unit/knife/core/node_editor_spec.rb +3 -3
  235. data/spec/unit/knife/core/ui_spec.rb +2 -2
  236. data/spec/unit/knife/data_bag_from_file_spec.rb +4 -3
  237. data/spec/unit/knife/data_bag_show_spec.rb +3 -2
  238. data/spec/unit/knife/key_create_spec.rb +14 -14
  239. data/spec/unit/knife/key_delete_spec.rb +2 -2
  240. data/spec/unit/knife/key_edit_spec.rb +16 -16
  241. data/spec/unit/knife/key_list_spec.rb +6 -6
  242. data/spec/unit/knife/key_show_spec.rb +4 -4
  243. data/spec/unit/knife/status_spec.rb +3 -2
  244. data/spec/unit/knife/user_create_spec.rb +4 -4
  245. data/spec/unit/knife_spec.rb +7 -6
  246. data/spec/unit/lwrp_spec.rb +6 -6
  247. data/spec/unit/mixin/api_version_request_handling_spec.rb +2 -2
  248. data/spec/unit/mixin/command_spec.rb +17 -14
  249. data/spec/unit/mixin/deprecation_spec.rb +1 -1
  250. data/spec/unit/mixin/homebrew_user_spec.rb +2 -2
  251. data/spec/unit/mixin/params_validate_spec.rb +53 -52
  252. data/spec/unit/mixin/powershell_out_spec.rb +2 -2
  253. data/spec/unit/mixin/powershell_type_coercions_spec.rb +2 -2
  254. data/spec/unit/mixin/shell_out_spec.rb +1 -1
  255. data/spec/unit/mixin/xml_escape_spec.rb +3 -3
  256. data/spec/unit/node_spec.rb +2 -2
  257. data/spec/unit/platform/query_helpers_spec.rb +3 -3
  258. data/spec/unit/property_spec.rb +4 -4
  259. data/spec/unit/provider/cookbook_file_spec.rb +4 -4
  260. data/spec/unit/provider/cron/unix_spec.rb +4 -4
  261. data/spec/unit/provider/cron_spec.rb +2 -2
  262. data/spec/unit/provider/deploy_spec.rb +8 -8
  263. data/spec/unit/provider/dsc_resource_spec.rb +11 -10
  264. data/spec/unit/provider/dsc_script_spec.rb +9 -9
  265. data/spec/unit/provider/env/windows_spec.rb +8 -8
  266. data/spec/unit/provider/file/content_spec.rb +6 -6
  267. data/spec/unit/provider/file_spec.rb +4 -4
  268. data/spec/unit/provider/launchd_spec.rb +2 -1
  269. data/spec/unit/provider/link_spec.rb +155 -0
  270. data/spec/unit/provider/mount/mount_spec.rb +5 -5
  271. data/spec/unit/provider/mount/solaris_spec.rb +48 -48
  272. data/spec/unit/provider/osx_profile_spec.rb +6 -0
  273. data/spec/unit/provider/package/chocolatey_spec.rb +4 -4
  274. data/spec/unit/provider/package/freebsd/port_spec.rb +4 -4
  275. data/spec/unit/provider/package/rubygems_spec.rb +50 -44
  276. data/spec/unit/provider/package/windows/exe_spec.rb +9 -0
  277. data/spec/unit/provider/package/yum_spec.rb +61 -60
  278. data/spec/unit/provider/package_spec.rb +2 -2
  279. data/spec/unit/provider/powershell_script_spec.rb +4 -4
  280. data/spec/unit/provider/remote_directory_spec.rb +1 -1
  281. data/spec/unit/provider/remote_file/ftp_spec.rb +4 -4
  282. data/spec/unit/provider/remote_file/local_file_spec.rb +4 -2
  283. data/spec/unit/provider/remote_file/sftp_spec.rb +4 -4
  284. data/spec/unit/provider/remote_file_spec.rb +4 -4
  285. data/spec/unit/provider/script_spec.rb +4 -4
  286. data/spec/unit/provider/service/debian_service_spec.rb +4 -4
  287. data/spec/unit/provider/service/freebsd_service_spec.rb +12 -8
  288. data/spec/unit/provider/service/openbsd_service_spec.rb +12 -8
  289. data/spec/unit/provider/service/systemd_service_spec.rb +4 -4
  290. data/spec/unit/provider/service/upstart_service_spec.rb +27 -12
  291. data/spec/unit/provider/service/windows_spec.rb +10 -10
  292. data/spec/unit/provider/systemd_unit_spec.rb +2 -2
  293. data/spec/unit/provider/template/content_spec.rb +8 -8
  294. data/spec/unit/provider/template_spec.rb +8 -8
  295. data/spec/unit/provider/user/dscl_spec.rb +51 -51
  296. data/spec/unit/provider/user/linux_spec.rb +76 -0
  297. data/spec/unit/provider/user/pw_spec.rb +3 -6
  298. data/spec/unit/provider/user/solaris_spec.rb +5 -5
  299. data/spec/unit/provider/user/windows_spec.rb +3 -3
  300. data/spec/unit/provider/user_spec.rb +2 -2
  301. data/spec/unit/provider/yum_repository_spec.rb +35 -0
  302. data/spec/unit/provider_resolver_spec.rb +306 -264
  303. data/spec/unit/recipe_spec.rb +8 -7
  304. data/spec/unit/resource/apt_repository_spec.rb +4 -4
  305. data/spec/unit/resource/apt_update_spec.rb +4 -4
  306. data/spec/unit/resource/conditional_spec.rb +46 -0
  307. data/spec/unit/resource/dsc_resource_spec.rb +8 -8
  308. data/spec/unit/resource/dsc_script_spec.rb +4 -4
  309. data/spec/unit/resource/freebsd_package_spec.rb +6 -6
  310. data/spec/unit/resource/launchd_spec.rb +3 -2
  311. data/spec/unit/resource/osx_profile_spec.rb +3 -2
  312. data/spec/unit/resource/remote_file_spec.rb +6 -6
  313. data/spec/unit/resource/service_spec.rb +14 -14
  314. data/spec/unit/resource/user_spec.rb +1 -1
  315. data/spec/unit/resource/yum_repository_spec.rb +49 -0
  316. data/spec/unit/resource_collection_spec.rb +4 -4
  317. data/spec/unit/resource_definition_spec.rb +11 -11
  318. data/spec/unit/resource_reporter_spec.rb +4 -4
  319. data/spec/unit/resource_resolver_spec.rb +6 -6
  320. data/spec/unit/resource_spec.rb +36 -16
  321. data/spec/unit/run_context/child_run_context_spec.rb +4 -4
  322. data/spec/unit/run_context/cookbook_compiler_spec.rb +43 -1
  323. data/spec/unit/run_context_spec.rb +8 -8
  324. data/spec/unit/run_list/run_list_expansion_spec.rb +2 -2
  325. data/spec/unit/runner_spec.rb +2 -2
  326. data/spec/unit/search/query_spec.rb +15 -14
  327. data/spec/unit/user_v1_spec.rb +8 -8
  328. data/spec/unit/util/dsc/configuration_generator_spec.rb +12 -12
  329. data/spec/unit/util/dsc/local_configuration_manager_spec.rb +12 -9
  330. data/spec/unit/util/dsc/resource_store.rb +8 -6
  331. data/spec/unit/util/editor_spec.rb +6 -6
  332. data/spec/unit/util/powershell/cmdlet_spec.rb +10 -10
  333. data/tasks/bin/bundle-platform +1 -0
  334. data/tasks/bin/bundler_patch.rb +27 -0
  335. data/tasks/cbgb.rb +2 -2
  336. data/tasks/maintainers.rb +2 -2
  337. metadata +37 -8
  338. data/spec/unit/provider/user/useradd_spec.rb +0 -51
@@ -30,10 +30,10 @@ end
30
30
  describe Chef::Provider::User::Windows do
31
31
  before(:each) do
32
32
  @node = Chef::Node.new
33
- @new_resource = Chef::Resource::User.new("monkey")
33
+ @new_resource = Chef::Resource::User::WindowsUser.new("monkey")
34
34
  @events = Chef::EventDispatch::Dispatcher.new
35
35
  @run_context = Chef::RunContext.new(@node, {}, @events)
36
- @current_resource = Chef::Resource::User.new("monkey")
36
+ @current_resource = Chef::Resource::User::WindowsUser.new("monkey")
37
37
 
38
38
  @net_user = double("Chef::Util::Windows::NetUser")
39
39
  allow(Chef::Util::Windows::NetUser).to receive(:new).and_return(@net_user)
@@ -89,7 +89,7 @@ describe Chef::Provider::User::Windows do
89
89
 
90
90
  describe "and the attributes do not match" do
91
91
  before do
92
- @current_resource = Chef::Resource::User.new("adam")
92
+ @current_resource = Chef::Resource::User::WindowsUser.new("adam")
93
93
  @current_resource.comment "Adam Jacob-foo"
94
94
  @current_resource.uid 1111
95
95
  @current_resource.gid 1111
@@ -190,7 +190,7 @@ describe Chef::Provider::User do
190
190
  end
191
191
 
192
192
  describe "compare_user" do
193
- let(:mapping) {
193
+ let(:mapping) do
194
194
  {
195
195
  "username" => %w{adam Adam},
196
196
  "comment" => ["Adam Jacob", "adam jacob"],
@@ -200,7 +200,7 @@ describe Chef::Provider::User do
200
200
  "shell" => ["/usr/bin/zsh", "/bin/bash"],
201
201
  "password" => %w{abcd 12345},
202
202
  }
203
- }
203
+ end
204
204
 
205
205
  %w{uid gid comment home shell password}.each do |attribute|
206
206
  it "should return true if #{attribute} doesn't match" do
@@ -0,0 +1,35 @@
1
+ #
2
+ # Author:: Thom May (<thom@chef.io>)
3
+ # Copyright:: Copyright (c) 2016 Chef Software, Inc.
4
+ # License:: Apache License, Version 2.0
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require "spec_helper"
20
+
21
+ describe Chef::Provider::YumRepository do
22
+ let(:new_resource) { Chef::Resource::YumRepository.new("multiverse") }
23
+
24
+ let(:provider) do
25
+ node = Chef::Node.new
26
+ events = Chef::EventDispatch::Dispatcher.new
27
+ run_context = Chef::RunContext.new(node, {}, events)
28
+ Chef::Provider::YumRepository.new(new_resource, run_context)
29
+ end
30
+
31
+ it "responds to load_current_resource" do
32
+ expect(provider).to respond_to(:load_current_resource)
33
+ end
34
+
35
+ end
@@ -480,7 +480,7 @@ describe Chef::ProviderResolver do
480
480
  end
481
481
  end
482
482
 
483
- on_platform %w{freebsd netbsd}, platform_version: "3.1.4" do
483
+ on_platform "freebsd", os: "freebsd", platform_version: "10.3" do
484
484
  it "returns a Freebsd provider if it finds the /usr/local/etc/rc.d initscript" do
485
485
  stub_service_providers
486
486
  stub_service_configs(:usr_local_etc_rcd)
@@ -507,7 +507,41 @@ describe Chef::ProviderResolver do
507
507
  expect(resolved_provider).to eql(Chef::Provider::Service::Freebsd)
508
508
  end
509
509
 
510
- it "foo" do
510
+ it "always returns a freebsd provider by default?" do
511
+ stub_service_providers
512
+ stub_service_configs
513
+ expect(resolved_provider).to eql(Chef::Provider::Service::Freebsd)
514
+ end
515
+ end
516
+
517
+ on_platform "netbsd", os: "netbsd", platform_version: "7.0.1" do
518
+ it "returns a Freebsd provider if it finds the /usr/local/etc/rc.d initscript" do
519
+ stub_service_providers
520
+ stub_service_configs(:usr_local_etc_rcd)
521
+ expect(resolved_provider).to eql(Chef::Provider::Service::Freebsd)
522
+ end
523
+
524
+ it "returns a Freebsd provider if it finds the /etc/rc.d initscript" do
525
+ stub_service_providers
526
+ stub_service_configs(:etc_rcd)
527
+ expect(resolved_provider).to eql(Chef::Provider::Service::Freebsd)
528
+ end
529
+
530
+ it "always returns a Freebsd provider if it finds the /usr/local/etc/rc.d initscript" do
531
+ # should only care about :usr_local_etc_rcd stub in the service configs
532
+ stub_service_providers(:debian, :invokercd, :insserv, :upstart, :redhat, :systemd)
533
+ stub_service_configs(:usr_local_etc_rcd, :initd, :upstart, :xinetd, :systemd)
534
+ expect(resolved_provider).to eql(Chef::Provider::Service::Freebsd)
535
+ end
536
+
537
+ it "always returns a Freebsd provider if it finds the /usr/local/etc/rc.d initscript" do
538
+ # should only care about :etc_rcd stub in the service configs
539
+ stub_service_providers(:debian, :invokercd, :insserv, :upstart, :redhat, :systemd)
540
+ stub_service_configs(:etc_rcd, :initd, :upstart, :xinetd, :systemd)
541
+ expect(resolved_provider).to eql(Chef::Provider::Service::Freebsd)
542
+ end
543
+
544
+ it "always returns a freebsd provider by default?" do
511
545
  stub_service_providers
512
546
  stub_service_configs
513
547
  expect(resolved_provider).to eql(Chef::Provider::Service::Freebsd)
@@ -517,347 +551,355 @@ describe Chef::ProviderResolver do
517
551
  end
518
552
 
519
553
  PROVIDERS =
520
- {
521
- bash: [ Chef::Resource::Bash, Chef::Provider::Script ],
522
- breakpoint: [ Chef::Resource::Breakpoint, Chef::Provider::Breakpoint ],
523
- chef_gem: [ Chef::Resource::ChefGem, Chef::Provider::Package::Rubygems ],
524
- cookbook_file: [ Chef::Resource::CookbookFile, Chef::Provider::CookbookFile ],
525
- csh: [ Chef::Resource::Csh, Chef::Provider::Script ],
526
- deploy: [ Chef::Resource::Deploy, Chef::Provider::Deploy::Timestamped ],
527
- deploy_revision: [ Chef::Resource::DeployRevision, Chef::Provider::Deploy::Revision ],
528
- directory: [ Chef::Resource::Directory, Chef::Provider::Directory ],
529
- easy_install_package: [ Chef::Resource::EasyInstallPackage, Chef::Provider::Package::EasyInstall ],
530
- erl_call: [ Chef::Resource::ErlCall, Chef::Provider::ErlCall ],
531
- execute: [ Chef::Resource::Execute, Chef::Provider::Execute ],
532
- file: [ Chef::Resource::File, Chef::Provider::File ],
533
- gem_package: [ Chef::Resource::GemPackage, Chef::Provider::Package::Rubygems ],
534
- git: [ Chef::Resource::Git, Chef::Provider::Git ],
535
- group: [ Chef::Resource::Group, Chef::Provider::Group::Gpasswd ],
536
- homebrew_package: [ Chef::Resource::HomebrewPackage, Chef::Provider::Package::Homebrew ],
537
- http_request: [ Chef::Resource::HttpRequest, Chef::Provider::HttpRequest ],
538
- ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
539
- link: [ Chef::Resource::Link, Chef::Provider::Link ],
540
- log: [ Chef::Resource::Log, Chef::Provider::Log::ChefLog ],
541
- macports_package: [ Chef::Resource::MacportsPackage, Chef::Provider::Package::Macports ],
542
- mdadm: [ Chef::Resource::Mdadm, Chef::Provider::Mdadm ],
543
- mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Mount ],
544
- perl: [ Chef::Resource::Perl, Chef::Provider::Script ],
545
- portage_package: [ Chef::Resource::PortagePackage, Chef::Provider::Package::Portage ],
546
- python: [ Chef::Resource::Python, Chef::Provider::Script ],
547
- remote_directory: [ Chef::Resource::RemoteDirectory, Chef::Provider::RemoteDirectory ],
548
- route: [ Chef::Resource::Route, Chef::Provider::Route ],
549
- ruby: [ Chef::Resource::Ruby, Chef::Provider::Script ],
550
- ruby_block: [ Chef::Resource::RubyBlock, Chef::Provider::RubyBlock ],
551
- script: [ Chef::Resource::Script, Chef::Provider::Script ],
552
- subversion: [ Chef::Resource::Subversion, Chef::Provider::Subversion ],
553
- template: [ Chef::Resource::Template, Chef::Provider::Template ],
554
- timestamped_deploy: [ Chef::Resource::TimestampedDeploy, Chef::Provider::Deploy::Timestamped ],
555
- user: [ Chef::Resource::User, Chef::Provider::User::Useradd ],
556
- whyrun_safe_ruby_block: [ Chef::Resource::WhyrunSafeRubyBlock, Chef::Provider::WhyrunSafeRubyBlock ],
557
-
558
- # We want to check that these are unsupported:
559
- apt_package: nil,
560
- bff_package: nil,
561
- dpkg_package: nil,
562
- dsc_script: nil,
563
- ips_package: nil,
564
- pacman_package: nil,
565
- paludis_package: nil,
566
- rpm_package: nil,
567
- smartos_package: nil,
568
- solaris_package: nil,
569
- yum_package: nil,
570
- windows_package: nil,
571
- windows_service: nil,
572
-
573
- "linux" => {
574
- apt_package: [ Chef::Resource::AptPackage, Chef::Provider::Package::Apt ],
575
- dpkg_package: [ Chef::Resource::DpkgPackage, Chef::Provider::Package::Dpkg ],
576
- pacman_package: [ Chef::Resource::PacmanPackage, Chef::Provider::Package::Pacman ],
577
- paludis_package: [ Chef::Resource::PaludisPackage, Chef::Provider::Package::Paludis ],
578
- rpm_package: [ Chef::Resource::RpmPackage, Chef::Provider::Package::Rpm ],
579
- yum_package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ],
580
-
581
- "debian" => {
582
- ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig::Debian ],
583
- package: [ Chef::Resource::AptPackage, Chef::Provider::Package::Apt ],
584
- # service: [ Chef::Resource::DebianService, Chef::Provider::Service::Debian ],
554
+ {
555
+ bash: [ Chef::Resource::Bash, Chef::Provider::Script ],
556
+ breakpoint: [ Chef::Resource::Breakpoint, Chef::Provider::Breakpoint ],
557
+ chef_gem: [ Chef::Resource::ChefGem, Chef::Provider::Package::Rubygems ],
558
+ cookbook_file: [ Chef::Resource::CookbookFile, Chef::Provider::CookbookFile ],
559
+ csh: [ Chef::Resource::Csh, Chef::Provider::Script ],
560
+ deploy: [ Chef::Resource::Deploy, Chef::Provider::Deploy::Timestamped ],
561
+ deploy_revision: [ Chef::Resource::DeployRevision, Chef::Provider::Deploy::Revision ],
562
+ directory: [ Chef::Resource::Directory, Chef::Provider::Directory ],
563
+ easy_install_package: [ Chef::Resource::EasyInstallPackage, Chef::Provider::Package::EasyInstall ],
564
+ erl_call: [ Chef::Resource::ErlCall, Chef::Provider::ErlCall ],
565
+ execute: [ Chef::Resource::Execute, Chef::Provider::Execute ],
566
+ file: [ Chef::Resource::File, Chef::Provider::File ],
567
+ gem_package: [ Chef::Resource::GemPackage, Chef::Provider::Package::Rubygems ],
568
+ git: [ Chef::Resource::Git, Chef::Provider::Git ],
569
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Gpasswd ],
570
+ homebrew_package: [ Chef::Resource::HomebrewPackage, Chef::Provider::Package::Homebrew ],
571
+ http_request: [ Chef::Resource::HttpRequest, Chef::Provider::HttpRequest ],
572
+ ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
573
+ link: [ Chef::Resource::Link, Chef::Provider::Link ],
574
+ log: [ Chef::Resource::Log, Chef::Provider::Log::ChefLog ],
575
+ macports_package: [ Chef::Resource::MacportsPackage, Chef::Provider::Package::Macports ],
576
+ mdadm: [ Chef::Resource::Mdadm, Chef::Provider::Mdadm ],
577
+ mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Mount ],
578
+ perl: [ Chef::Resource::Perl, Chef::Provider::Script ],
579
+ portage_package: [ Chef::Resource::PortagePackage, Chef::Provider::Package::Portage ],
580
+ python: [ Chef::Resource::Python, Chef::Provider::Script ],
581
+ remote_directory: [ Chef::Resource::RemoteDirectory, Chef::Provider::RemoteDirectory ],
582
+ route: [ Chef::Resource::Route, Chef::Provider::Route ],
583
+ ruby: [ Chef::Resource::Ruby, Chef::Provider::Script ],
584
+ ruby_block: [ Chef::Resource::RubyBlock, Chef::Provider::RubyBlock ],
585
+ script: [ Chef::Resource::Script, Chef::Provider::Script ],
586
+ subversion: [ Chef::Resource::Subversion, Chef::Provider::Subversion ],
587
+ template: [ Chef::Resource::Template, Chef::Provider::Template ],
588
+ timestamped_deploy: [ Chef::Resource::TimestampedDeploy, Chef::Provider::Deploy::Timestamped ],
589
+ aix_user: [ Chef::Resource::User::AixUser, Chef::Provider::User::Aix ],
590
+ dscl_user: [ Chef::Resource::User::DsclUser, Chef::Provider::User::Dscl ],
591
+ linux_user: [ Chef::Resource::User::LinuxUser, Chef::Provider::User::Linux ],
592
+ pw_user: [ Chef::Resource::User::PwUser, Chef::Provider::User::Pw ],
593
+ solaris_user: [ Chef::Resource::User::SolarisUser, Chef::Provider::User::Solaris ],
594
+ windows_user: [ Chef::Resource::User::WindowsUser, Chef::Provider::User::Windows ],
595
+ whyrun_safe_ruby_block: [ Chef::Resource::WhyrunSafeRubyBlock, Chef::Provider::WhyrunSafeRubyBlock ],
596
+
597
+ # We want to check that these are unsupported:
598
+ apt_package: nil,
599
+ bff_package: nil,
600
+ dpkg_package: nil,
601
+ dsc_script: nil,
602
+ ips_package: nil,
603
+ pacman_package: nil,
604
+ paludis_package: nil,
605
+ rpm_package: nil,
606
+ smartos_package: nil,
607
+ solaris_package: nil,
608
+ yum_package: nil,
609
+ windows_package: nil,
610
+ windows_service: nil,
611
+
612
+ "linux" => {
613
+ apt_package: [ Chef::Resource::AptPackage, Chef::Provider::Package::Apt ],
614
+ dpkg_package: [ Chef::Resource::DpkgPackage, Chef::Provider::Package::Dpkg ],
615
+ pacman_package: [ Chef::Resource::PacmanPackage, Chef::Provider::Package::Pacman ],
616
+ paludis_package: [ Chef::Resource::PaludisPackage, Chef::Provider::Package::Paludis ],
617
+ rpm_package: [ Chef::Resource::RpmPackage, Chef::Provider::Package::Rpm ],
618
+ yum_package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ],
585
619
 
586
620
  "debian" => {
587
- "7.0" => {
588
- },
589
- "6.0" => {
590
- ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
591
- # service: [ Chef::Resource::InsservService, Chef::Provider::Service::Insserv ],
592
- },
593
- "5.0" => {
594
- ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
621
+ ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig::Debian ],
622
+ package: [ Chef::Resource::AptPackage, Chef::Provider::Package::Apt ],
623
+ # service: [ Chef::Resource::DebianService, Chef::Provider::Service::Debian ],
624
+
625
+ "debian" => {
626
+ "7.0" => {
627
+ },
628
+ "6.0" => {
629
+ ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
630
+ # service: [ Chef::Resource::InsservService, Chef::Provider::Service::Insserv ],
631
+ },
632
+ "5.0" => {
633
+ ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
634
+ },
635
+ },
636
+ "gcel" => {
637
+ "3.1.4" => {
638
+ ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
639
+ },
640
+ },
641
+ "linaro" => {
642
+ "3.1.4" => {
643
+ ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
644
+ },
645
+ },
646
+ "linuxmint" => {
647
+ "3.1.4" => {
648
+ ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
649
+ # service: [ Chef::Resource::UpstartService, Chef::Provider::Service::Upstart ],
650
+ },
651
+ },
652
+ "raspbian" => {
653
+ "3.1.4" => {
654
+ ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
655
+ },
656
+ },
657
+ "ubuntu" => {
658
+ "11.10" => {
659
+ },
660
+ "10.04" => {
661
+ ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
662
+ },
595
663
  },
596
664
  },
597
- "gcel" => {
598
- "3.1.4" => {
599
- ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
600
- },
601
- },
602
- "linaro" => {
603
- "3.1.4" => {
604
- ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
605
- },
606
- },
607
- "linuxmint" => {
608
- "3.1.4" => {
609
- ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
610
- # service: [ Chef::Resource::UpstartService, Chef::Provider::Service::Upstart ],
611
- },
612
- },
613
- "raspbian" => {
614
- "3.1.4" => {
615
- ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
616
- },
617
- },
618
- "ubuntu" => {
619
- "11.10" => {
620
- },
621
- "10.04" => {
622
- ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ],
623
- },
624
- },
625
- },
626
-
627
- "arch" => {
628
- # TODO should be Chef::Resource::PacmanPackage
629
- package: [ Chef::Resource::Package, Chef::Provider::Package::Pacman ],
630
665
 
631
666
  "arch" => {
632
- "3.1.4" => {
633
- },
634
- },
635
- },
636
-
637
- "freebsd" => {
638
- group: [ Chef::Resource::Group, Chef::Provider::Group::Pw ],
639
- user: [ Chef::Resource::User, Chef::Provider::User::Pw ],
667
+ # TODO should be Chef::Resource::PacmanPackage
668
+ package: [ Chef::Resource::Package, Chef::Provider::Package::Pacman ],
640
669
 
641
- "freebsd" => {
642
- "3.1.4" => {
670
+ "arch" => {
671
+ "3.1.4" => {
672
+ },
643
673
  },
644
674
  },
645
- },
646
- "suse" => {
647
- group: [ Chef::Resource::Group, Chef::Provider::Group::Gpasswd ],
675
+
648
676
  "suse" => {
649
- "12.0" => {
650
- },
651
- %w{11.1 11.2 11.3} => {
652
- group: [ Chef::Resource::Group, Chef::Provider::Group::Suse ],
677
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Gpasswd ],
678
+ "suse" => {
679
+ "12.0" => {
680
+ },
681
+ %w{11.1 11.2 11.3} => {
682
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Suse ],
683
+ },
684
+ },
685
+ "opensuse" => {
686
+ # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ],
687
+ package: [ Chef::Resource::ZypperPackage, Chef::Provider::Package::Zypper ],
688
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Usermod ],
689
+ "12.3" => {
690
+ },
691
+ "12.2" => {
692
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Suse ],
693
+ },
653
694
  },
654
695
  },
655
- "opensuse" => {
656
- # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ],
657
- package: [ Chef::Resource::ZypperPackage, Chef::Provider::Package::Zypper ],
658
- group: [ Chef::Resource::Group, Chef::Provider::Group::Usermod ],
659
- "12.3" => {
660
- },
661
- "12.2" => {
662
- group: [ Chef::Resource::Group, Chef::Provider::Group::Suse ],
696
+
697
+ "gentoo" => {
698
+ # TODO should be Chef::Resource::PortagePackage
699
+ package: [ Chef::Resource::Package, Chef::Provider::Package::Portage ],
700
+ portage_package: [ Chef::Resource::PortagePackage, Chef::Provider::Package::Portage ],
701
+ # service: [ Chef::Resource::GentooService, Chef::Provider::Service::Gentoo ],
702
+
703
+ "gentoo" => {
704
+ "3.1.4" => {
705
+ },
663
706
  },
664
707
  },
665
- },
666
708
 
667
- "gentoo" => {
668
- # TODO should be Chef::Resource::PortagePackage
669
- package: [ Chef::Resource::Package, Chef::Provider::Package::Portage ],
670
- portage_package: [ Chef::Resource::PortagePackage, Chef::Provider::Package::Portage ],
671
- # service: [ Chef::Resource::GentooService, Chef::Provider::Service::Gentoo ],
672
-
673
- "gentoo" => {
674
- "3.1.4" => {
709
+ "rhel" => {
710
+ # service: [ Chef::Resource::SystemdService, Chef::Provider::Service::Systemd ],
711
+ package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ],
712
+ ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig::Redhat ],
713
+
714
+ %w{amazon xcp xenserver ibm_powerkvm cloudlinux parallels} => {
715
+ "3.1.4" => {
716
+ # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ],
717
+ },
718
+ },
719
+ %w{redhat centos scientific oracle} => {
720
+ "7.0" => {
721
+ },
722
+ "6.0" => {
723
+ # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ],
724
+ },
725
+ },
726
+ "fedora" => {
727
+ "15.0" => {
728
+ },
729
+ "14.0" => {
730
+ # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ],
731
+ },
675
732
  },
676
733
  },
734
+
677
735
  },
678
736
 
679
- "rhel" => {
680
- # service: [ Chef::Resource::SystemdService, Chef::Provider::Service::Systemd ],
681
- package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ],
682
- ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig::Redhat ],
737
+ "freebsd" => {
738
+ "freebsd" => {
739
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Pw ],
740
+ user: [ Chef::Resource::User::PwUser, Chef::Provider::User::Pw ],
683
741
 
684
- %w{amazon xcp xenserver ibm_powerkvm cloudlinux parallels} => {
685
- "3.1.4" => {
686
- # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ],
687
- },
688
- },
689
- %w{redhat centos scientific oracle} => {
690
- "7.0" => {
691
- },
692
- "6.0" => {
693
- # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ],
694
- },
695
- },
696
- "fedora" => {
697
- "15.0" => {
698
- },
699
- "14.0" => {
700
- # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ],
742
+ "freebsd" => {
743
+ "10.3" => {
744
+ },
701
745
  },
702
746
  },
703
747
  },
704
748
 
705
- },
749
+ "darwin" => {
750
+ %w{mac_os_x mac_os_x_server} => {
751
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Dscl ],
752
+ package: [ Chef::Resource::HomebrewPackage, Chef::Provider::Package::Homebrew ],
753
+ osx_profile: [ Chef::Resource::OsxProfile, Chef::Provider::OsxProfile],
754
+ user: [ Chef::Resource::User::DsclUser, Chef::Provider::User::Dscl ],
706
755
 
707
- "darwin" => {
708
- %w{mac_os_x mac_os_x_server} => {
709
- group: [ Chef::Resource::Group, Chef::Provider::Group::Dscl ],
710
- package: [ Chef::Resource::HomebrewPackage, Chef::Provider::Package::Homebrew ],
711
- osx_profile: [ Chef::Resource::OsxProfile, Chef::Provider::OsxProfile],
712
- user: [ Chef::Resource::User, Chef::Provider::User::Dscl ],
713
-
714
- "mac_os_x" => {
715
- "10.9.2" => {
756
+ "mac_os_x" => {
757
+ "10.9.2" => {
758
+ },
716
759
  },
717
760
  },
718
761
  },
719
- },
720
-
721
- "windows" => {
722
- batch: [ Chef::Resource::Batch, Chef::Provider::Batch ],
723
- dsc_script: [ Chef::Resource::DscScript, Chef::Provider::DscScript ],
724
- env: [ Chef::Resource::Env, Chef::Provider::Env::Windows ],
725
- group: [ Chef::Resource::Group, Chef::Provider::Group::Windows ],
726
- mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Windows ],
727
- package: [ Chef::Resource::WindowsPackage, Chef::Provider::Package::Windows ],
728
- powershell_script: [ Chef::Resource::PowershellScript, Chef::Provider::PowershellScript ],
729
- service: [ Chef::Resource::WindowsService, Chef::Provider::Service::Windows ],
730
- user: [ Chef::Resource::User, Chef::Provider::User::Windows ],
731
- windows_package: [ Chef::Resource::WindowsPackage, Chef::Provider::Package::Windows ],
732
- windows_service: [ Chef::Resource::WindowsService, Chef::Provider::Service::Windows ],
733
762
 
734
763
  "windows" => {
735
- %w{mswin mingw32 windows} => {
736
- "10.9.2" => {
764
+ batch: [ Chef::Resource::Batch, Chef::Provider::Batch ],
765
+ dsc_script: [ Chef::Resource::DscScript, Chef::Provider::DscScript ],
766
+ env: [ Chef::Resource::Env, Chef::Provider::Env::Windows ],
767
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Windows ],
768
+ mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Windows ],
769
+ package: [ Chef::Resource::WindowsPackage, Chef::Provider::Package::Windows ],
770
+ powershell_script: [ Chef::Resource::PowershellScript, Chef::Provider::PowershellScript ],
771
+ service: [ Chef::Resource::WindowsService, Chef::Provider::Service::Windows ],
772
+ user: [ Chef::Resource::User::WindowsUser, Chef::Provider::User::Windows ],
773
+ windows_package: [ Chef::Resource::WindowsPackage, Chef::Provider::Package::Windows ],
774
+ windows_service: [ Chef::Resource::WindowsService, Chef::Provider::Service::Windows ],
775
+
776
+ "windows" => {
777
+ %w{mswin mingw32 windows} => {
778
+ "10.9.2" => {
779
+ },
737
780
  },
738
781
  },
739
782
  },
740
- },
741
-
742
- "aix" => {
743
- bff_package: [ Chef::Resource::BffPackage, Chef::Provider::Package::Aix ],
744
- cron: [ Chef::Resource::Cron, Chef::Provider::Cron::Aix ],
745
- group: [ Chef::Resource::Group, Chef::Provider::Group::Aix ],
746
- ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig::Aix ],
747
- mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Aix ],
748
- # TODO should be Chef::Resource::BffPackage
749
- package: [ Chef::Resource::Package, Chef::Provider::Package::Aix ],
750
- rpm_package: [ Chef::Resource::RpmPackage, Chef::Provider::Package::Rpm ],
751
- user: [ Chef::Resource::User, Chef::Provider::User::Aix ],
752
- # service: [ Chef::Resource::AixService, Chef::Provider::Service::Aix ],
753
783
 
754
784
  "aix" => {
785
+ bff_package: [ Chef::Resource::BffPackage, Chef::Provider::Package::Aix ],
786
+ cron: [ Chef::Resource::Cron, Chef::Provider::Cron::Aix ],
787
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Aix ],
788
+ ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig::Aix ],
789
+ mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Aix ],
790
+ # TODO should be Chef::Resource::BffPackage
791
+ package: [ Chef::Resource::Package, Chef::Provider::Package::Aix ],
792
+ rpm_package: [ Chef::Resource::RpmPackage, Chef::Provider::Package::Rpm ],
793
+ user: [ Chef::Resource::User::AixUser, Chef::Provider::User::Aix ],
794
+ # service: [ Chef::Resource::AixService, Chef::Provider::Service::Aix ],
795
+
755
796
  "aix" => {
756
- "5.6" => {
797
+ "aix" => {
798
+ "5.6" => {
799
+ },
757
800
  },
758
801
  },
759
802
  },
760
- },
761
803
 
762
- "hpux" => {
763
804
  "hpux" => {
764
805
  "hpux" => {
765
- "3.1.4" => {
766
- group: [ Chef::Resource::Group, Chef::Provider::Group::Usermod ],
806
+ "hpux" => {
807
+ "3.1.4" => {
808
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Usermod ],
809
+ },
767
810
  },
768
811
  },
769
812
  },
770
- },
771
813
 
772
- "netbsd" => {
773
814
  "netbsd" => {
774
815
  "netbsd" => {
775
- "3.1.4" => {
776
- group: [ Chef::Resource::Group, Chef::Provider::Group::Groupmod ],
816
+ "netbsd" => {
817
+ "3.1.4" => {
818
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Groupmod ],
819
+ },
777
820
  },
778
821
  },
779
822
  },
780
- },
781
-
782
- "openbsd" => {
783
- group: [ Chef::Resource::Group, Chef::Provider::Group::Usermod ],
784
- package: [ Chef::Resource::OpenbsdPackage, Chef::Provider::Package::Openbsd ],
785
823
 
786
824
  "openbsd" => {
825
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Usermod ],
826
+ package: [ Chef::Resource::OpenbsdPackage, Chef::Provider::Package::Openbsd ],
827
+
787
828
  "openbsd" => {
788
- "3.1.4" => {
829
+ "openbsd" => {
830
+ "3.1.4" => {
831
+ },
789
832
  },
790
833
  },
791
834
  },
792
- },
793
-
794
- "solaris2" => {
795
- group: [ Chef::Resource::Group, Chef::Provider::Group::Usermod ],
796
- ips_package: [ Chef::Resource::IpsPackage, Chef::Provider::Package::Ips ],
797
- package: [ Chef::Resource::SolarisPackage, Chef::Provider::Package::Solaris ],
798
- mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Solaris ],
799
- solaris_package: [ Chef::Resource::SolarisPackage, Chef::Provider::Package::Solaris ],
800
835
 
801
- "smartos" => {
802
- smartos_package: [ Chef::Resource::SmartosPackage, Chef::Provider::Package::SmartOS ],
803
- package: [ Chef::Resource::SmartosPackage, Chef::Provider::Package::SmartOS ],
836
+ "solaris2" => {
837
+ group: [ Chef::Resource::Group, Chef::Provider::Group::Usermod ],
838
+ ips_package: [ Chef::Resource::IpsPackage, Chef::Provider::Package::Ips ],
839
+ package: [ Chef::Resource::SolarisPackage, Chef::Provider::Package::Solaris ],
840
+ mount: [ Chef::Resource::Mount, Chef::Provider::Mount::Solaris ],
841
+ solaris_package: [ Chef::Resource::SolarisPackage, Chef::Provider::Package::Solaris ],
804
842
 
805
843
  "smartos" => {
806
- "3.1.4" => {
807
- },
808
- },
809
- },
844
+ smartos_package: [ Chef::Resource::SmartosPackage, Chef::Provider::Package::SmartOS ],
845
+ package: [ Chef::Resource::SmartosPackage, Chef::Provider::Package::SmartOS ],
810
846
 
811
- "solaris2" => {
812
- "nexentacore" => {
813
- "3.1.4" => {
814
- },
815
- },
816
- "omnios" => {
817
- "3.1.4" => {
818
- user: [ Chef::Resource::User, Chef::Provider::User::Solaris ],
819
- },
820
- },
821
- "openindiana" => {
822
- "3.1.4" => {
823
- },
824
- },
825
- "opensolaris" => {
826
- "3.1.4" => {
847
+ "smartos" => {
848
+ "3.1.4" => {
849
+ },
827
850
  },
828
851
  },
852
+
829
853
  "solaris2" => {
830
- user: [ Chef::Resource::User, Chef::Provider::User::Solaris ],
831
- "5.11" => {
832
- package: [ Chef::Resource::IpsPackage, Chef::Provider::Package::Ips ],
833
- },
834
- "5.9" => {
854
+ "nexentacore" => {
855
+ "3.1.4" => {
856
+ },
857
+ },
858
+ "omnios" => {
859
+ "3.1.4" => {
860
+ user: [ Chef::Resource::User::SolarisUser, Chef::Provider::User::Solaris ],
861
+ },
862
+ },
863
+ "openindiana" => {
864
+ "3.1.4" => {
865
+ },
866
+ },
867
+ "opensolaris" => {
868
+ "3.1.4" => {
869
+ },
870
+ },
871
+ "solaris2" => {
872
+ user: [ Chef::Resource::User::SolarisUser, Chef::Provider::User::Solaris ],
873
+ "5.11" => {
874
+ package: [ Chef::Resource::IpsPackage, Chef::Provider::Package::Ips ],
875
+ },
876
+ "5.9" => {
877
+ },
835
878
  },
836
879
  },
837
- },
838
880
 
839
- },
881
+ },
840
882
 
841
- "solaris" => {
842
883
  "solaris" => {
843
884
  "solaris" => {
844
- "3.1.4" => {
885
+ "solaris" => {
886
+ "3.1.4" => {
887
+ },
845
888
  },
846
889
  },
847
890
  },
848
- },
849
891
 
850
- "exherbo" => {
851
892
  "exherbo" => {
852
893
  "exherbo" => {
853
- "3.1.4" => {
854
- # TODO should be Chef::Resource::PaludisPackage
855
- package: [ Chef::Resource::Package, Chef::Provider::Package::Paludis ],
894
+ "exherbo" => {
895
+ "3.1.4" => {
896
+ # TODO should be Chef::Resource::PaludisPackage
897
+ package: [ Chef::Resource::Package, Chef::Provider::Package::Paludis ],
898
+ },
856
899
  },
857
900
  },
858
901
  },
859
- },
860
- }
902
+ }
861
903
 
862
904
  def self.create_provider_tests(providers, test, expected, filter)
863
905
  expected = expected.merge(providers.select { |key, value| key.is_a?(Symbol) })