chef 14.14.29-universal-mingw32 → 14.15.6-universal-mingw32
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/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
@@ -31,7 +31,7 @@ describe Chef::Knife::Ssh do
|
|
31
31
|
@server.stop
|
32
32
|
end
|
33
33
|
|
34
|
-
let(:ssh_config) {
|
34
|
+
let(:ssh_config) { {} }
|
35
35
|
before do
|
36
36
|
allow(Net::SSH).to receive(:configuration_for).and_return(ssh_config)
|
37
37
|
end
|
@@ -301,7 +301,7 @@ describe Chef::Knife::Ssh do
|
|
301
301
|
end
|
302
302
|
|
303
303
|
it "uses the ssh_gateway_identity file" do
|
304
|
-
expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", { keys: File.expand_path("#{ENV[
|
304
|
+
expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", { keys: File.expand_path("#{ENV["HOME"]}/.ssh/aws-gateway.rsa").squeeze("/"), keys_only: true })
|
305
305
|
@knife.run
|
306
306
|
expect(@knife.config[:ssh_gateway_identity]).to eq("~/.ssh/aws-gateway.rsa")
|
307
307
|
end
|
@@ -315,7 +315,7 @@ describe Chef::Knife::Ssh do
|
|
315
315
|
end
|
316
316
|
|
317
317
|
it "uses the ssh_gateway_identity file" do
|
318
|
-
expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", { keys: File.expand_path("#{ENV[
|
318
|
+
expect(@knife.session).to receive(:via).with("ec2.public_hostname", "user", { keys: File.expand_path("#{ENV["HOME"]}/.ssh/aws-gateway.rsa").squeeze("/"), keys_only: true })
|
319
319
|
@knife.run
|
320
320
|
expect(@knife.config[:ssh_gateway_identity]).to eq("~/.ssh/aws-gateway.rsa")
|
321
321
|
end
|
@@ -26,7 +26,7 @@ describe Chef::Mixin::UserContext, windows_only: true do
|
|
26
26
|
|
27
27
|
let(:get_user_name_a) do
|
28
28
|
FFI.ffi_lib "advapi32.dll"
|
29
|
-
FFI.attach_function :GetUserNameA,
|
29
|
+
FFI.attach_function :GetUserNameA, %i{pointer pointer}, :bool
|
30
30
|
end
|
31
31
|
|
32
32
|
let(:process_username) do
|
@@ -36,12 +36,14 @@ describe Chef::Mixin::UserContext, windows_only: true do
|
|
36
36
|
if succeeded || last_error != Chef::ReservedNames::Win32::API::Error::ERROR_INSUFFICIENT_BUFFER
|
37
37
|
raise Chef::Exceptions::Win32APIError, "Expected ERROR_INSUFFICIENT_BUFFER from GetUserNameA but it returned the following error: #{last_error}"
|
38
38
|
end
|
39
|
+
|
39
40
|
user_name = FFI::MemoryPointer.new :char, (name_size.read_long)
|
40
41
|
succeeded = get_user_name_a.call(user_name, name_size)
|
41
42
|
last_error = FFI::LastError.error
|
42
43
|
if succeeded == 0 || last_error != 0
|
43
44
|
raise Chef::Exceptions::Win32APIError, "GetUserNameA failed with #{lasterror}"
|
44
45
|
end
|
46
|
+
|
45
47
|
user_name.read_string
|
46
48
|
end
|
47
49
|
|
@@ -44,7 +44,7 @@ describe Chef::Platform::Rebooter do
|
|
44
44
|
|
45
45
|
let(:expected) do
|
46
46
|
{
|
47
|
-
windows: "#{ENV[
|
47
|
+
windows: "#{ENV["SYSTEMROOT"]}/System32/shutdown.exe /r /t 300 /c \"rebooter spec test\"",
|
48
48
|
linux: 'shutdown -r +5 "rebooter spec test" &',
|
49
49
|
solaris: 'shutdown -i6 -g5 -y "rebooter spec test" &',
|
50
50
|
}
|
@@ -77,7 +77,7 @@ describe Chef::Resource::Service, :requires_root, :aix_only do
|
|
77
77
|
include Chef::Mixin::ShellOut
|
78
78
|
|
79
79
|
def get_user_id
|
80
|
-
shell_out("id -u #{ENV[
|
80
|
+
shell_out("id -u #{ENV["USER"]}").stdout.chomp
|
81
81
|
end
|
82
82
|
|
83
83
|
describe "When service is a subsystem" do
|
@@ -40,7 +40,7 @@ describe Chef::Resource::Service, :requires_root, :aix_only do
|
|
40
40
|
directory = []
|
41
41
|
if priority.is_a? Hash
|
42
42
|
priority.each do |level, o|
|
43
|
-
directory << "/etc/rc.d/rc#{level}.d/#{(o[0] == :start ?
|
43
|
+
directory << "/etc/rc.d/rc#{level}.d/#{(o[0] == :start ? "S" : "K")}#{o[1]}#{new_resource.service_name}"
|
44
44
|
end
|
45
45
|
directory
|
46
46
|
else
|
@@ -89,7 +89,7 @@ end
|
|
89
89
|
metadata = { unix_only: true,
|
90
90
|
requires_root: true,
|
91
91
|
provider: { package: Chef::Provider::Package::Apt },
|
92
|
-
arch: "x86_64" # test packages are 64bit
|
92
|
+
arch: "x86_64", # test packages are 64bit
|
93
93
|
}
|
94
94
|
|
95
95
|
describe Chef::Resource::AptPackage, metadata do
|
@@ -22,7 +22,7 @@ describe Chef::Resource::ChocolateyPackage, :windows_only, :choco_installed do
|
|
22
22
|
include Chef::Mixin::PowershellOut
|
23
23
|
|
24
24
|
let(:package_name) { "test-A" }
|
25
|
-
let(:package_list) { proc { powershell_out!("choco list -lo -r #{Array(package_name).join(
|
25
|
+
let(:package_list) { proc { powershell_out!("choco list -lo -r #{Array(package_name).join(" ")}").stdout.chomp } }
|
26
26
|
let(:package_source) { File.join(CHEF_SPEC_ASSETS, "chocolatey_feed") }
|
27
27
|
|
28
28
|
subject do
|
@@ -63,7 +63,7 @@ describe Chef::Resource::ChocolateyPackage, :windows_only, :choco_installed do
|
|
63
63
|
end
|
64
64
|
|
65
65
|
context "installing multiple packages" do
|
66
|
-
let(:package_name) {
|
66
|
+
let(:package_name) { %w{test-A test-B} }
|
67
67
|
|
68
68
|
it "installs both packages" do
|
69
69
|
subject.run_action(:install)
|
@@ -25,9 +25,7 @@ describe Chef::Resource::CookbookFile do
|
|
25
25
|
let(:source) { "java.response" }
|
26
26
|
let(:cookbook_name) { "java" }
|
27
27
|
let(:expected_content) do
|
28
|
-
content = File.open(File.join(CHEF_SPEC_DATA, "cookbooks", "java", "files", "default", "java.response"), "rb")
|
29
|
-
f.read
|
30
|
-
end
|
28
|
+
content = File.open(File.join(CHEF_SPEC_DATA, "cookbooks", "java", "files", "default", "java.response"), "rb", &:read)
|
31
29
|
content.force_encoding(Encoding::BINARY) if content.respond_to?(:force_encoding)
|
32
30
|
content
|
33
31
|
end
|
@@ -28,7 +28,7 @@ describe Chef::Resource::Cron, :requires_root, :unix_only do
|
|
28
28
|
# Platform specific validation routines.
|
29
29
|
def cron_should_exists(cron_name, command)
|
30
30
|
case ohai[:platform]
|
31
|
-
when "aix", "
|
31
|
+
when "aix", "opensolaris", "solaris2", "omnios"
|
32
32
|
expect(shell_out("crontab -l #{new_resource.user} | grep \"#{cron_name}\"").exitstatus).to eq(0)
|
33
33
|
expect(shell_out("crontab -l #{new_resource.user} | grep \"#{cron_name}\"").stdout.lines.to_a.size).to eq(1)
|
34
34
|
expect(shell_out("crontab -l #{new_resource.user} | grep \"#{command}\"").exitstatus).to eq(0)
|
@@ -43,7 +43,7 @@ describe Chef::Resource::Cron, :requires_root, :unix_only do
|
|
43
43
|
|
44
44
|
def cron_should_not_exists(cron_name)
|
45
45
|
case ohai[:platform]
|
46
|
-
when "aix", "
|
46
|
+
when "aix", "opensolaris", "solaris2", "omnios"
|
47
47
|
expect(shell_out("crontab -l #{new_resource.user} | grep \"#{cron_name}\"").exitstatus).to eq(1)
|
48
48
|
expect(shell_out("crontab -l #{new_resource.user} | grep \"#{new_resource.command}\"").stdout.lines.to_a.size).to eq(0)
|
49
49
|
else
|
@@ -57,7 +57,7 @@ describe Chef::Resource::Cron, :requires_root, :unix_only do
|
|
57
57
|
new_resource = Chef::Resource::Cron.new("Chef functional test cron", run_context)
|
58
58
|
new_resource.user "root"
|
59
59
|
# @hourly is not supported on solaris, aix
|
60
|
-
if ohai[:platform] == "
|
60
|
+
if ohai[:platform] == "solaris2" || ohai[:platform] == "aix"
|
61
61
|
new_resource.minute "0 * * * *"
|
62
62
|
else
|
63
63
|
new_resource.minute "@hourly"
|
@@ -118,6 +118,7 @@ describe Chef::Resource::Cron, :requires_root, :unix_only do
|
|
118
118
|
|
119
119
|
def cron_attribute_should_exists(cron_name, attribute, value)
|
120
120
|
return if %w{aix solaris}.include?(ohai[:platform])
|
121
|
+
|
121
122
|
# Test if the attribute exists on newly created cron
|
122
123
|
cron_should_exists(cron_name, "")
|
123
124
|
expect(shell_out("crontab -l -u #{new_resource.user} | grep '#{attribute.upcase}=\"#{value}\"'").exitstatus).to eq(0)
|
@@ -273,7 +273,7 @@ describe Chef::Resource::DpkgPackage, :requires_root, :debian_family_only, arch:
|
|
273
273
|
|
274
274
|
it "should remove both packages when called with two" do
|
275
275
|
shell_out!("dpkg -i #{test1_0} #{test2_0}")
|
276
|
-
set_dpkg_package_name
|
276
|
+
set_dpkg_package_name %w{chef-integration-test chef-integration-test2}
|
277
277
|
dpkg_package.run_action(action)
|
278
278
|
expect(dpkg_package).to be_updated_by_last_action
|
279
279
|
should_be_purged_or_removed("chef-integration-test")
|
@@ -282,7 +282,7 @@ describe Chef::Resource::DpkgPackage, :requires_root, :debian_family_only, arch:
|
|
282
282
|
|
283
283
|
it "should remove a package when only the first one is installed" do
|
284
284
|
shell_out!("dpkg -i #{test1_0}")
|
285
|
-
set_dpkg_package_name
|
285
|
+
set_dpkg_package_name %w{chef-integration-test chef-integration-test2}
|
286
286
|
dpkg_package.run_action(action)
|
287
287
|
expect(dpkg_package).to be_updated_by_last_action
|
288
288
|
should_be_purged_or_removed("chef-integration-test")
|
@@ -291,7 +291,7 @@ describe Chef::Resource::DpkgPackage, :requires_root, :debian_family_only, arch:
|
|
291
291
|
|
292
292
|
it "should remove a package when only the second one is installed" do
|
293
293
|
shell_out!("dpkg -i #{test2_0}")
|
294
|
-
set_dpkg_package_name
|
294
|
+
set_dpkg_package_name %w{chef-integration-test chef-integration-test2}
|
295
295
|
dpkg_package.run_action(action)
|
296
296
|
expect(dpkg_package).to be_updated_by_last_action
|
297
297
|
should_be_purged_or_removed("chef-integration-test")
|
@@ -299,7 +299,7 @@ describe Chef::Resource::DpkgPackage, :requires_root, :debian_family_only, arch:
|
|
299
299
|
end
|
300
300
|
|
301
301
|
it "should do nothing when both packages are not installed" do
|
302
|
-
set_dpkg_package_name
|
302
|
+
set_dpkg_package_name %w{chef-integration-test chef-integration-test2}
|
303
303
|
dpkg_package.run_action(action)
|
304
304
|
expect(dpkg_package).not_to be_updated_by_last_action
|
305
305
|
should_be_purged_or_removed("chef-integration-test")
|
@@ -46,7 +46,8 @@ describe Chef::Resource::DscResource, :windows_powershell_dsc_only do
|
|
46
46
|
it "raises an exception if the resource is not found" do
|
47
47
|
new_resource.resource "thisdoesnotexist"
|
48
48
|
expect { new_resource.run_action(:run) }.to raise_error(
|
49
|
-
|
49
|
+
Chef::Exceptions::ResourceNotFound
|
50
|
+
)
|
50
51
|
end
|
51
52
|
end
|
52
53
|
|
@@ -103,7 +103,7 @@ describe Chef::Resource::DscScript, :windows_powershell_dsc_only do
|
|
103
103
|
ValueData = '#{test_registry_data}'
|
104
104
|
Ensure = 'Present'
|
105
105
|
}
|
106
|
-
EOH
|
106
|
+
EOH
|
107
107
|
end
|
108
108
|
|
109
109
|
let(:dsc_code) { dsc_reg_code }
|
@@ -111,7 +111,7 @@ EOH
|
|
111
111
|
<<-EOH
|
112
112
|
param($testregkeyname, $testregvaluename)
|
113
113
|
#{dsc_reg_code}
|
114
|
-
EOH
|
114
|
+
EOH
|
115
115
|
end
|
116
116
|
|
117
117
|
let(:dsc_user_prefix) { "dsc" }
|
@@ -138,7 +138,7 @@ EOH
|
|
138
138
|
$#{dsc_user_prefix_param_name},
|
139
139
|
$#{dsc_user_suffix_param_name}
|
140
140
|
)
|
141
|
-
EOH
|
141
|
+
EOH
|
142
142
|
end
|
143
143
|
|
144
144
|
let(:config_param_section) { "" }
|
@@ -166,7 +166,7 @@ EOH
|
|
166
166
|
PasswordChangeRequired = $false
|
167
167
|
}
|
168
168
|
}
|
169
|
-
EOH
|
169
|
+
EOH
|
170
170
|
end
|
171
171
|
|
172
172
|
let(:dsc_user_config_data) do
|
@@ -180,12 +180,12 @@ EOH
|
|
180
180
|
)
|
181
181
|
}
|
182
182
|
|
183
|
-
EOH
|
183
|
+
EOH
|
184
184
|
end
|
185
185
|
|
186
186
|
let(:dsc_environment_env_var_name) { "dsc_test_cwd" }
|
187
|
-
let(:dsc_environment_no_fail_not_etc_directory) { "#{ENV[
|
188
|
-
let(:dsc_environment_fail_etc_directory) { "#{ENV[
|
187
|
+
let(:dsc_environment_no_fail_not_etc_directory) { "#{ENV["systemroot"]}\\system32" }
|
188
|
+
let(:dsc_environment_fail_etc_directory) { "#{ENV["systemroot"]}\\system32\\drivers\\etc" }
|
189
189
|
let(:exception_message_signature) { "LL927-LL928" }
|
190
190
|
let(:dsc_environment_config) do
|
191
191
|
<<~EOH
|
@@ -199,7 +199,7 @@ EOH
|
|
199
199
|
Value = $pwd.path
|
200
200
|
Ensure = 'Present'
|
201
201
|
}
|
202
|
-
EOH
|
202
|
+
EOH
|
203
203
|
end
|
204
204
|
|
205
205
|
let(:dsc_config_name) do
|
@@ -249,7 +249,7 @@ EOH
|
|
249
249
|
Name = '#{dsc_environment_env_var_name}'
|
250
250
|
Ensure = 'Absent'
|
251
251
|
}
|
252
|
-
EOH
|
252
|
+
EOH
|
253
253
|
removal_resource.run_action(:run)
|
254
254
|
end
|
255
255
|
|
@@ -310,7 +310,7 @@ EOH
|
|
310
310
|
|
311
311
|
it "should set a registry key according to parameters passed to the configuration" do
|
312
312
|
dsc_test_resource.configuration_name(config_name_value)
|
313
|
-
dsc_test_resource.flags({
|
313
|
+
dsc_test_resource.flags({ "#{reg_key_name_param_name}": test_registry_key, "#{reg_key_value_param_name}": test_registry_value })
|
314
314
|
expect(dsc_test_resource.registry_key_exists?(test_registry_key)).to eq(false)
|
315
315
|
dsc_test_resource.run_action(:run)
|
316
316
|
expect(dsc_test_resource.registry_key_exists?(test_registry_key)).to eq(true)
|
@@ -347,11 +347,9 @@ EOH
|
|
347
347
|
shared_examples_for "a dsc_script with configuration data that takes parameters" do
|
348
348
|
let(:dsc_user_code) { dsc_user_param_code }
|
349
349
|
let(:config_param_section) { config_params }
|
350
|
-
let(:config_flags) { {
|
350
|
+
let(:config_flags) { { "#{dsc_user_prefix_param_name}": (dsc_user_prefix).to_s, "#{dsc_user_suffix_param_name}": (dsc_user_suffix).to_s } }
|
351
351
|
it "does not directly contain the user name" do
|
352
|
-
configuration_script_content = ::File.open(dsc_test_resource.command)
|
353
|
-
file.read
|
354
|
-
end
|
352
|
+
configuration_script_content = ::File.open(dsc_test_resource.command, &:read)
|
355
353
|
expect(configuration_script_content.include?(dsc_user)).to be(false)
|
356
354
|
end
|
357
355
|
it_behaves_like "a dsc_script with configuration data"
|
@@ -361,9 +359,7 @@ EOH
|
|
361
359
|
let(:dsc_user_code) { dsc_user_env_code }
|
362
360
|
|
363
361
|
it "does not directly contain the user name" do
|
364
|
-
configuration_script_content = ::File.open(dsc_test_resource.command)
|
365
|
-
file.read
|
366
|
-
end
|
362
|
+
configuration_script_content = ::File.open(dsc_test_resource.command, &:read)
|
367
363
|
expect(configuration_script_content.include?(dsc_user)).to be(false)
|
368
364
|
end
|
369
365
|
it_behaves_like "a dsc_script with configuration data"
|
@@ -448,7 +444,7 @@ EOH
|
|
448
444
|
}
|
449
445
|
"@
|
450
446
|
$ConfigurationData | out-file '#{configuration_data_path}' -force
|
451
|
-
|
447
|
+
MYCODE
|
452
448
|
end
|
453
449
|
|
454
450
|
let(:powershell_script_resource) do
|
@@ -464,10 +460,10 @@ EOH
|
|
464
460
|
User dsctestusercreate
|
465
461
|
{
|
466
462
|
UserName = '#{dsc_user}'
|
467
|
-
Password = #{r.ps_credential(
|
463
|
+
Password = #{r.ps_credential("jf9a8m49jrajf4#")}
|
468
464
|
Ensure = "Present"
|
469
465
|
}
|
470
|
-
EOF
|
466
|
+
EOF
|
471
467
|
r.configuration_data_script(configuration_data_path)
|
472
468
|
end
|
473
469
|
end
|
@@ -87,8 +87,8 @@ describe Chef::Resource::Execute do
|
|
87
87
|
describe "when parent resource sets :environment" do
|
88
88
|
before do
|
89
89
|
resource.environment({
|
90
|
-
"SAWS_SECRET"
|
91
|
-
"SAWS_KEY"
|
90
|
+
"SAWS_SECRET" => "supersecret",
|
91
|
+
"SAWS_KEY" => "qwerty",
|
92
92
|
})
|
93
93
|
end
|
94
94
|
|
@@ -69,7 +69,7 @@ describe Chef::Resource::Git, requires_git: true do
|
|
69
69
|
[user]
|
70
70
|
name = frodoTbaggins
|
71
71
|
email = frodo@shire.org
|
72
|
-
E
|
72
|
+
E
|
73
73
|
end
|
74
74
|
|
75
75
|
before(:each) do
|
@@ -220,7 +220,7 @@ E
|
|
220
220
|
context "when dealing with a repo with a degenerate tag named 'HEAD'" do
|
221
221
|
before do
|
222
222
|
shell_out!("git tag -m\"degenerate tag\" HEAD ed181b3419b6f489bedab282348162a110d6d3a1",
|
223
|
-
|
223
|
+
cwd: origin_repo)
|
224
224
|
end
|
225
225
|
|
226
226
|
let(:basic_git_resource) do
|
@@ -240,16 +240,16 @@ E
|
|
240
240
|
it "checks out the (master) HEAD revision and ignores the tag" do
|
241
241
|
basic_git_resource.run_action(:sync)
|
242
242
|
head_rev = shell_out!("git rev-parse HEAD",
|
243
|
-
|
244
|
-
|
243
|
+
cwd: deploy_directory,
|
244
|
+
returns: [0]).stdout.strip
|
245
245
|
expect(head_rev).to eq(rev_head)
|
246
246
|
end
|
247
247
|
|
248
248
|
it "checks out the (master) HEAD revision when no revision is specified (ignores tag)" do
|
249
249
|
git_resource_default_rev.run_action(:sync)
|
250
250
|
head_rev = shell_out!("git rev-parse HEAD",
|
251
|
-
|
252
|
-
|
251
|
+
cwd: deploy_directory,
|
252
|
+
returns: [0]).stdout.strip
|
253
253
|
expect(head_rev).to eq(rev_head)
|
254
254
|
end
|
255
255
|
|
@@ -96,7 +96,7 @@ describe Chef::Resource::Group, :requires_root_or_running_windows do
|
|
96
96
|
end
|
97
97
|
|
98
98
|
def create_user(username, uid = nil)
|
99
|
-
|
99
|
+
unless windows_domain_user?(username)
|
100
100
|
user_to_create = user(username)
|
101
101
|
user_to_create.uid(uid) if uid
|
102
102
|
user_to_create.run_action(:create)
|
@@ -105,7 +105,7 @@ describe Chef::Resource::Group, :requires_root_or_running_windows do
|
|
105
105
|
end
|
106
106
|
|
107
107
|
def remove_user(username)
|
108
|
-
|
108
|
+
unless windows_domain_user?(username)
|
109
109
|
u = user(username)
|
110
110
|
u.manage_home false # jekins hosts throw mail spool file not owned by user if we use manage_home true
|
111
111
|
u.run_action(:remove)
|
@@ -152,7 +152,7 @@ describe Chef::Resource::Group, :requires_root_or_running_windows do
|
|
152
152
|
let(:excluded_members) { [] }
|
153
153
|
|
154
154
|
it "should raise an error" do
|
155
|
-
expect { group_resource.run_action(tested_action) }.to raise_error
|
155
|
+
expect { group_resource.run_action(tested_action) }.to raise_error
|
156
156
|
end
|
157
157
|
end
|
158
158
|
|
@@ -162,7 +162,7 @@ describe Chef::Resource::Group, :requires_root_or_running_windows do
|
|
162
162
|
end
|
163
163
|
|
164
164
|
it "should raise an error" do
|
165
|
-
expect { group_resource.run_action(tested_action) }.to raise_error
|
165
|
+
expect { group_resource.run_action(tested_action) }.to raise_error
|
166
166
|
end
|
167
167
|
end
|
168
168
|
end
|
@@ -336,7 +336,8 @@ describe Chef::Resource::Group, :requires_root_or_running_windows do
|
|
336
336
|
"theoldmanwalkingdownthestreetalwayshadagood\
|
337
337
|
smileonhisfacetheoldmanwalkingdownthestreetalwayshadagoodsmileonhisface\
|
338
338
|
theoldmanwalkingdownthestreetalwayshadagoodsmileonhisfacetheoldmanwalking\
|
339
|
-
downthestreetalwayshadagoodsmileonhisfacetheoldmanwalkingdownthestree"
|
339
|
+
downthestreetalwayshadagoodsmileonhisfacetheoldmanwalkingdownthestree"
|
340
|
+
end
|
340
341
|
|
341
342
|
it "should create a group" do
|
342
343
|
group_resource.run_action(:create)
|
@@ -362,7 +363,8 @@ downthestreetalwayshadagoodsmileonhisfacetheoldmanwalkingdownthestree" end
|
|
362
363
|
"theoldmanwalkingdownthestreetalwayshadagood\
|
363
364
|
smileonhisfacetheoldmanwalkingdownthestreetalwayshadagoodsmileonhisface\
|
364
365
|
theoldmanwalkingdownthestreetalwayshadagoodsmileonhisfacetheoldmanwalking\
|
365
|
-
downthestreetalwayshadagoodsmileonhisfacetheoldmanwalkingdownthestreeQQQQQQ"
|
366
|
+
downthestreetalwayshadagoodsmileonhisfacetheoldmanwalkingdownthestreeQQQQQQ"
|
367
|
+
end
|
366
368
|
|
367
369
|
it "should not create a group" do
|
368
370
|
expect { group_resource.run_action(:create) }.to raise_error(ArgumentError)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Kaustubh Deorukhkar (<kaustubh@clogeny.com>)
|
3
|
-
# Copyright:: Copyright 2013-
|
3
|
+
# Copyright:: Copyright 2013-2020, Chef Software Inc.
|
4
4
|
# License:: Apache License, Version 2.0
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -23,9 +23,7 @@ require "chef/mixin/shell_out"
|
|
23
23
|
# run this test only for following platforms.
|
24
24
|
include_flag = !(%w{amazon debian aix}.include?(ohai[:platform_family]) || (ohai[:platform_family] == "rhel" && ohai[:platform_version].to_i < 7))
|
25
25
|
|
26
|
-
describe Chef::Resource::Ifconfig, :requires_root, :
|
27
|
-
# This test does not work in travis because there is no eth0
|
28
|
-
|
26
|
+
describe Chef::Resource::Ifconfig, :requires_root, :requires_ifconfig, external: include_flag do
|
29
27
|
include Chef::Mixin::ShellOut
|
30
28
|
|
31
29
|
let(:new_resource) do
|
@@ -53,7 +51,7 @@ describe Chef::Resource::Ifconfig, :requires_root, :skip_travis, external: inclu
|
|
53
51
|
end
|
54
52
|
|
55
53
|
def fetch_first_interface_name
|
56
|
-
shell_out("ip link list |grep UP|grep -vi loop|head -1|cut -d':' -f 2").stdout.strip
|
54
|
+
shell_out("ip link list |grep UP|grep -vi loop|head -1|cut -d':' -f 2 |cut -d'@' -f 1").stdout.strip
|
57
55
|
end
|
58
56
|
|
59
57
|
# **Caution: any updates to core interfaces can be risky.
|