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.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +48 -95
- data/Gemfile +6 -1
- data/README.md +9 -11
- data/VERSION +1 -1
- data/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +0 -1
- data/acceptance/Gemfile +4 -7
- data/acceptance/Gemfile.lock +59 -92
- data/acceptance/basics/test/integration/helpers/serverspec/Gemfile +8 -0
- data/acceptance/data-collector/test/integration/helpers/serverspec/Gemfile +8 -0
- data/acceptance/fips/test/integration/fips-integration/serverspec/Gemfile +6 -0
- data/acceptance/fips/test/integration/fips-unit-functional/serverspec/Gemfile +4 -0
- data/chef.gemspec +3 -2
- data/lib/chef/application/client.rb +4 -4
- data/lib/chef/application/solo.rb +2 -2
- data/lib/chef/chef_fs/command_line.rb +36 -34
- data/lib/chef/chef_fs/data_handler/data_handler_base.rb +2 -2
- data/lib/chef/chef_fs/file_pattern.rb +1 -1
- data/lib/chef/chef_fs/file_system.rb +139 -137
- data/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb +2 -6
- data/lib/chef/cookbook/cookbook_version_loader.rb +27 -22
- data/lib/chef/cookbook/metadata.rb +1 -1
- data/lib/chef/cookbook/synchronizer.rb +3 -3
- data/lib/chef/cookbook_site_streaming_uploader.rb +3 -3
- data/lib/chef/cookbook_uploader.rb +1 -1
- data/lib/chef/cookbook_version.rb +6 -6
- data/lib/chef/dsl/powershell.rb +1 -1
- data/lib/chef/event_dispatch/base.rb +2 -2
- data/lib/chef/exceptions.rb +1 -1
- data/lib/chef/file_cache.rb +1 -1
- data/lib/chef/formatters/base.rb +2 -2
- data/lib/chef/formatters/doc.rb +2 -2
- data/lib/chef/http.rb +48 -18
- data/lib/chef/http/auth_credentials.rb +1 -1
- data/lib/chef/http/basic_client.rb +11 -2
- data/lib/chef/http/socketless_chef_zero_client.rb +2 -2
- data/lib/chef/key.rb +55 -56
- data/lib/chef/knife.rb +70 -61
- data/lib/chef/knife/client_delete.rb +2 -2
- data/lib/chef/knife/cookbook_bulk_delete.rb +1 -1
- data/lib/chef/knife/cookbook_show.rb +1 -1
- data/lib/chef/knife/core/gem_glob_loader.rb +3 -3
- data/lib/chef/knife/search.rb +2 -2
- data/lib/chef/knife/ssh.rb +19 -21
- data/lib/chef/knife/status.rb +2 -2
- data/lib/chef/mixin/command/unix.rb +2 -2
- data/lib/chef/mixin/powershell_type_coercions.rb +1 -1
- data/lib/chef/mixin/properties.rb +3 -0
- data/lib/chef/mixin/securable.rb +2 -2
- data/lib/chef/mixin/shell_out.rb +30 -0
- data/lib/chef/mixin/uris.rb +2 -1
- data/lib/chef/mixin/windows_architecture_helper.rb +3 -4
- data/lib/chef/monkey_patches/webrick-utils.rb +2 -2
- data/lib/chef/monologger.rb +1 -1
- data/lib/chef/node.rb +2 -2
- data/lib/chef/node/attribute.rb +3 -3
- data/lib/chef/platform/provider_mapping.rb +5 -2
- data/lib/chef/property.rb +14 -3
- data/lib/chef/provider/apt_repository.rb +3 -7
- data/lib/chef/provider/apt_update.rb +4 -6
- data/lib/chef/provider/cron.rb +1 -2
- data/lib/chef/provider/dsc_script.rb +4 -4
- data/lib/chef/provider/group/usermod.rb +1 -1
- data/lib/chef/provider/link.rb +10 -3
- data/lib/chef/provider/osx_profile.rb +10 -10
- data/lib/chef/provider/package.rb +2 -12
- data/lib/chef/provider/package/rubygems.rb +17 -16
- data/lib/chef/provider/package/windows.rb +2 -0
- data/lib/chef/provider/package/windows/exe.rb +1 -1
- data/lib/chef/provider/package/windows/registry_uninstall_entry.rb +0 -2
- data/lib/chef/provider/package/yum/rpm_utils.rb +8 -8
- data/lib/chef/provider/package/yum/yum_cache.rb +1 -1
- data/lib/chef/provider/remote_file/ftp.rb +2 -2
- data/lib/chef/provider/remote_file/sftp.rb +2 -2
- data/lib/chef/provider/service/debian.rb +2 -2
- data/lib/chef/provider/service/simple.rb +4 -3
- data/lib/chef/provider/service/solaris.rb +1 -1
- data/lib/chef/provider/service/systemd.rb +2 -2
- data/lib/chef/provider/service/upstart.rb +8 -5
- data/lib/chef/provider/support/yum_repo.erb +125 -0
- data/lib/chef/provider/systemd_unit.rb +11 -2
- data/lib/chef/provider/template_finder.rb +1 -1
- data/lib/chef/provider/user.rb +20 -16
- data/lib/chef/provider/user/aix.rb +5 -2
- data/lib/chef/provider/user/dscl.rb +1 -0
- data/lib/chef/provider/user/linux.rb +128 -0
- data/lib/chef/provider/user/pw.rb +2 -1
- data/lib/chef/provider/user/solaris.rb +3 -2
- data/lib/chef/provider/user/useradd.rb +5 -4
- data/lib/chef/provider/user/windows.rb +1 -1
- data/lib/chef/provider/windows_script.rb +5 -2
- data/lib/chef/provider/yum_repository.rb +121 -0
- data/lib/chef/providers.rb +4 -2
- data/lib/chef/resource.rb +7 -9
- data/lib/chef/resource/conditional.rb +9 -1
- data/lib/chef/resource/launchd.rb +1 -1
- data/lib/chef/resource/user.rb +3 -3
- data/lib/chef/resource/user/aix_user.rb +31 -0
- data/lib/chef/resource/user/dscl_user.rb +31 -0
- data/lib/chef/resource/user/linux_user.rb +51 -0
- data/lib/chef/resource/user/pw_user.rb +31 -0
- data/lib/chef/resource/user/solaris_user.rb +31 -0
- data/lib/chef/resource/user/windows_user.rb +31 -0
- data/lib/chef/resource/yum_package.rb +13 -12
- data/lib/chef/resource/yum_repository.rb +76 -0
- data/lib/chef/resource_builder.rb +1 -1
- data/lib/chef/resource_collection/stepable_iterator.rb +1 -3
- data/lib/chef/resource_reporter.rb +5 -5
- data/lib/chef/resources.rb +7 -0
- data/lib/chef/run_context.rb +5 -3
- data/lib/chef/run_context/cookbook_compiler.rb +3 -2
- data/lib/chef/run_list.rb +2 -2
- data/lib/chef/search/query.rb +11 -8
- data/lib/chef/shell/ext.rb +2 -2
- data/lib/chef/shell/shell_session.rb +1 -1
- data/lib/chef/util/dsc/configuration_generator.rb +1 -1
- data/lib/chef/util/powershell/cmdlet.rb +5 -2
- data/lib/chef/util/selinux.rb +1 -1
- data/lib/chef/version.rb +1 -1
- data/lib/chef/version_class.rb +2 -2
- data/lib/chef/version_constraint.rb +2 -2
- data/lib/chef/win32/api/error.rb +2 -2
- data/lib/chef/win32/api/net.rb +1 -1
- data/lib/chef/win32/eventlog.rb +1 -1
- data/lib/chef/win32/net.rb +1 -1
- data/lib/chef/win32/security/sid.rb +1 -1
- data/spec/functional/assets/testchefsubsys +2 -3
- data/spec/functional/event_loggers/windows_eventlog_spec.rb +11 -8
- data/spec/functional/file_content_management/deploy_strategies_spec.rb +1 -1
- data/spec/functional/http/simple_spec.rb +2 -2
- data/spec/functional/knife/cookbook_delete_spec.rb +5 -5
- data/spec/functional/knife/exec_spec.rb +6 -6
- data/spec/functional/knife/ssh_spec.rb +4 -4
- data/spec/functional/notifications_spec.rb +2 -2
- data/spec/functional/provider/whyrun_safe_ruby_block_spec.rb +2 -2
- data/spec/functional/rebooter_spec.rb +5 -5
- data/spec/functional/resource/bash_spec.rb +2 -2
- data/spec/functional/resource/deploy_revision_spec.rb +1 -1
- data/spec/functional/resource/dpkg_package_spec.rb +2 -2
- data/spec/functional/resource/dsc_resource_spec.rb +5 -5
- data/spec/functional/resource/dsc_script_spec.rb +27 -22
- data/spec/functional/resource/env_spec.rb +4 -4
- data/spec/functional/resource/execute_spec.rb +4 -4
- data/spec/functional/resource/group_spec.rb +20 -8
- data/spec/functional/resource/link_spec.rb +34 -0
- data/spec/functional/resource/ohai_spec.rb +6 -6
- data/spec/functional/resource/reboot_spec.rb +2 -2
- data/spec/functional/resource/remote_file_spec.rb +16 -7
- data/spec/functional/resource/user/dscl_spec.rb +3 -3
- data/spec/functional/resource/user/useradd_spec.rb +32 -26
- data/spec/functional/resource/windows_service_spec.rb +15 -15
- data/spec/functional/rest_spec.rb +2 -2
- data/spec/functional/run_lock_spec.rb +9 -9
- data/spec/functional/tiny_server_spec.rb +9 -8
- data/spec/functional/win32/crypto_spec.rb +1 -1
- data/spec/functional/win32/security_spec.rb +8 -8
- data/spec/integration/client/client_spec.rb +6 -4
- data/spec/integration/knife/chef_repo_path_spec.rb +70 -1
- data/spec/integration/knife/upload_spec.rb +1 -1
- data/spec/integration/recipes/lwrp_inline_resources_spec.rb +6 -6
- data/spec/integration/recipes/noop_resource_spec.rb +4 -4
- data/spec/integration/recipes/provider_choice.rb +3 -3
- data/spec/integration/recipes/recipe_dsl_spec.rb +318 -317
- data/spec/integration/recipes/resource_action_spec.rb +50 -54
- data/spec/integration/recipes/resource_converge_if_changed_spec.rb +34 -34
- data/spec/integration/recipes/resource_load_spec.rb +24 -24
- data/spec/integration/solo/solo_spec.rb +21 -30
- data/spec/scripts/ssl-serve.rb +1 -1
- data/spec/spec_helper.rb +1 -0
- data/spec/stress/win32/security_spec.rb +4 -4
- data/spec/support/chef_helpers.rb +22 -0
- data/spec/support/platform_helpers.rb +5 -1
- data/spec/support/shared/context/client.rb +3 -2
- data/spec/support/shared/functional/file_resource.rb +5 -4
- data/spec/support/shared/functional/http.rb +16 -16
- data/spec/support/shared/functional/securable_resource.rb +5 -5
- data/spec/support/shared/functional/win32_service.rb +5 -7
- data/spec/support/shared/integration/app_server_support.rb +1 -3
- data/spec/support/shared/integration/knife_support.rb +0 -2
- data/spec/support/shared/shared_examples.rb +2 -2
- data/spec/support/shared/unit/api_versioning.rb +2 -2
- data/spec/support/shared/unit/application_dot_d.rb +9 -6
- data/spec/support/shared/unit/provider/file.rb +2 -2
- data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +49 -80
- data/spec/support/shared/unit/resource/static_provider_resolution.rb +2 -2
- data/spec/support/shared/unit/script_resource.rb +4 -4
- data/spec/support/shared/unit/user_and_client_shared.rb +4 -4
- data/spec/tiny_server.rb +51 -66
- data/spec/unit/api_client_v1_spec.rb +2 -2
- data/spec/unit/application_spec.rb +1 -1
- data/spec/unit/audit/audit_event_proxy_spec.rb +34 -27
- data/spec/unit/audit/audit_reporter_spec.rb +32 -23
- data/spec/unit/audit/control_group_data_spec.rb +19 -14
- data/spec/unit/chef_class_spec.rb +1 -1
- data/spec/unit/chef_fs/data_handler/group_handler_spec.rb +1 -1
- data/spec/unit/chef_fs/diff_spec.rb +4 -4
- data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +4 -4
- data/spec/unit/chef_fs/file_system_spec.rb +2 -2
- data/spec/unit/chef_fs/parallelizer.rb +5 -7
- data/spec/unit/cookbook/metadata_spec.rb +98 -98
- data/spec/unit/cookbook/synchronizer_spec.rb +7 -0
- data/spec/unit/cookbook_loader_spec.rb +24 -24
- data/spec/unit/cookbook_version_file_specificity_spec.rb +8 -8
- data/spec/unit/daemon_spec.rb +1 -1
- data/spec/unit/data_bag_item_spec.rb +18 -18
- data/spec/unit/data_bag_spec.rb +2 -2
- data/spec/unit/data_collector/messages/helpers_spec.rb +9 -9
- data/spec/unit/data_collector/messages_spec.rb +2 -2
- data/spec/unit/data_collector_spec.rb +19 -19
- data/spec/unit/dsl/audit_spec.rb +3 -3
- data/spec/unit/dsl/data_query_spec.rb +3 -2
- data/spec/unit/dsl/declare_resource_spec.rb +10 -10
- data/spec/unit/encrypted_data_bag_item/check_encrypted_spec.rb +3 -2
- data/spec/unit/encrypted_data_bag_item_spec.rb +3 -2
- data/spec/unit/environment_spec.rb +6 -6
- data/spec/unit/event_dispatch/dispatcher_spec.rb +2 -2
- data/spec/unit/file_access_control_spec.rb +3 -3
- data/spec/unit/file_content_management/tempfile_spec.rb +2 -2
- data/spec/unit/formatters/error_inspectors/api_error_formatting_spec.rb +2 -2
- data/spec/unit/guard_interpreter/resource_guard_interpreter_spec.rb +2 -2
- data/spec/unit/http/basic_client_spec.rb +20 -0
- data/spec/unit/http/validate_content_length_spec.rb +8 -8
- data/spec/unit/http_spec.rb +14 -0
- data/spec/unit/knife/bootstrap/chef_vault_handler_spec.rb +2 -2
- data/spec/unit/knife/bootstrap/client_builder_spec.rb +2 -2
- data/spec/unit/knife/bootstrap_spec.rb +8 -6
- data/spec/unit/knife/client_bulk_delete_spec.rb +8 -8
- data/spec/unit/knife/client_edit_spec.rb +2 -2
- data/spec/unit/knife/configure_client_spec.rb +2 -2
- data/spec/unit/knife/cookbook_metadata_spec.rb +4 -4
- data/spec/unit/knife/cookbook_site_install_spec.rb +6 -5
- data/spec/unit/knife/cookbook_site_share_spec.rb +2 -2
- data/spec/unit/knife/core/hashed_command_loader_spec.rb +5 -4
- data/spec/unit/knife/core/node_editor_spec.rb +3 -3
- data/spec/unit/knife/core/ui_spec.rb +2 -2
- data/spec/unit/knife/data_bag_from_file_spec.rb +4 -3
- data/spec/unit/knife/data_bag_show_spec.rb +3 -2
- data/spec/unit/knife/key_create_spec.rb +14 -14
- data/spec/unit/knife/key_delete_spec.rb +2 -2
- data/spec/unit/knife/key_edit_spec.rb +16 -16
- data/spec/unit/knife/key_list_spec.rb +6 -6
- data/spec/unit/knife/key_show_spec.rb +4 -4
- data/spec/unit/knife/status_spec.rb +3 -2
- data/spec/unit/knife/user_create_spec.rb +4 -4
- data/spec/unit/knife_spec.rb +7 -6
- data/spec/unit/lwrp_spec.rb +6 -6
- data/spec/unit/mixin/api_version_request_handling_spec.rb +2 -2
- data/spec/unit/mixin/command_spec.rb +17 -14
- data/spec/unit/mixin/deprecation_spec.rb +1 -1
- data/spec/unit/mixin/homebrew_user_spec.rb +2 -2
- data/spec/unit/mixin/params_validate_spec.rb +53 -52
- data/spec/unit/mixin/powershell_out_spec.rb +2 -2
- data/spec/unit/mixin/powershell_type_coercions_spec.rb +2 -2
- data/spec/unit/mixin/shell_out_spec.rb +1 -1
- data/spec/unit/mixin/xml_escape_spec.rb +3 -3
- data/spec/unit/node_spec.rb +2 -2
- data/spec/unit/platform/query_helpers_spec.rb +3 -3
- data/spec/unit/property_spec.rb +4 -4
- data/spec/unit/provider/cookbook_file_spec.rb +4 -4
- data/spec/unit/provider/cron/unix_spec.rb +4 -4
- data/spec/unit/provider/cron_spec.rb +2 -2
- data/spec/unit/provider/deploy_spec.rb +8 -8
- data/spec/unit/provider/dsc_resource_spec.rb +11 -10
- data/spec/unit/provider/dsc_script_spec.rb +9 -9
- data/spec/unit/provider/env/windows_spec.rb +8 -8
- data/spec/unit/provider/file/content_spec.rb +6 -6
- data/spec/unit/provider/file_spec.rb +4 -4
- data/spec/unit/provider/launchd_spec.rb +2 -1
- data/spec/unit/provider/link_spec.rb +155 -0
- data/spec/unit/provider/mount/mount_spec.rb +5 -5
- data/spec/unit/provider/mount/solaris_spec.rb +48 -48
- data/spec/unit/provider/osx_profile_spec.rb +6 -0
- data/spec/unit/provider/package/chocolatey_spec.rb +4 -4
- data/spec/unit/provider/package/freebsd/port_spec.rb +4 -4
- data/spec/unit/provider/package/rubygems_spec.rb +50 -44
- data/spec/unit/provider/package/windows/exe_spec.rb +9 -0
- data/spec/unit/provider/package/yum_spec.rb +61 -60
- data/spec/unit/provider/package_spec.rb +2 -2
- data/spec/unit/provider/powershell_script_spec.rb +4 -4
- data/spec/unit/provider/remote_directory_spec.rb +1 -1
- data/spec/unit/provider/remote_file/ftp_spec.rb +4 -4
- data/spec/unit/provider/remote_file/local_file_spec.rb +4 -2
- data/spec/unit/provider/remote_file/sftp_spec.rb +4 -4
- data/spec/unit/provider/remote_file_spec.rb +4 -4
- data/spec/unit/provider/script_spec.rb +4 -4
- data/spec/unit/provider/service/debian_service_spec.rb +4 -4
- data/spec/unit/provider/service/freebsd_service_spec.rb +12 -8
- data/spec/unit/provider/service/openbsd_service_spec.rb +12 -8
- data/spec/unit/provider/service/systemd_service_spec.rb +4 -4
- data/spec/unit/provider/service/upstart_service_spec.rb +27 -12
- data/spec/unit/provider/service/windows_spec.rb +10 -10
- data/spec/unit/provider/systemd_unit_spec.rb +2 -2
- data/spec/unit/provider/template/content_spec.rb +8 -8
- data/spec/unit/provider/template_spec.rb +8 -8
- data/spec/unit/provider/user/dscl_spec.rb +51 -51
- data/spec/unit/provider/user/linux_spec.rb +76 -0
- data/spec/unit/provider/user/pw_spec.rb +3 -6
- data/spec/unit/provider/user/solaris_spec.rb +5 -5
- data/spec/unit/provider/user/windows_spec.rb +3 -3
- data/spec/unit/provider/user_spec.rb +2 -2
- data/spec/unit/provider/yum_repository_spec.rb +35 -0
- data/spec/unit/provider_resolver_spec.rb +306 -264
- data/spec/unit/recipe_spec.rb +8 -7
- data/spec/unit/resource/apt_repository_spec.rb +4 -4
- data/spec/unit/resource/apt_update_spec.rb +4 -4
- data/spec/unit/resource/conditional_spec.rb +46 -0
- data/spec/unit/resource/dsc_resource_spec.rb +8 -8
- data/spec/unit/resource/dsc_script_spec.rb +4 -4
- data/spec/unit/resource/freebsd_package_spec.rb +6 -6
- data/spec/unit/resource/launchd_spec.rb +3 -2
- data/spec/unit/resource/osx_profile_spec.rb +3 -2
- data/spec/unit/resource/remote_file_spec.rb +6 -6
- data/spec/unit/resource/service_spec.rb +14 -14
- data/spec/unit/resource/user_spec.rb +1 -1
- data/spec/unit/resource/yum_repository_spec.rb +49 -0
- data/spec/unit/resource_collection_spec.rb +4 -4
- data/spec/unit/resource_definition_spec.rb +11 -11
- data/spec/unit/resource_reporter_spec.rb +4 -4
- data/spec/unit/resource_resolver_spec.rb +6 -6
- data/spec/unit/resource_spec.rb +36 -16
- data/spec/unit/run_context/child_run_context_spec.rb +4 -4
- data/spec/unit/run_context/cookbook_compiler_spec.rb +43 -1
- data/spec/unit/run_context_spec.rb +8 -8
- data/spec/unit/run_list/run_list_expansion_spec.rb +2 -2
- data/spec/unit/runner_spec.rb +2 -2
- data/spec/unit/search/query_spec.rb +15 -14
- data/spec/unit/user_v1_spec.rb +8 -8
- data/spec/unit/util/dsc/configuration_generator_spec.rb +12 -12
- data/spec/unit/util/dsc/local_configuration_manager_spec.rb +12 -9
- data/spec/unit/util/dsc/resource_store.rb +8 -6
- data/spec/unit/util/editor_spec.rb +6 -6
- data/spec/unit/util/powershell/cmdlet_spec.rb +10 -10
- data/tasks/bin/bundle-platform +1 -0
- data/tasks/bin/bundler_patch.rb +27 -0
- data/tasks/cbgb.rb +2 -2
- data/tasks/maintainers.rb +2 -2
- metadata +37 -8
- 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
|
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 "
|
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
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
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
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
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
|
-
|
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
|
-
|
642
|
-
|
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
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
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
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
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
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
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
|
-
"
|
680
|
-
|
681
|
-
|
682
|
-
|
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
|
-
|
685
|
-
|
686
|
-
|
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
|
-
|
708
|
-
|
709
|
-
|
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
|
-
|
736
|
-
|
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
|
-
"
|
797
|
+
"aix" => {
|
798
|
+
"5.6" => {
|
799
|
+
},
|
757
800
|
},
|
758
801
|
},
|
759
802
|
},
|
760
|
-
},
|
761
803
|
|
762
|
-
"hpux" => {
|
763
804
|
"hpux" => {
|
764
805
|
"hpux" => {
|
765
|
-
"
|
766
|
-
|
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
|
-
"
|
776
|
-
|
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
|
-
"
|
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
|
-
"
|
802
|
-
|
803
|
-
|
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
|
-
|
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
|
-
|
812
|
-
|
813
|
-
|
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
|
-
|
831
|
-
|
832
|
-
|
833
|
-
},
|
834
|
-
"
|
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
|
-
"
|
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
|
-
"
|
854
|
-
|
855
|
-
|
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) })
|