chef 14.14.29 → 14.15.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +18 -7
- data/Rakefile +7 -4
- data/chef.gemspec +1 -1
- data/lib/chef/knife/ssh.rb +6 -0
- data/lib/chef/provider/ifconfig.rb +14 -5
- data/lib/chef/provider/windows_task.rb +9 -5
- data/lib/chef/resource/kernel_module.rb +61 -0
- data/lib/chef/resource/windows_task.rb +4 -0
- data/lib/chef/version.rb +1 -1
- data/lib/chef/win32/system.rb +0 -0
- data/spec/data/cookbooks/openldap/metadata.rb +2 -2
- data/spec/data/metadata/quick_start/metadata.rb +2 -7
- data/spec/functional/audit/runner_spec.rb +1 -1
- data/spec/functional/dsl/reboot_pending_spec.rb +7 -25
- data/spec/functional/event_loggers/windows_eventlog_spec.rb +6 -4
- data/spec/functional/file_content_management/deploy_strategies_spec.rb +21 -21
- data/spec/functional/knife/exec_spec.rb +1 -1
- data/spec/functional/knife/ssh_spec.rb +3 -3
- data/spec/functional/mixin/user_context_spec.rb +3 -1
- data/spec/functional/rebooter_spec.rb +1 -1
- data/spec/functional/resource/aix_service_spec.rb +1 -1
- data/spec/functional/resource/aixinit_service_spec.rb +1 -1
- data/spec/functional/resource/apt_package_spec.rb +1 -1
- data/spec/functional/resource/chocolatey_package_spec.rb +2 -2
- data/spec/functional/resource/cookbook_file_spec.rb +1 -3
- data/spec/functional/resource/cron_spec.rb +4 -3
- data/spec/functional/resource/dpkg_package_spec.rb +4 -4
- data/spec/functional/resource/dsc_resource_spec.rb +2 -1
- data/spec/functional/resource/dsc_script_spec.rb +16 -20
- data/spec/functional/resource/execute_spec.rb +2 -2
- data/spec/functional/resource/git_spec.rb +6 -6
- data/spec/functional/resource/group_spec.rb +8 -6
- data/spec/functional/resource/ifconfig_spec.rb +3 -5
- data/spec/functional/resource/link_spec.rb +2 -2
- data/spec/functional/resource/mount_spec.rb +3 -7
- data/spec/functional/resource/powershell_script_spec.rb +9 -8
- data/spec/functional/resource/reboot_spec.rb +1 -1
- data/spec/functional/resource/remote_file_spec.rb +2 -2
- data/spec/functional/resource/template_spec.rb +1 -1
- data/spec/functional/resource/user/windows_spec.rb +2 -2
- data/spec/functional/resource/windows_certificate_spec.rb +3 -3
- data/spec/functional/resource/windows_service_spec.rb +3 -3
- data/spec/functional/resource/windows_task_spec.rb +51 -0
- data/spec/functional/run_lock_spec.rb +10 -3
- data/spec/functional/shell_spec.rb +1 -1
- data/spec/functional/util/powershell/cmdlet_spec.rb +1 -1
- data/spec/functional/version_spec.rb +1 -1
- data/spec/functional/win32/security_spec.rb +12 -7
- data/spec/functional/win32/service_manager_spec.rb +1 -1
- data/spec/functional/win32/version_info_spec.rb +4 -4
- data/spec/integration/client/client_spec.rb +114 -132
- data/spec/integration/client/exit_code_spec.rb +8 -8
- data/spec/integration/client/ipv6_spec.rb +5 -5
- data/spec/integration/knife/chef_fs_data_store_spec.rb +38 -38
- data/spec/integration/knife/chef_repo_path_spec.rb +42 -42
- data/spec/integration/knife/chef_repository_file_system_spec.rb +9 -9
- data/spec/integration/knife/chefignore_spec.rb +13 -13
- data/spec/integration/knife/client_bulk_delete_spec.rb +8 -8
- data/spec/integration/knife/client_create_spec.rb +1 -1
- data/spec/integration/knife/client_delete_spec.rb +4 -4
- data/spec/integration/knife/client_key_delete_spec.rb +1 -1
- data/spec/integration/knife/client_key_list_spec.rb +1 -1
- data/spec/integration/knife/client_list_spec.rb +1 -1
- data/spec/integration/knife/common_options_spec.rb +1 -1
- data/spec/integration/knife/config_get_spec.rb +1 -1
- data/spec/integration/knife/config_list_profiles_spec.rb +2 -1
- data/spec/integration/knife/cookbook_api_ipv6_spec.rb +3 -3
- data/spec/integration/knife/cookbook_bulk_delete_spec.rb +3 -3
- data/spec/integration/knife/cookbook_download_spec.rb +4 -4
- data/spec/integration/knife/cookbook_list_spec.rb +2 -2
- data/spec/integration/knife/cookbook_show_spec.rb +3 -3
- data/spec/integration/knife/cookbook_upload_spec.rb +6 -6
- data/spec/integration/knife/data_bag_delete_spec.rb +4 -4
- data/spec/integration/knife/data_bag_from_file_spec.rb +7 -7
- data/spec/integration/knife/data_bag_list_spec.rb +1 -1
- data/spec/integration/knife/delete_spec.rb +37 -37
- data/spec/integration/knife/deps_spec.rb +23 -23
- data/spec/integration/knife/diff_spec.rb +23 -23
- data/spec/integration/knife/download_spec.rb +79 -79
- data/spec/integration/knife/environment_compare_spec.rb +3 -3
- data/spec/integration/knife/environment_from_file_spec.rb +6 -6
- data/spec/integration/knife/environment_list_spec.rb +1 -1
- data/spec/integration/knife/environment_show_spec.rb +4 -4
- data/spec/integration/knife/list_spec.rb +25 -25
- data/spec/integration/knife/node_bulk_delete_spec.rb +2 -2
- data/spec/integration/knife/node_delete_spec.rb +2 -2
- data/spec/integration/knife/node_environment_set_spec.rb +1 -1
- data/spec/integration/knife/node_from_file_spec.rb +2 -2
- data/spec/integration/knife/node_list_spec.rb +1 -1
- data/spec/integration/knife/raw_spec.rb +12 -12
- data/spec/integration/knife/redirection_spec.rb +1 -1
- data/spec/integration/knife/role_bulk_delete_spec.rb +2 -2
- data/spec/integration/knife/role_delete_spec.rb +2 -2
- data/spec/integration/knife/role_from_file_spec.rb +5 -5
- data/spec/integration/knife/role_list_spec.rb +1 -1
- data/spec/integration/knife/role_show_spec.rb +1 -1
- data/spec/integration/knife/show_spec.rb +10 -10
- data/spec/integration/knife/upload_spec.rb +85 -85
- data/spec/integration/recipes/accumulator_spec.rb +4 -4
- data/spec/integration/recipes/lwrp_inline_resources_spec.rb +6 -6
- data/spec/integration/recipes/lwrp_spec.rb +6 -6
- data/spec/integration/recipes/notifies_spec.rb +45 -45
- data/spec/integration/recipes/notifying_block_spec.rb +4 -4
- data/spec/integration/recipes/provider_choice.rb +1 -2
- data/spec/integration/recipes/recipe_dsl_spec.rb +9 -9
- data/spec/integration/recipes/remote_directory.rb +2 -2
- data/spec/integration/recipes/resource_action_spec.rb +1 -1
- data/spec/integration/recipes/resource_converge_if_changed_spec.rb +19 -19
- data/spec/integration/solo/solo_spec.rb +29 -29
- data/spec/scripts/ssl-serve.rb +1 -1
- data/spec/spec_helper.rb +11 -14
- data/spec/stress/win32/security_spec.rb +1 -1
- data/spec/support/lib/chef/resource/zen_follower.rb +1 -1
- data/spec/support/lib/chef/resource/zen_master.rb +1 -1
- data/spec/support/mock/platform.rb +2 -2
- data/spec/support/platform_helpers.rb +12 -3
- data/spec/support/platforms/win32/spec_service.rb +6 -10
- data/spec/support/shared/context/client.rb +2 -1
- data/spec/support/shared/functional/execute_resource.rb +4 -4
- data/spec/support/shared/functional/file_resource.rb +1 -3
- data/spec/support/shared/functional/http.rb +20 -44
- data/spec/support/shared/functional/securable_resource.rb +4 -8
- data/spec/support/shared/functional/win32_service.rb +1 -1
- data/spec/support/shared/functional/windows_script.rb +2 -1
- data/spec/support/shared/integration/app_server_support.rb +3 -4
- data/spec/support/shared/integration/integration_helper.rb +1 -0
- data/spec/support/shared/integration/knife_support.rb +5 -5
- data/spec/support/shared/unit/application_dot_d.rb +10 -4
- data/spec/support/shared/unit/file_system_support.rb +3 -2
- data/spec/support/shared/unit/platform_introspector.rb +12 -12
- data/spec/support/shared/unit/provider/file.rb +1 -1
- data/spec/support/shared/unit/script_resource.rb +1 -1
- data/spec/support/shared/unit/windows_script_resource.rb +1 -1
- data/spec/tiny_server.rb +1 -1
- data/spec/unit/api_client/registration_spec.rb +1 -1
- data/spec/unit/api_client_spec.rb +5 -5
- data/spec/unit/api_client_v1_spec.rb +6 -6
- data/spec/unit/application/client_spec.rb +8 -8
- data/spec/unit/application/exit_code_spec.rb +3 -2
- data/spec/unit/application/knife_spec.rb +1 -2
- data/spec/unit/audit/audit_event_proxy_spec.rb +14 -7
- data/spec/unit/audit/audit_reporter_spec.rb +20 -11
- data/spec/unit/audit/control_group_data_spec.rb +17 -12
- data/spec/unit/chef_fs/config_spec.rb +3 -3
- data/spec/unit/chef_fs/file_system/repository/directory_spec.rb +1 -1
- data/spec/unit/chef_fs/parallelizer.rb +1 -1
- data/spec/unit/client_spec.rb +3 -3
- data/spec/unit/config_fetcher_spec.rb +1 -1
- data/spec/unit/cookbook/metadata_spec.rb +13 -13
- data/spec/unit/cookbook/synchronizer_spec.rb +6 -6
- data/spec/unit/cookbook_loader_spec.rb +17 -17
- data/spec/unit/cookbook_manifest_spec.rb +9 -9
- data/spec/unit/cookbook_site_streaming_uploader_spec.rb +1 -2
- data/spec/unit/cookbook_uploader_spec.rb +2 -2
- data/spec/unit/cookbook_version_file_specificity_spec.rb +9 -9
- data/spec/unit/cookbook_version_spec.rb +2 -2
- data/spec/unit/data_bag_item_spec.rb +7 -7
- data/spec/unit/data_bag_spec.rb +1 -1
- data/spec/unit/data_collector_spec.rb +23 -23
- data/spec/unit/decorator_spec.rb +2 -2
- data/spec/unit/deprecated_spec.rb +2 -2
- data/spec/unit/dsl/data_query_spec.rb +3 -2
- data/spec/unit/dsl/declare_resource_spec.rb +1 -1
- data/spec/unit/dsl/platform_introspection_spec.rb +2 -2
- data/spec/unit/encrypted_data_bag_item/check_encrypted_spec.rb +2 -1
- data/spec/unit/encrypted_data_bag_item_spec.rb +2 -1
- data/spec/unit/environment_spec.rb +13 -13
- data/spec/unit/event_dispatch/dsl_spec.rb +1 -1
- data/spec/unit/file_content_management/deploy/mv_unix_spec.rb +3 -3
- data/spec/unit/file_content_management/deploy/mv_windows_spec.rb +2 -2
- data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +3 -3
- data/spec/unit/guard_interpreter/resource_guard_interpreter_spec.rb +1 -1
- data/spec/unit/http/authenticator_spec.rb +4 -3
- data/spec/unit/http/json_input_spec.rb +1 -1
- data/spec/unit/http/socketless_chef_zero_client_spec.rb +15 -15
- data/spec/unit/key_spec.rb +8 -8
- data/spec/unit/knife/bootstrap_spec.rb +14 -10
- data/spec/unit/knife/client_bulk_delete_spec.rb +4 -4
- data/spec/unit/knife/configure_client_spec.rb +1 -1
- data/spec/unit/knife/configure_spec.rb +1 -1
- data/spec/unit/knife/cookbook_bulk_delete_spec.rb +1 -1
- data/spec/unit/knife/cookbook_delete_spec.rb +2 -2
- data/spec/unit/knife/cookbook_download_spec.rb +2 -2
- data/spec/unit/knife/cookbook_metadata_spec.rb +4 -4
- data/spec/unit/knife/cookbook_upload_spec.rb +7 -5
- data/spec/unit/knife/core/bootstrap_context_spec.rb +1 -1
- data/spec/unit/knife/core/cookbook_scm_repo_spec.rb +2 -2
- data/spec/unit/knife/core/gem_glob_loader_spec.rb +4 -4
- data/spec/unit/knife/core/hashed_command_loader_spec.rb +4 -2
- data/spec/unit/knife/core/node_editor_spec.rb +12 -12
- data/spec/unit/knife/core/ui_spec.rb +11 -11
- data/spec/unit/knife/data_bag_from_file_spec.rb +2 -1
- data/spec/unit/knife/data_bag_show_spec.rb +2 -1
- data/spec/unit/knife/key_create_spec.rb +1 -1
- data/spec/unit/knife/key_delete_spec.rb +3 -3
- data/spec/unit/knife/key_edit_spec.rb +4 -4
- data/spec/unit/knife/key_list_spec.rb +1 -1
- data/spec/unit/knife/key_show_spec.rb +3 -3
- data/spec/unit/knife/node_bulk_delete_spec.rb +3 -3
- data/spec/unit/knife/node_delete_spec.rb +2 -2
- data/spec/unit/knife/node_edit_spec.rb +1 -1
- data/spec/unit/knife/node_environment_set_spec.rb +1 -1
- data/spec/unit/knife/node_from_file_spec.rb +1 -1
- data/spec/unit/knife/node_policy_set_spec.rb +1 -1
- data/spec/unit/knife/node_run_list_add_spec.rb +1 -1
- data/spec/unit/knife/node_run_list_remove_spec.rb +1 -1
- data/spec/unit/knife/node_run_list_set_spec.rb +1 -1
- data/spec/unit/knife/node_show_spec.rb +1 -1
- data/spec/unit/knife/raw_spec.rb +2 -2
- data/spec/unit/knife/role_bulk_delete_spec.rb +2 -2
- data/spec/unit/knife/role_create_spec.rb +1 -1
- data/spec/unit/knife/role_delete_spec.rb +1 -1
- data/spec/unit/knife/role_edit_spec.rb +1 -1
- data/spec/unit/knife/role_env_run_list_add_spec.rb +1 -1
- data/spec/unit/knife/role_env_run_list_clear_spec.rb +1 -1
- data/spec/unit/knife/role_env_run_list_remove_spec.rb +1 -1
- data/spec/unit/knife/role_env_run_list_replace_spec.rb +1 -1
- data/spec/unit/knife/role_env_run_list_set_spec.rb +1 -1
- data/spec/unit/knife/role_from_file_spec.rb +1 -1
- data/spec/unit/knife/role_run_list_add_spec.rb +1 -1
- data/spec/unit/knife/role_run_list_clear_spec.rb +1 -1
- data/spec/unit/knife/role_run_list_remove_spec.rb +1 -1
- data/spec/unit/knife/role_run_list_replace_spec.rb +1 -1
- data/spec/unit/knife/role_run_list_set_spec.rb +1 -1
- data/spec/unit/knife/ssh_spec.rb +27 -17
- data/spec/unit/knife/ssl_check_spec.rb +4 -4
- data/spec/unit/knife/ssl_fetch_spec.rb +5 -5
- data/spec/unit/knife/status_spec.rb +3 -2
- data/spec/unit/knife/supermarket_download_spec.rb +4 -4
- data/spec/unit/knife/supermarket_install_spec.rb +5 -4
- data/spec/unit/knife/supermarket_share_spec.rb +1 -1
- data/spec/unit/knife_spec.rb +34 -33
- data/spec/unit/lwrp_spec.rb +19 -19
- data/spec/unit/mixin/homebrew_user_spec.rb +1 -1
- data/spec/unit/mixin/params_validate_spec.rb +10 -10
- data/spec/unit/mixin/properties_spec.rb +4 -4
- data/spec/unit/mixin/shell_out_spec.rb +27 -27
- data/spec/unit/mixin/template_spec.rb +4 -8
- data/spec/unit/mixin/unformatter_spec.rb +1 -2
- data/spec/unit/mixin/user_context_spec.rb +1 -2
- data/spec/unit/mixin/which.rb +2 -0
- data/spec/unit/mixin/windows_architecture_helper_spec.rb +3 -3
- data/spec/unit/node/attribute_spec.rb +79 -79
- data/spec/unit/node/immutable_collections_spec.rb +50 -50
- data/spec/unit/node_spec.rb +16 -16
- data/spec/unit/org_spec.rb +3 -3
- data/spec/unit/policy_builder/policyfile_spec.rb +2 -2
- data/spec/unit/property/state_spec.rb +26 -25
- data/spec/unit/property/validation_spec.rb +14 -13
- data/spec/unit/property_spec.rb +10 -9
- data/spec/unit/provider/apt_update_spec.rb +6 -6
- data/spec/unit/provider/cron_spec.rb +15 -15
- data/spec/unit/provider/dsc_resource_spec.rb +6 -3
- data/spec/unit/provider/dsc_script_spec.rb +1 -1
- data/spec/unit/provider/execute_spec.rb +5 -5
- data/spec/unit/provider/git_spec.rb +39 -39
- data/spec/unit/provider/group/dscl_spec.rb +3 -3
- data/spec/unit/provider/group/groupadd_spec.rb +1 -1
- data/spec/unit/provider/group_spec.rb +2 -3
- data/spec/unit/provider/ifconfig/aix_spec.rb +1 -1
- data/spec/unit/provider/ifconfig/debian_spec.rb +2 -2
- data/spec/unit/provider/ifconfig_spec.rb +45 -16
- data/spec/unit/provider/launchd_spec.rb +23 -15
- data/spec/unit/provider/link_spec.rb +22 -11
- data/spec/unit/provider/mount/aix_spec.rb +6 -6
- data/spec/unit/provider/mount/mount_spec.rb +31 -31
- data/spec/unit/provider/mount/solaris_spec.rb +11 -11
- data/spec/unit/provider/ohai_spec.rb +1 -1
- data/spec/unit/provider/osx_profile_spec.rb +5 -7
- data/spec/unit/provider/package/apt_spec.rb +5 -5
- data/spec/unit/provider/package/bff_spec.rb +1 -1
- data/spec/unit/provider/package/cab_spec.rb +1 -1
- data/spec/unit/provider/package/chocolatey_spec.rb +8 -8
- data/spec/unit/provider/package/freebsd/pkg_spec.rb +1 -1
- data/spec/unit/provider/package/ips_spec.rb +6 -6
- data/spec/unit/provider/package/macports_spec.rb +1 -1
- data/spec/unit/provider/package/msu_spec.rb +1 -1
- data/spec/unit/provider/package/openbsd_spec.rb +15 -11
- data/spec/unit/provider/package/pacman_spec.rb +3 -3
- data/spec/unit/provider/package/paludis_spec.rb +4 -4
- data/spec/unit/provider/package/portage_spec.rb +1 -1
- data/spec/unit/provider/package/powershell_spec.rb +1 -1
- data/spec/unit/provider/package/smartos_spec.rb +3 -3
- data/spec/unit/provider/package/solaris_spec.rb +1 -1
- data/spec/unit/provider/package/windows/exe_spec.rb +9 -9
- data/spec/unit/provider/package/windows/msi_spec.rb +7 -7
- data/spec/unit/provider/package/windows_spec.rb +2 -1
- data/spec/unit/provider/package/yum/yum_cache_spec.rb +1 -1
- data/spec/unit/provider/package/zypper_spec.rb +4 -4
- data/spec/unit/provider/package_spec.rb +1 -1
- data/spec/unit/provider/powershell_script_spec.rb +7 -7
- data/spec/unit/provider/registry_key_spec.rb +1 -1
- data/spec/unit/provider/remote_directory_spec.rb +6 -6
- data/spec/unit/provider/route_spec.rb +11 -11
- data/spec/unit/provider/service/arch_service_spec.rb +13 -13
- data/spec/unit/provider/service/debian_service_spec.rb +2 -1
- data/spec/unit/provider/service/freebsd_service_spec.rb +28 -24
- data/spec/unit/provider/service/gentoo_service_spec.rb +2 -2
- data/spec/unit/provider/service/init_service_spec.rb +11 -11
- data/spec/unit/provider/service/invokercd_service_spec.rb +11 -11
- data/spec/unit/provider/service/macosx_spec.rb +5 -5
- data/spec/unit/provider/service/openbsd_service_spec.rb +15 -11
- data/spec/unit/provider/service/simple_service_spec.rb +7 -7
- data/spec/unit/provider/service/upstart_service_spec.rb +14 -14
- data/spec/unit/provider/service/windows_spec.rb +53 -35
- data/spec/unit/provider/subversion_spec.rb +8 -4
- data/spec/unit/provider/systemd_unit_spec.rb +142 -142
- data/spec/unit/provider/template/content_spec.rb +29 -29
- data/spec/unit/provider/windows_task_spec.rb +1 -1
- data/spec/unit/provider_resolver_spec.rb +75 -75
- data/spec/unit/provider_spec.rb +2 -4
- data/spec/unit/recipe_spec.rb +4 -4
- data/spec/unit/resource/batch_spec.rb +1 -1
- data/spec/unit/resource/chef_gem_spec.rb +1 -1
- data/spec/unit/resource/chocolatey_config_spec.rb +1 -1
- data/spec/unit/resource/chocolatey_source_spec.rb +1 -1
- data/spec/unit/resource/directory_spec.rb +1 -1
- data/spec/unit/resource/dnf_package_spec.rb +1 -1
- data/spec/unit/resource/dsc_resource_spec.rb +1 -1
- data/spec/unit/resource/file/verification_spec.rb +1 -2
- data/spec/unit/resource/file_spec.rb +1 -1
- data/spec/unit/resource/group_spec.rb +1 -1
- data/spec/unit/resource/link_spec.rb +1 -1
- data/spec/unit/resource/osx_profile_spec.rb +2 -1
- data/spec/unit/resource/powershell_script_spec.rb +12 -7
- data/spec/unit/resource/registry_key_spec.rb +3 -3
- data/spec/unit/resource/rhsm_subscription_spec.rb +1 -1
- data/spec/unit/resource/service_spec.rb +1 -1
- data/spec/unit/resource/template_spec.rb +2 -2
- data/spec/unit/resource/windows_env_spec.rb +1 -1
- data/spec/unit/resource/windows_service_spec.rb +5 -5
- data/spec/unit/resource/windows_task_spec.rb +6 -2
- data/spec/unit/resource/yum_package_spec.rb +1 -1
- data/spec/unit/resource_collection/resource_list_spec.rb +1 -1
- data/spec/unit/resource_collection/resource_set_spec.rb +7 -7
- data/spec/unit/resource_collection/stepable_iterator_spec.rb +2 -2
- data/spec/unit/resource_collection_spec.rb +4 -4
- data/spec/unit/resource_definition_spec.rb +2 -2
- data/spec/unit/resource_inspector_spec.rb +1 -1
- data/spec/unit/resource_reporter_spec.rb +4 -4
- data/spec/unit/resource_spec.rb +22 -22
- data/spec/unit/role_spec.rb +3 -3
- data/spec/unit/run_context/cookbook_compiler_spec.rb +23 -23
- data/spec/unit/run_list/run_list_expansion_spec.rb +9 -6
- data/spec/unit/run_list_spec.rb +1 -1
- data/spec/unit/runner_spec.rb +3 -3
- data/spec/unit/search/query_spec.rb +3 -2
- data/spec/unit/shell/model_wrapper_spec.rb +1 -1
- data/spec/unit/shell/shell_session_spec.rb +8 -11
- data/spec/unit/shell_spec.rb +1 -2
- data/spec/unit/user_spec.rb +4 -4
- data/spec/unit/user_v1_spec.rb +3 -3
- data/spec/unit/util/backup_spec.rb +1 -1
- data/spec/unit/util/dsc/lcm_output_parser_spec.rb +13 -13
- data/spec/unit/util/dsc/local_configuration_manager_spec.rb +3 -3
- data/spec/unit/util/editor_spec.rb +1 -1
- data/spec/unit/util/powershell/ps_credential_spec.rb +3 -2
- data/spec/unit/util/threaded_job_queue_spec.rb +2 -2
- data/spec/unit/version_class_spec.rb +4 -4
- data/spec/unit/win32/registry_spec.rb +5 -5
- data/spec/unit/win32/security_spec.rb +2 -1
- data/tasks/announce.rb +4 -11
- metadata +10 -6
- data/tasks/maintainers.rb +0 -211
- data/tasks/templates/prerelease.md.erb +0 -35
@@ -43,7 +43,7 @@ describe "Chef::Application::WindowsServiceManager", :windows_only, :system_wind
|
|
43
43
|
end
|
44
44
|
|
45
45
|
it "throws an error with required missing options" do
|
46
|
-
|
46
|
+
%i{service_name service_display_name service_description service_file_path}.each do |key|
|
47
47
|
service_def = test_service.dup
|
48
48
|
service_def.delete(key)
|
49
49
|
|
@@ -32,12 +32,12 @@ describe "Chef::ReservedNames::Win32::File::VersionInfo", :windows_only do
|
|
32
32
|
|
33
33
|
subject { Chef::ReservedNames::Win32::File::VersionInfo.new(file_path) }
|
34
34
|
|
35
|
-
it "file version has the same version as windows" do
|
36
|
-
expect(subject.FileVersion).to start_with(os_version)
|
35
|
+
it "file version has the same major.minor version as windows" do
|
36
|
+
expect(subject.FileVersion).to start_with(os_version.rpartition(".").first)
|
37
37
|
end
|
38
38
|
|
39
|
-
it "product version has the same version as windows" do
|
40
|
-
expect(subject.ProductVersion).to start_with(os_version)
|
39
|
+
it "product version has the same major.minor version as windows" do
|
40
|
+
expect(subject.ProductVersion).to start_with(os_version.rpartition(".").first)
|
41
41
|
end
|
42
42
|
|
43
43
|
it "company is microsoft" do
|
@@ -20,9 +20,7 @@ describe "chef-client" do
|
|
20
20
|
# just a normal file
|
21
21
|
# (expected_content should be uncompressed)
|
22
22
|
@api.get("/recipes.tgz", 200) do
|
23
|
-
File.open(recipes_filename, "rb")
|
24
|
-
f.read
|
25
|
-
end
|
23
|
+
File.open(recipes_filename, "rb", &:read)
|
26
24
|
end
|
27
25
|
end
|
28
26
|
|
@@ -56,35 +54,19 @@ describe "chef-client" do
|
|
56
54
|
it "should complete with success" do
|
57
55
|
file "config/client.rb", <<~EOM
|
58
56
|
local_mode true
|
59
|
-
cookbook_path "#{path_to(
|
60
|
-
EOM
|
61
|
-
|
62
|
-
shell_out!("#{chef_client} -c \"#{path_to('config/client.rb')}\" -o 'x::default'", cwd: chef_dir)
|
63
|
-
end
|
64
|
-
|
65
|
-
it "should complete successfully with no other environment variables", skip: (Chef::Platform.windows?) do
|
66
|
-
file "config/client.rb", <<~EOM
|
67
|
-
local_mode true
|
68
|
-
cookbook_path "#{path_to('cookbooks')}"
|
69
|
-
EOM
|
57
|
+
cookbook_path "#{path_to("cookbooks")}"
|
58
|
+
EOM
|
70
59
|
|
71
|
-
|
72
|
-
result = shell_out("env -i #{critical_env_vars} #{chef_client} -c \"#{path_to('config/client.rb')}\" -o 'x::default'", cwd: chef_dir)
|
73
|
-
result.error!
|
74
|
-
rescue
|
75
|
-
Chef::Log.info "Bare invocation will have the following load-path."
|
76
|
-
Chef::Log.info shell_out!("env -i #{critical_env_vars} ruby -e 'puts $:'").stdout
|
77
|
-
raise
|
78
|
-
end
|
60
|
+
shell_out!("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default'", cwd: chef_dir)
|
79
61
|
end
|
80
62
|
|
81
63
|
it "should complete successfully with --no-listen" do
|
82
64
|
file "config/client.rb", <<~EOM
|
83
65
|
local_mode true
|
84
|
-
cookbook_path "#{path_to(
|
85
|
-
EOM
|
66
|
+
cookbook_path "#{path_to("cookbooks")}"
|
67
|
+
EOM
|
86
68
|
|
87
|
-
result = shell_out("#{chef_client} --no-listen -c \"#{path_to(
|
69
|
+
result = shell_out("#{chef_client} --no-listen -c \"#{path_to("config/client.rb")}\" -o 'x::default'", cwd: chef_dir)
|
88
70
|
result.error!
|
89
71
|
end
|
90
72
|
|
@@ -125,10 +107,10 @@ EOM
|
|
125
107
|
it "should complete with success" do
|
126
108
|
file "config/client.rb", <<~EOM
|
127
109
|
local_mode true
|
128
|
-
cookbook_path "#{path_to(
|
129
|
-
EOM
|
110
|
+
cookbook_path "#{path_to("cookbooks")}"
|
111
|
+
EOM
|
130
112
|
|
131
|
-
result = shell_out("#{chef_client} -c \"#{path_to(
|
113
|
+
result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default'", cwd: chef_dir)
|
132
114
|
result.error!
|
133
115
|
end
|
134
116
|
|
@@ -162,40 +144,40 @@ EOM
|
|
162
144
|
syHLXYFNy0OxMtH/bBAXBGNHd9gf5uOnqh0pYcbe/uRAxumC7Rl0cL509eURiA2T
|
163
145
|
+vFmf54y9YdnLXaqv+FhJT6B6V7WX7IpU9BMqJY1cJYXHuHG2KA=
|
164
146
|
-----END RSA PRIVATE KEY-----
|
165
|
-
EOM
|
147
|
+
EOM
|
166
148
|
end
|
167
149
|
|
168
150
|
it "should complete with success even with a client key" do
|
169
151
|
file "config/client.rb", <<~EOM
|
170
152
|
local_mode true
|
171
|
-
client_key #{path_to(
|
172
|
-
cookbook_path #{path_to(
|
173
|
-
EOM
|
153
|
+
client_key #{path_to("mykey.pem").inspect}
|
154
|
+
cookbook_path #{path_to("cookbooks").inspect}
|
155
|
+
EOM
|
174
156
|
|
175
|
-
result = shell_out("#{chef_client} -c \"#{path_to(
|
157
|
+
result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default'", cwd: chef_dir)
|
176
158
|
result.error!
|
177
159
|
end
|
178
160
|
|
179
161
|
it "should run recipes specified directly on the command line" do
|
180
162
|
file "config/client.rb", <<~EOM
|
181
163
|
local_mode true
|
182
|
-
client_key #{path_to(
|
183
|
-
cookbook_path #{path_to(
|
184
|
-
EOM
|
164
|
+
client_key #{path_to("mykey.pem").inspect}
|
165
|
+
cookbook_path #{path_to("cookbooks").inspect}
|
166
|
+
EOM
|
185
167
|
|
186
168
|
file "arbitrary.rb", <<~EOM
|
187
|
-
file #{path_to(
|
169
|
+
file #{path_to("tempfile.txt").inspect} do
|
188
170
|
content '1'
|
189
171
|
end
|
190
|
-
EOM
|
172
|
+
EOM
|
191
173
|
|
192
174
|
file "arbitrary2.rb", <<~EOM
|
193
|
-
file #{path_to(
|
175
|
+
file #{path_to("tempfile2.txt").inspect} do
|
194
176
|
content '2'
|
195
177
|
end
|
196
|
-
EOM
|
178
|
+
EOM
|
197
179
|
|
198
|
-
result = shell_out("#{chef_client} -c \"#{path_to(
|
180
|
+
result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" #{path_to("arbitrary.rb")} #{path_to("arbitrary2.rb")}", cwd: chef_dir)
|
199
181
|
result.error!
|
200
182
|
|
201
183
|
expect(IO.read(path_to("tempfile.txt"))).to eq("1")
|
@@ -205,17 +187,17 @@ EOM
|
|
205
187
|
it "should run recipes specified as relative paths directly on the command line" do
|
206
188
|
file "config/client.rb", <<~EOM
|
207
189
|
local_mode true
|
208
|
-
client_key #{path_to(
|
209
|
-
cookbook_path #{path_to(
|
210
|
-
EOM
|
190
|
+
client_key #{path_to("mykey.pem").inspect}
|
191
|
+
cookbook_path #{path_to("cookbooks").inspect}
|
192
|
+
EOM
|
211
193
|
|
212
194
|
file "arbitrary.rb", <<~EOM
|
213
|
-
file #{path_to(
|
195
|
+
file #{path_to("tempfile.txt").inspect} do
|
214
196
|
content '1'
|
215
197
|
end
|
216
|
-
EOM
|
198
|
+
EOM
|
217
199
|
|
218
|
-
result = shell_out("#{chef_client} -c \"#{path_to(
|
200
|
+
result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" arbitrary.rb", cwd: path_to(""))
|
219
201
|
result.error!
|
220
202
|
|
221
203
|
expect(IO.read(path_to("tempfile.txt"))).to eq("1")
|
@@ -224,22 +206,22 @@ EOM
|
|
224
206
|
it "should run recipes specified directly on the command line AFTER recipes in the run list" do
|
225
207
|
file "config/client.rb", <<~EOM
|
226
208
|
local_mode true
|
227
|
-
client_key #{path_to(
|
228
|
-
cookbook_path #{path_to(
|
229
|
-
EOM
|
209
|
+
client_key #{path_to("mykey.pem").inspect}
|
210
|
+
cookbook_path #{path_to("cookbooks").inspect}
|
211
|
+
EOM
|
230
212
|
|
231
213
|
file "cookbooks/x/recipes/constant_definition.rb", <<~EOM
|
232
214
|
class ::Blah
|
233
215
|
THECONSTANT = '1'
|
234
216
|
end
|
235
|
-
EOM
|
217
|
+
EOM
|
236
218
|
file "arbitrary.rb", <<~EOM
|
237
|
-
file #{path_to(
|
219
|
+
file #{path_to("tempfile.txt").inspect} do
|
238
220
|
content ::Blah::THECONSTANT
|
239
221
|
end
|
240
|
-
EOM
|
222
|
+
EOM
|
241
223
|
|
242
|
-
result = shell_out("#{chef_client} -c \"#{path_to(
|
224
|
+
result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o x::constant_definition arbitrary.rb", cwd: path_to(""))
|
243
225
|
result.error!
|
244
226
|
|
245
227
|
expect(IO.read(path_to("tempfile.txt"))).to eq("1")
|
@@ -250,30 +232,30 @@ EOM
|
|
250
232
|
it "should complete with success when passed the -z flag" do
|
251
233
|
file "config/client.rb", <<~EOM
|
252
234
|
chef_server_url 'http://omg.com/blah'
|
253
|
-
cookbook_path "#{path_to(
|
254
|
-
EOM
|
235
|
+
cookbook_path "#{path_to("cookbooks")}"
|
236
|
+
EOM
|
255
237
|
|
256
|
-
result = shell_out("#{chef_client} -c \"#{path_to(
|
238
|
+
result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' -z", cwd: chef_dir)
|
257
239
|
result.error!
|
258
240
|
end
|
259
241
|
|
260
242
|
it "should complete with success when passed the --local-mode flag" do
|
261
243
|
file "config/client.rb", <<~EOM
|
262
244
|
chef_server_url 'http://omg.com/blah'
|
263
|
-
cookbook_path "#{path_to(
|
264
|
-
EOM
|
245
|
+
cookbook_path "#{path_to("cookbooks")}"
|
246
|
+
EOM
|
265
247
|
|
266
|
-
result = shell_out("#{chef_client} -c \"#{path_to(
|
248
|
+
result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --local-mode", cwd: chef_dir)
|
267
249
|
result.error!
|
268
250
|
end
|
269
251
|
|
270
252
|
it "should not print SSL warnings when running in local-mode" do
|
271
253
|
file "config/client.rb", <<~EOM
|
272
254
|
chef_server_url 'http://omg.com/blah'
|
273
|
-
cookbook_path "#{path_to(
|
274
|
-
EOM
|
255
|
+
cookbook_path "#{path_to("cookbooks")}"
|
256
|
+
EOM
|
275
257
|
|
276
|
-
result = shell_out("#{chef_client} -c \"#{path_to(
|
258
|
+
result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --local-mode", cwd: chef_dir)
|
277
259
|
expect(result.stdout).not_to include("SSL validation of HTTPS requests is disabled.")
|
278
260
|
result.error!
|
279
261
|
end
|
@@ -281,20 +263,20 @@ EOM
|
|
281
263
|
it "should complete with success when passed -z and --chef-zero-port" do
|
282
264
|
file "config/client.rb", <<~EOM
|
283
265
|
chef_server_url 'http://omg.com/blah'
|
284
|
-
cookbook_path "#{path_to(
|
285
|
-
EOM
|
266
|
+
cookbook_path "#{path_to("cookbooks")}"
|
267
|
+
EOM
|
286
268
|
|
287
|
-
result = shell_out("#{chef_client} -c \"#{path_to(
|
269
|
+
result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' -z", cwd: chef_dir)
|
288
270
|
result.error!
|
289
271
|
end
|
290
272
|
|
291
273
|
it "should complete with success when setting the run list with -r" do
|
292
274
|
file "config/client.rb", <<~EOM
|
293
275
|
chef_server_url 'http://omg.com/blah'
|
294
|
-
cookbook_path "#{path_to(
|
295
|
-
EOM
|
276
|
+
cookbook_path "#{path_to("cookbooks")}"
|
277
|
+
EOM
|
296
278
|
|
297
|
-
result = shell_out("#{chef_client} -c \"#{path_to(
|
279
|
+
result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -r 'x::default' -z -l info", cwd: chef_dir)
|
298
280
|
expect(result.stdout).not_to include("Overridden Run List")
|
299
281
|
expect(result.stdout).to include("Run List is [recipe[x::default]]")
|
300
282
|
result.error!
|
@@ -303,9 +285,9 @@ EOM
|
|
303
285
|
it "should complete with success when using --profile-ruby and output a profile file", :not_supported_on_aix do
|
304
286
|
file "config/client.rb", <<~EOM
|
305
287
|
local_mode true
|
306
|
-
cookbook_path "#{path_to(
|
307
|
-
EOM
|
308
|
-
result = shell_out!("#{chef_client} -c \"#{path_to(
|
288
|
+
cookbook_path "#{path_to("cookbooks")}"
|
289
|
+
EOM
|
290
|
+
result = shell_out!("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' -z --profile-ruby", cwd: chef_dir)
|
309
291
|
result.error!
|
310
292
|
expect(File.exist?(path_to("config/local-mode-cache/cache/graph_profile.out"))).to be true
|
311
293
|
end
|
@@ -313,9 +295,9 @@ EOM
|
|
313
295
|
it "doesn't produce a profile when --profile-ruby is not present" do
|
314
296
|
file "config/client.rb", <<~EOM
|
315
297
|
local_mode true
|
316
|
-
cookbook_path "#{path_to(
|
317
|
-
EOM
|
318
|
-
result = shell_out!("#{chef_client} -c \"#{path_to(
|
298
|
+
cookbook_path "#{path_to("cookbooks")}"
|
299
|
+
EOM
|
300
|
+
result = shell_out!("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' -z", cwd: chef_dir)
|
319
301
|
result.error!
|
320
302
|
expect(File.exist?(path_to("config/local-mode-cache/cache/graph_profile.out"))).to be false
|
321
303
|
end
|
@@ -328,14 +310,14 @@ EOM
|
|
328
310
|
name 'x'
|
329
311
|
version '0.0.1'
|
330
312
|
chef_version '~> 999.99'
|
331
|
-
EOM
|
313
|
+
EOM
|
332
314
|
file "config/client.rb", <<~EOM
|
333
315
|
local_mode true
|
334
|
-
cookbook_path "#{path_to(
|
335
|
-
EOM
|
316
|
+
cookbook_path "#{path_to("cookbooks")}"
|
317
|
+
EOM
|
336
318
|
end
|
337
319
|
it "should fail the chef client run" do
|
338
|
-
command = shell_out("#{chef_client} -c \"#{path_to(
|
320
|
+
command = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork", cwd: chef_dir)
|
339
321
|
expect(command.exitstatus).to eql(1)
|
340
322
|
expect(command.stdout).to match(/Chef::Exceptions::CookbookChefVersionMismatch/)
|
341
323
|
end
|
@@ -356,12 +338,12 @@ EOM
|
|
356
338
|
EOM
|
357
339
|
file "config/client.rb", <<-EOM
|
358
340
|
local_mode true
|
359
|
-
cookbook_path "#{path_to(
|
341
|
+
cookbook_path "#{path_to("cookbooks")}"
|
360
342
|
EOM
|
361
343
|
end
|
362
344
|
|
363
345
|
it "the cheffish DSL is loaded lazily" do
|
364
|
-
command = shell_out("#{chef_client} -c \"#{path_to(
|
346
|
+
command = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork", cwd: chef_dir)
|
365
347
|
expect(command.exitstatus).to eql(0)
|
366
348
|
end
|
367
349
|
end
|
@@ -373,16 +355,16 @@ EOM
|
|
373
355
|
EOM
|
374
356
|
file "config/client.rb", <<-EOM
|
375
357
|
local_mode true
|
376
|
-
cookbook_path "#{path_to(
|
358
|
+
cookbook_path "#{path_to("cookbooks")}"
|
377
359
|
EOM
|
378
360
|
end
|
379
361
|
|
380
362
|
it "the cheffish DSL tries to load but fails (because chef-provisioning is not there)" do
|
381
363
|
# we'd need to have a custom bundle to fix this that omitted chef-provisioning, but that would dig our crazy even deeper, so lets not
|
382
364
|
skip "but if chef-provisioning is in our bundle or in our gemset then this test, very annoyingly, always fails"
|
383
|
-
command = shell_out("#{chef_client} -c \"#{path_to(
|
365
|
+
command = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork", cwd: chef_dir)
|
384
366
|
expect(command.exitstatus).to eql(1)
|
385
|
-
expect(command.stdout).to match(
|
367
|
+
expect(command.stdout).to match(%r{cannot load such file -- chef/provisioning})
|
386
368
|
end
|
387
369
|
end
|
388
370
|
|
@@ -407,15 +389,15 @@ EOM
|
|
407
389
|
it "should output each deprecation warning only once, at the end of the run" do
|
408
390
|
file "config/client.rb", <<~EOM
|
409
391
|
local_mode true
|
410
|
-
cookbook_path "#{path_to(
|
392
|
+
cookbook_path "#{path_to("cookbooks")}"
|
411
393
|
# Mimick what happens when you are on the console
|
412
394
|
formatters << :doc
|
413
395
|
log_level :warn
|
414
|
-
EOM
|
396
|
+
EOM
|
415
397
|
|
416
398
|
ENV.delete("CHEF_TREAT_DEPRECATION_WARNINGS_AS_ERRORS")
|
417
399
|
|
418
|
-
result = shell_out!("#{chef_client} -c \"#{path_to(
|
400
|
+
result = shell_out!("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default'", cwd: chef_dir)
|
419
401
|
expect(result.error?).to be_falsey
|
420
402
|
|
421
403
|
# Search to the end of the client run in the output
|
@@ -432,10 +414,10 @@ EOM
|
|
432
414
|
before do
|
433
415
|
file "config/client.rb", <<~EOM
|
434
416
|
local_mode true
|
435
|
-
cookbook_path "#{path_to(
|
417
|
+
cookbook_path "#{path_to("cookbooks")}"
|
436
418
|
audit_mode :enabled
|
437
419
|
silence_deprecation_warnings %w{chef-27}
|
438
|
-
EOM
|
420
|
+
EOM
|
439
421
|
end
|
440
422
|
|
441
423
|
it "should exit with a zero code when there is not an audit failure" do
|
@@ -447,7 +429,7 @@ EOM
|
|
447
429
|
end
|
448
430
|
RECIPE
|
449
431
|
|
450
|
-
result = shell_out("#{chef_client} -c \"#{path_to(
|
432
|
+
result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'audit_test::succeed' -l info", cwd: chef_dir)
|
451
433
|
expect(result.error?).to be_falsey
|
452
434
|
expect(result.stdout).to include("Successfully executed all `control_group` blocks and contained examples")
|
453
435
|
end
|
@@ -461,7 +443,7 @@ EOM
|
|
461
443
|
end
|
462
444
|
RECIPE
|
463
445
|
|
464
|
-
result = shell_out("#{chef_client} -c \"#{path_to(
|
446
|
+
result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'audit_test::fail'", cwd: chef_dir)
|
465
447
|
expect(result.error?).to be_truthy
|
466
448
|
expect(result.stdout).to include("Failure/Error: expect(2 - 2).to eq(1)")
|
467
449
|
end
|
@@ -470,7 +452,7 @@ EOM
|
|
470
452
|
when_the_repository "has a cookbook that deploys a file" do
|
471
453
|
before do
|
472
454
|
file "cookbooks/x/recipes/default.rb", <<~RECIPE
|
473
|
-
cookbook_file #{path_to(
|
455
|
+
cookbook_file #{path_to("tempfile.txt").inspect} do
|
474
456
|
source "my_file"
|
475
457
|
end
|
476
458
|
RECIPE
|
@@ -486,9 +468,9 @@ EOM
|
|
486
468
|
file "config/client.rb", <<~EOM
|
487
469
|
no_lazy_load #{lazy}
|
488
470
|
local_mode true
|
489
|
-
cookbook_path "#{path_to(
|
490
|
-
EOM
|
491
|
-
result = shell_out("#{chef_client} -l debug -c \"#{path_to(
|
471
|
+
cookbook_path "#{path_to("cookbooks")}"
|
472
|
+
EOM
|
473
|
+
result = shell_out("#{chef_client} -l debug -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork", cwd: chef_dir)
|
492
474
|
result.error!
|
493
475
|
|
494
476
|
expect(IO.read(path_to("tempfile.txt")).strip).to eq("this is my file")
|
@@ -500,7 +482,7 @@ EOM
|
|
500
482
|
when_the_repository "has a cookbook with an ohai plugin" do
|
501
483
|
before do
|
502
484
|
file "cookbooks/x/recipes/default.rb", <<~RECIPE
|
503
|
-
file #{path_to(
|
485
|
+
file #{path_to("tempfile.txt").inspect} do
|
504
486
|
content node["english"]["version"]
|
505
487
|
end
|
506
488
|
RECIPE
|
@@ -518,12 +500,12 @@ EOM
|
|
518
500
|
|
519
501
|
file "config/client.rb", <<~EOM
|
520
502
|
local_mode true
|
521
|
-
cookbook_path "#{path_to(
|
522
|
-
EOM
|
503
|
+
cookbook_path "#{path_to("cookbooks")}"
|
504
|
+
EOM
|
523
505
|
end
|
524
506
|
|
525
507
|
it "should run the ohai plugin" do
|
526
|
-
result = shell_out("#{chef_client} -l debug -c \"#{path_to(
|
508
|
+
result = shell_out("#{chef_client} -l debug -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork", cwd: chef_dir)
|
527
509
|
result.error!
|
528
510
|
|
529
511
|
expect(IO.read(path_to("tempfile.txt"))).to eq("2014")
|
@@ -545,8 +527,8 @@ EOM
|
|
545
527
|
it "should complete with success when passed -z and --recipe-url" do
|
546
528
|
file "config/client.rb", <<~EOM
|
547
529
|
chef_repo_path "#{tmp_dir}"
|
548
|
-
EOM
|
549
|
-
result = shell_out("#{chef_client} -c \"#{path_to(
|
530
|
+
EOM
|
531
|
+
result = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" --recipe-url=http://localhost:9000/recipes.tgz -o 'x::default' -z", cwd: tmp_dir)
|
550
532
|
result.error!
|
551
533
|
end
|
552
534
|
|
@@ -569,27 +551,27 @@ EOM
|
|
569
551
|
name 'x'
|
570
552
|
version '0.0.1'
|
571
553
|
raise "TEH SADNESS"
|
572
|
-
EOM
|
554
|
+
EOM
|
573
555
|
file "cookbooks/x/metadata.json", <<~EOM
|
574
556
|
{
|
575
557
|
"name": "x",
|
576
558
|
"version": "0.0.1"
|
577
559
|
}
|
578
|
-
EOM
|
560
|
+
EOM
|
579
561
|
|
580
562
|
file "config/client.rb", <<~EOM
|
581
563
|
local_mode true
|
582
|
-
cookbook_path "#{path_to(
|
583
|
-
EOM
|
564
|
+
cookbook_path "#{path_to("cookbooks")}"
|
565
|
+
EOM
|
584
566
|
end
|
585
567
|
|
586
568
|
it "the chef client run should succeed" do
|
587
|
-
command = shell_out("#{chef_client} -c \"#{path_to(
|
569
|
+
command = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork", cwd: chef_dir)
|
588
570
|
command.error!
|
589
571
|
end
|
590
572
|
|
591
573
|
it "a chef-solo run should succeed" do
|
592
|
-
command = shell_out("#{chef_solo} -c \"#{path_to(
|
574
|
+
command = shell_out("#{chef_solo} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork", cwd: chef_dir)
|
593
575
|
command.error!
|
594
576
|
end
|
595
577
|
end
|
@@ -603,30 +585,30 @@ EOM
|
|
603
585
|
EOM
|
604
586
|
file "config/client.rb", <<~EOM
|
605
587
|
local_mode true
|
606
|
-
cookbook_path "#{path_to(
|
607
|
-
EOM
|
588
|
+
cookbook_path "#{path_to("cookbooks")}"
|
589
|
+
EOM
|
608
590
|
end
|
609
591
|
|
610
592
|
it "a chef client run should not log to info by default" do
|
611
|
-
command = shell_out("#{chef_client} -c \"#{path_to(
|
593
|
+
command = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork", cwd: chef_dir)
|
612
594
|
command.error!
|
613
595
|
expect(command.stdout).not_to include("INFO")
|
614
596
|
end
|
615
597
|
|
616
598
|
it "a chef client run to a pipe should not log to info by default" do
|
617
|
-
command = shell_out("#{chef_client} -c \"#{path_to(
|
599
|
+
command = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork | tee #{path_to("chefrun.out")}", cwd: chef_dir)
|
618
600
|
command.error!
|
619
601
|
expect(command.stdout).not_to include("INFO")
|
620
602
|
end
|
621
603
|
|
622
604
|
it "a chef solo run should not log to info by default" do
|
623
|
-
command = shell_out("#{chef_solo} -c \"#{path_to(
|
605
|
+
command = shell_out("#{chef_solo} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork", cwd: chef_dir)
|
624
606
|
command.error!
|
625
607
|
expect(command.stdout).not_to include("INFO")
|
626
608
|
end
|
627
609
|
|
628
610
|
it "a chef solo run to a pipe should not log to info by default" do
|
629
|
-
command = shell_out("#{chef_solo} -c \"#{path_to(
|
611
|
+
command = shell_out("#{chef_solo} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork | tee #{path_to("chefrun.out")}", cwd: chef_dir)
|
630
612
|
command.error!
|
631
613
|
expect(command.stdout).not_to include("INFO")
|
632
614
|
end
|
@@ -636,45 +618,45 @@ EOM
|
|
636
618
|
before do
|
637
619
|
file "cookbooks/x/recipes/default.rb", <<~EOM
|
638
620
|
puts Chef::Config[:client_fork] ? "WITHFORK" : "NOFORK"
|
639
|
-
EOM
|
621
|
+
EOM
|
640
622
|
file "config/client.rb", <<~EOM
|
641
623
|
local_mode true
|
642
|
-
cookbook_path "#{path_to(
|
643
|
-
EOM
|
624
|
+
cookbook_path "#{path_to("cookbooks")}"
|
625
|
+
EOM
|
644
626
|
end
|
645
627
|
|
646
628
|
it "chef-client runs by default with no supervisor" do
|
647
|
-
command = shell_out("#{chef_client} -c \"#{path_to(
|
629
|
+
command = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default'", cwd: chef_dir)
|
648
630
|
command.error!
|
649
631
|
expect(command.stdout).to include("NOFORK")
|
650
632
|
end
|
651
633
|
|
652
634
|
it "chef-solo runs by default with no supervisor" do
|
653
|
-
command = shell_out("#{chef_solo} -c \"#{path_to(
|
635
|
+
command = shell_out("#{chef_solo} -c \"#{path_to("config/client.rb")}\" -o 'x::default'", cwd: chef_dir)
|
654
636
|
command.error!
|
655
637
|
expect(command.stdout).to include("NOFORK")
|
656
638
|
end
|
657
639
|
|
658
640
|
it "chef-client --no-fork does not fork" do
|
659
|
-
command = shell_out("#{chef_client} -c \"#{path_to(
|
641
|
+
command = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork", cwd: chef_dir)
|
660
642
|
command.error!
|
661
643
|
expect(command.stdout).to include("NOFORK")
|
662
644
|
end
|
663
645
|
|
664
646
|
it "chef-solo --no-fork does not fork" do
|
665
|
-
command = shell_out("#{chef_solo} -c \"#{path_to(
|
647
|
+
command = shell_out("#{chef_solo} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --no-fork", cwd: chef_dir)
|
666
648
|
command.error!
|
667
649
|
expect(command.stdout).to include("NOFORK")
|
668
650
|
end
|
669
651
|
|
670
652
|
it "chef-client with --fork uses a supervisor" do
|
671
|
-
command = shell_out("#{chef_client} -c \"#{path_to(
|
653
|
+
command = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --fork", cwd: chef_dir)
|
672
654
|
command.error!
|
673
655
|
expect(command.stdout).to include("WITHFORK")
|
674
656
|
end
|
675
657
|
|
676
658
|
it "chef-solo with --fork uses a supervisor" do
|
677
|
-
command = shell_out("#{chef_solo} -c \"#{path_to(
|
659
|
+
command = shell_out("#{chef_solo} -c \"#{path_to("config/client.rb")}\" -o 'x::default' --fork", cwd: chef_dir)
|
678
660
|
command.error!
|
679
661
|
expect(command.stdout).to include("WITHFORK")
|
680
662
|
end
|
@@ -684,22 +666,22 @@ EOM
|
|
684
666
|
before do
|
685
667
|
file "cookbooks/x/recipes/default.rb", <<~EOM
|
686
668
|
puts Chef::Config[:client_fork] ? "WITHFORK" : "NOFORK"
|
687
|
-
EOM
|
669
|
+
EOM
|
688
670
|
file "config/client.rb", <<~EOM
|
689
671
|
local_mode true
|
690
|
-
cookbook_path "#{path_to(
|
672
|
+
cookbook_path "#{path_to("cookbooks")}"
|
691
673
|
client_fork true
|
692
|
-
EOM
|
674
|
+
EOM
|
693
675
|
end
|
694
676
|
|
695
677
|
it "chef-client uses a supervisor" do
|
696
|
-
command = shell_out("#{chef_client} -c \"#{path_to(
|
678
|
+
command = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default'", cwd: chef_dir)
|
697
679
|
command.error!
|
698
680
|
expect(command.stdout).to include("WITHFORK")
|
699
681
|
end
|
700
682
|
|
701
683
|
it "chef-solo uses a supervisor" do
|
702
|
-
command = shell_out("#{chef_solo} -c \"#{path_to(
|
684
|
+
command = shell_out("#{chef_solo} -c \"#{path_to("config/client.rb")}\" -o 'x::default'", cwd: chef_dir)
|
703
685
|
command.error!
|
704
686
|
expect(command.stdout).to include("WITHFORK")
|
705
687
|
end
|
@@ -709,22 +691,22 @@ EOM
|
|
709
691
|
before do
|
710
692
|
file "cookbooks/x/recipes/default.rb", <<~EOM
|
711
693
|
puts Chef::Config[:client_fork] ? "WITHFORK" : "NOFORK"
|
712
|
-
EOM
|
694
|
+
EOM
|
713
695
|
file "config/client.rb", <<~EOM
|
714
696
|
local_mode true
|
715
|
-
cookbook_path "#{path_to(
|
697
|
+
cookbook_path "#{path_to("cookbooks")}"
|
716
698
|
client_fork false
|
717
|
-
EOM
|
699
|
+
EOM
|
718
700
|
end
|
719
701
|
|
720
702
|
it "chef-client uses a supervisor" do
|
721
|
-
command = shell_out("#{chef_client} -c \"#{path_to(
|
703
|
+
command = shell_out("#{chef_client} -c \"#{path_to("config/client.rb")}\" -o 'x::default'", cwd: chef_dir)
|
722
704
|
command.error!
|
723
705
|
expect(command.stdout).to include("NOFORK")
|
724
706
|
end
|
725
707
|
|
726
708
|
it "chef-solo uses a supervisor" do
|
727
|
-
command = shell_out("#{chef_solo} -c \"#{path_to(
|
709
|
+
command = shell_out("#{chef_solo} -c \"#{path_to("config/client.rb")}\" -o 'x::default'", cwd: chef_dir)
|
728
710
|
command.error!
|
729
711
|
expect(command.stdout).to include("NOFORK")
|
730
712
|
end
|