chef 15.8.23-universal-mingw32 → 15.9.17-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 +3 -2
- data/README.md +1 -1
- data/Rakefile +9 -0
- data/distro/powershell/chef/chef.psm1 +459 -459
- data/distro/templates/powershell/chef/chef.psm1.erb +459 -0
- data/lib/chef/application.rb +1 -1
- data/lib/chef/chef_fs/chef_fs_data_store.rb +1 -1
- data/lib/chef/chef_fs/command_line.rb +5 -5
- data/lib/chef/cookbook/metadata.rb +5 -4
- data/lib/chef/cookbook/synchronizer.rb +1 -0
- data/lib/chef/cookbook_loader.rb +1 -1
- data/lib/chef/data_collector/config_validation.rb +7 -7
- data/lib/chef/deprecated.rb +5 -5
- data/lib/chef/dsl/platform_introspection.rb +2 -2
- data/lib/chef/dsl/reboot_pending.rb +3 -3
- data/lib/chef/http/json_output.rb +1 -1
- data/lib/chef/knife.rb +1 -1
- data/lib/chef/knife/bootstrap/templates/README.md +2 -2
- data/lib/chef/knife/bootstrap/templates/chef-full.erb +9 -9
- data/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb +2 -2
- data/lib/chef/knife/core/ui.rb +1 -1
- data/lib/chef/knife/core/windows_bootstrap_context.rb +8 -8
- data/lib/chef/knife/data_bag_edit.rb +2 -2
- data/lib/chef/knife/edit.rb +1 -1
- data/lib/chef/knife/environment_compare.rb +1 -1
- data/lib/chef/knife/list.rb +1 -1
- data/lib/chef/mixin/api_version_request_handling.rb +1 -1
- data/lib/chef/provider/group/usermod.rb +2 -5
- data/lib/chef/provider/mount/mount.rb +1 -1
- data/lib/chef/provider/package/homebrew.rb +1 -2
- data/lib/chef/provider/package/rubygems.rb +1 -1
- data/lib/chef/provider/package/yum/python_helper.rb +2 -2
- data/lib/chef/provider/package/yum/rpm_utils.rb +4 -4
- data/lib/chef/provider/package/zypper.rb +2 -1
- data/lib/chef/provider/remote_file.rb +2 -2
- data/lib/chef/provider/route.rb +4 -4
- data/lib/chef/provider/windows_env.rb +3 -3
- data/lib/chef/resource.rb +7 -2
- data/lib/chef/resource/build_essential.rb +46 -22
- data/lib/chef/resource/cron.rb +1 -1
- data/lib/chef/resource/cron_d.rb +1 -1
- data/lib/chef/resource/execute.rb +1 -1
- data/lib/chef/resource/freebsd_package.rb +0 -3
- data/lib/chef/resource/homebrew_package.rb +1 -2
- data/lib/chef/resource/hostname.rb +2 -2
- data/lib/chef/resource/kernel_module.rb +3 -2
- data/lib/chef/resource/openbsd_package.rb +0 -3
- data/lib/chef/resource/remote_file.rb +1 -1
- data/lib/chef/resource/rhsm_errata.rb +9 -2
- data/lib/chef/resource/rhsm_errata_level.rb +11 -5
- data/lib/chef/resource/rhsm_register.rb +27 -12
- data/lib/chef/resource/swap_file.rb +2 -2
- data/lib/chef/resource/timezone.rb +2 -2
- data/lib/chef/resource/windows_certificate.rb +0 -2
- data/lib/chef/resource/windows_share.rb +1 -1
- data/lib/chef/shell/ext.rb +1 -1
- data/lib/chef/util/diff.rb +3 -3
- data/lib/chef/util/selinux.rb +2 -2
- data/lib/chef/version.rb +1 -1
- data/lib/chef/win32/error.rb +1 -1
- data/lib/chef/win32/registry.rb +1 -1
- data/spec/data/cookbooks/starter/recipes/default.rb +1 -1
- data/spec/data/windows_certificates/base64_test.cer +18 -20
- data/spec/data/windows_certificates/othertest.cer +0 -0
- data/spec/data/windows_certificates/test.cer +0 -0
- data/spec/data/windows_certificates/test.p7b +0 -0
- data/spec/data/windows_certificates/test.pem +18 -19
- data/spec/data/windows_certificates/test.pfx +0 -0
- data/spec/functional/resource/ifconfig_spec.rb +2 -2
- data/spec/functional/resource/windows_certificate_spec.rb +9 -9
- data/spec/functional/resource/windows_service_spec.rb +1 -2
- data/spec/functional/run_lock_spec.rb +7 -1
- 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 +2 -2
- data/spec/integration/client/exit_code_spec.rb +1 -0
- data/spec/integration/client/ipv6_spec.rb +1 -0
- data/spec/integration/knife/chef_fs_data_store_spec.rb +1 -0
- data/spec/integration/knife/chef_repo_path_spec.rb +1 -0
- data/spec/integration/knife/chef_repository_file_system_spec.rb +1 -0
- data/spec/integration/knife/chefignore_spec.rb +1 -0
- data/spec/integration/knife/client_bulk_delete_spec.rb +1 -0
- data/spec/integration/knife/client_create_spec.rb +1 -0
- data/spec/integration/knife/client_delete_spec.rb +1 -0
- data/spec/integration/knife/client_key_create_spec.rb +1 -0
- data/spec/integration/knife/client_key_delete_spec.rb +1 -0
- data/spec/integration/knife/client_key_list_spec.rb +1 -0
- data/spec/integration/knife/client_key_show_spec.rb +1 -0
- data/spec/integration/knife/client_list_spec.rb +1 -0
- data/spec/integration/knife/client_show_spec.rb +1 -0
- data/spec/integration/knife/common_options_spec.rb +1 -0
- data/spec/integration/knife/config_get_profile_spec.rb +1 -0
- data/spec/integration/knife/config_get_spec.rb +1 -0
- data/spec/integration/knife/config_list_profiles_spec.rb +1 -0
- data/spec/integration/knife/config_use_profile_spec.rb +1 -0
- data/spec/integration/knife/cookbook_api_ipv6_spec.rb +1 -0
- data/spec/integration/knife/cookbook_bulk_delete_spec.rb +1 -0
- data/spec/integration/knife/cookbook_download_spec.rb +1 -0
- data/spec/integration/knife/cookbook_list_spec.rb +1 -0
- data/spec/integration/knife/cookbook_show_spec.rb +1 -0
- data/spec/integration/knife/cookbook_upload_spec.rb +1 -0
- data/spec/integration/knife/data_bag_create_spec.rb +1 -0
- data/spec/integration/knife/data_bag_delete_spec.rb +1 -0
- data/spec/integration/knife/data_bag_edit_spec.rb +1 -0
- data/spec/integration/knife/data_bag_from_file_spec.rb +1 -0
- data/spec/integration/knife/data_bag_list_spec.rb +1 -0
- data/spec/integration/knife/data_bag_show_spec.rb +1 -0
- data/spec/integration/knife/delete_spec.rb +1 -0
- data/spec/integration/knife/deps_spec.rb +3 -2
- data/spec/integration/knife/diff_spec.rb +1 -0
- data/spec/integration/knife/download_spec.rb +1 -0
- data/spec/integration/knife/environment_compare_spec.rb +1 -0
- data/spec/integration/knife/environment_create_spec.rb +1 -0
- data/spec/integration/knife/environment_delete_spec.rb +1 -0
- data/spec/integration/knife/environment_from_file_spec.rb +1 -0
- data/spec/integration/knife/environment_list_spec.rb +1 -0
- data/spec/integration/knife/environment_show_spec.rb +1 -0
- data/spec/integration/knife/list_spec.rb +1 -0
- data/spec/integration/knife/node_bulk_delete_spec.rb +1 -0
- data/spec/integration/knife/node_create_spec.rb +1 -0
- data/spec/integration/knife/node_delete_spec.rb +1 -0
- data/spec/integration/knife/node_environment_set_spec.rb +1 -0
- data/spec/integration/knife/node_from_file_spec.rb +1 -0
- data/spec/integration/knife/node_list_spec.rb +1 -0
- data/spec/integration/knife/node_run_list_add_spec.rb +1 -0
- data/spec/integration/knife/node_run_list_remove_spec.rb +1 -0
- data/spec/integration/knife/node_run_list_set_spec.rb +1 -0
- data/spec/integration/knife/node_show_spec.rb +1 -0
- data/spec/integration/knife/raw_spec.rb +1 -0
- data/spec/integration/knife/redirection_spec.rb +1 -0
- data/spec/integration/knife/role_bulk_delete_spec.rb +1 -0
- data/spec/integration/knife/role_create_spec.rb +1 -0
- data/spec/integration/knife/role_delete_spec.rb +1 -0
- data/spec/integration/knife/role_from_file_spec.rb +1 -0
- data/spec/integration/knife/role_list_spec.rb +1 -0
- data/spec/integration/knife/role_show_spec.rb +1 -0
- data/spec/integration/knife/search_node_spec.rb +1 -0
- data/spec/integration/knife/show_spec.rb +1 -0
- data/spec/integration/knife/upload_spec.rb +1 -0
- data/spec/integration/recipes/accumulator_spec.rb +1 -0
- data/spec/integration/recipes/lwrp_inline_resources_spec.rb +1 -0
- data/spec/integration/recipes/lwrp_spec.rb +1 -0
- data/spec/integration/recipes/notifies_spec.rb +1 -0
- data/spec/integration/recipes/notifying_block_spec.rb +1 -0
- data/spec/integration/recipes/recipe_dsl_spec.rb +1 -0
- data/spec/integration/recipes/resource_action_spec.rb +1 -0
- data/spec/integration/recipes/unified_mode_spec.rb +1 -0
- data/spec/integration/solo/solo_spec.rb +1 -0
- data/spec/spec_helper.rb +7 -10
- data/spec/support/chef_helpers.rb +1 -1
- data/spec/support/key_helpers.rb +0 -2
- data/spec/support/platform_helpers.rb +7 -3
- data/spec/support/platforms/win32/spec_service.rb +27 -25
- data/spec/support/shared/context/config.rb +0 -3
- data/spec/support/shared/integration/integration_helper.rb +0 -1
- data/spec/support/shared/unit/execute_resource.rb +0 -2
- data/spec/support/shared/unit/provider/file.rb +0 -1
- data/spec/support/shared/unit/script_resource.rb +2 -4
- data/spec/support/shared/unit/windows_script_resource.rb +0 -2
- data/spec/unit/cookbook/gem_installer_spec.rb +1 -1
- data/spec/unit/cookbook/metadata_spec.rb +1 -10
- data/spec/unit/data_collector_spec.rb +1 -1
- data/spec/unit/deprecated_spec.rb +3 -3
- data/spec/unit/encrypted_data_bag_item/check_encrypted_spec.rb +1 -1
- data/spec/unit/encrypted_data_bag_item_spec.rb +2 -2
- data/spec/unit/knife/core/windows_bootstrap_context_spec.rb +3 -3
- data/spec/unit/knife_spec.rb +6 -7
- data/spec/unit/mixin/shell_out_spec.rb +27 -29
- data/spec/unit/provider/file_spec.rb +1 -0
- data/spec/unit/resource/build_essential_spec.rb +48 -2
- data/spec/unit/resource/data/InstallHistory_with_CLT.plist +92 -0
- data/spec/unit/resource/data/InstallHistory_without_CLT.plist +38 -0
- data/spec/unit/resource/execute_spec.rb +1 -1
- data/spec/unit/resource/rhsm_register_spec.rb +24 -0
- data/spec/unit/resource/windows_share_spec.rb +3 -1
- data/tasks/rspec.rb +1 -0
- metadata +9 -6
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright:: 2015-
|
2
|
+
# Copyright:: 2015-2020 Chef Software, Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -16,11 +16,13 @@
|
|
16
16
|
#
|
17
17
|
|
18
18
|
require_relative "../resource"
|
19
|
+
require_relative "../dist"
|
19
20
|
require "shellwords" unless defined?(Shellwords)
|
20
21
|
|
21
22
|
class Chef
|
22
23
|
class Resource
|
23
24
|
class RhsmRegister < Chef::Resource
|
25
|
+
unified_mode true
|
24
26
|
resource_name :rhsm_register
|
25
27
|
provides(:rhsm_register) { true }
|
26
28
|
|
@@ -60,25 +62,30 @@ class Chef
|
|
60
62
|
description: "If true, the system will be registered even if it is already registered. Normally, any register operations will fail if the machine has already been registered.",
|
61
63
|
default: false, desired_state: false
|
62
64
|
|
65
|
+
property :https_for_ca_consumer, [TrueClass, FalseClass],
|
66
|
+
description: "If true, #{Chef::Dist::PRODUCT} will fetch the katello-ca-consumer-latest.noarch.rpm from the satellite_host using HTTPS.",
|
67
|
+
default: false, desired_state: false,
|
68
|
+
introduced: "15.9"
|
69
|
+
|
63
70
|
action :register do
|
64
71
|
description "Register the node with RHSM."
|
65
72
|
|
66
73
|
package "subscription-manager"
|
67
74
|
|
68
75
|
unless new_resource.satellite_host.nil? || registered_with_rhsm?
|
69
|
-
|
70
|
-
source "http://#{new_resource.satellite_host}/pub/katello-ca-consumer-latest.noarch.rpm"
|
71
|
-
action :create
|
72
|
-
notifies :install, "yum_package[katello-ca-consumer-latest]", :immediately
|
73
|
-
not_if { katello_cert_rpm_installed? }
|
74
|
-
end
|
75
|
-
|
76
|
-
yum_package "katello-ca-consumer-latest" do
|
76
|
+
declare_resource(package_resource, "katello-ca-consumer-latest") do
|
77
77
|
options "--nogpgcheck"
|
78
78
|
source "#{Chef::Config[:file_cache_path]}/katello-package.rpm"
|
79
79
|
action :nothing
|
80
80
|
end
|
81
81
|
|
82
|
+
remote_file "#{Chef::Config[:file_cache_path]}/katello-package.rpm" do
|
83
|
+
source ca_consumer_package_source
|
84
|
+
action :create
|
85
|
+
notifies :install, "#{package_resource}[katello-ca-consumer-latest]", :immediately
|
86
|
+
not_if { katello_cert_rpm_installed? }
|
87
|
+
end
|
88
|
+
|
82
89
|
file "#{Chef::Config[:file_cache_path]}/katello-package.rpm" do
|
83
90
|
action :delete
|
84
91
|
end
|
@@ -92,9 +99,8 @@ class Chef
|
|
92
99
|
not_if { registered_with_rhsm? } unless new_resource.force
|
93
100
|
end
|
94
101
|
|
95
|
-
|
96
|
-
|
97
|
-
only_if { new_resource.install_katello_agent && !new_resource.satellite_host.nil? }
|
102
|
+
if new_resource.install_katello_agent && !new_resource.satellite_host.nil?
|
103
|
+
package "katello-agent"
|
98
104
|
end
|
99
105
|
end
|
100
106
|
|
@@ -117,6 +123,10 @@ class Chef
|
|
117
123
|
end
|
118
124
|
|
119
125
|
action_class do
|
126
|
+
def package_resource
|
127
|
+
node["platform_version"].to_i >= 8 ? :dnf_package : :yum_package
|
128
|
+
end
|
129
|
+
|
120
130
|
def registered_with_rhsm?
|
121
131
|
cmd = Mixlib::ShellOut.new("subscription-manager status", env: { LANG: "en_US" })
|
122
132
|
cmd.run_command
|
@@ -129,6 +139,11 @@ class Chef
|
|
129
139
|
!cmd.stdout.match(/katello-ca-consumer/).nil?
|
130
140
|
end
|
131
141
|
|
142
|
+
def ca_consumer_package_source
|
143
|
+
protocol = new_resource.https_for_ca_consumer ? "https" : "http"
|
144
|
+
"#{protocol}://#{new_resource.satellite_host}/pub/katello-ca-consumer-latest.noarch.rpm"
|
145
|
+
end
|
146
|
+
|
132
147
|
def register_command
|
133
148
|
command = %w{subscription-manager register}
|
134
149
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2012-2018, Seth Vargo
|
3
|
-
# Copyright 2017-
|
2
|
+
# Copyright:: 2012-2018, Seth Vargo
|
3
|
+
# Copyright:: 2017-2020, Chef Software, Inc.
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
6
|
# you may not use this file except in compliance with the License.
|
@@ -1,8 +1,8 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Kirill Kouznetsov <agon.smith@gmail.com>
|
3
3
|
#
|
4
|
-
# Copyright 2018, Kirill Kouznetsov.
|
5
|
-
# Copyright 2018, Chef Software
|
4
|
+
# Copyright:: 2018, Kirill Kouznetsov.
|
5
|
+
# Copyright:: 2018-2020, Chef Software Inc.
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
# you may not use this file except in compliance with the License.
|
@@ -85,7 +85,6 @@ class Chef
|
|
85
85
|
guard_script << cert_exists_script(hash)
|
86
86
|
|
87
87
|
powershell_script "setting the acls on #{new_resource.source} in #{cert_location}\\#{new_resource.store_name}" do
|
88
|
-
guard_interpreter :powershell_script
|
89
88
|
convert_boolean_return true
|
90
89
|
code code_script
|
91
90
|
only_if guard_script
|
@@ -310,7 +309,6 @@ class Chef
|
|
310
309
|
def import_certificates(cert_objs, is_pfx)
|
311
310
|
[cert_objs].flatten.each do |cert_obj|
|
312
311
|
thumbprint = OpenSSL::Digest::SHA1.new(cert_obj.to_der).to_s # Fetch its thumbprint
|
313
|
-
|
314
312
|
# Need to check if return value is Boolean:true
|
315
313
|
# If not then the given certificate should be added in certstore
|
316
314
|
if verify_cert(thumbprint) == true
|
@@ -39,7 +39,7 @@ class Chef
|
|
39
39
|
# Specifies the path of the location of the folder to share. The path must be fully qualified. Relative paths or paths that contain wildcard characters are not permitted.
|
40
40
|
property :path, String,
|
41
41
|
description: "The path of the folder to share. Required when creating. If the share already exists on a different path then it is deleted and re-created.",
|
42
|
-
coerce: proc { |p| p.gsub
|
42
|
+
coerce: proc { |p| p.gsub(%r{/}, "\\") || p }
|
43
43
|
|
44
44
|
# Specifies an optional description of the SMB share. A description of the share is displayed by running the Get-SmbShare cmdlet. The description may not contain more than 256 characters.
|
45
45
|
property :description, String,
|
data/lib/chef/shell/ext.rb
CHANGED
@@ -211,7 +211,7 @@ module Shell
|
|
211
211
|
desc "prints information about #{Chef::Dist::PRODUCT}"
|
212
212
|
def version
|
213
213
|
puts "Welcome to the #{Chef::Dist::SHELL} #{::Chef::VERSION}\n" +
|
214
|
-
"For usage see https://docs.chef.io/chef_shell
|
214
|
+
"For usage see https://docs.chef.io/chef_shell/"
|
215
215
|
:ucanhaz_automation
|
216
216
|
end
|
217
217
|
alias :shell :version
|
data/lib/chef/util/diff.rb
CHANGED
@@ -152,14 +152,14 @@ class Chef
|
|
152
152
|
|
153
153
|
if !diff_str.empty? && diff_str != "No differences encountered\n"
|
154
154
|
if diff_str.length > diff_output_threshold
|
155
|
-
|
155
|
+
"(long diff of over #{diff_output_threshold} characters, diff output suppressed)"
|
156
156
|
else
|
157
157
|
diff_str = encode_diff_for_json(diff_str)
|
158
158
|
@diff = diff_str.split("\n")
|
159
|
-
|
159
|
+
"(diff available)"
|
160
160
|
end
|
161
161
|
else
|
162
|
-
|
162
|
+
"(no diff)"
|
163
163
|
end
|
164
164
|
end
|
165
165
|
|
data/lib/chef/util/selinux.rb
CHANGED
@@ -75,9 +75,9 @@ class Chef
|
|
75
75
|
cmd = shell_out!(selinuxenabled_path, returns: [0, 1])
|
76
76
|
case cmd.exitstatus
|
77
77
|
when 1
|
78
|
-
|
78
|
+
false
|
79
79
|
when 0
|
80
|
-
|
80
|
+
true
|
81
81
|
else
|
82
82
|
raise "Unknown exit code from command #{selinuxenabled_path}: #{cmd.exitstatus}"
|
83
83
|
end
|
data/lib/chef/version.rb
CHANGED
data/lib/chef/win32/error.rb
CHANGED
data/lib/chef/win32/registry.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
# This is a Chef recipe file. It can be used to specify resources which will
|
2
2
|
# apply configuration to a server.
|
3
3
|
|
4
|
-
# For more information, see the documentation: https://docs.chef.io/
|
4
|
+
# For more information, see the documentation: https://docs.chef.io/recipes/
|
@@ -1,22 +1,20 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
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Rk4
|
8
|
+
1a7GlpUpSqI3y5cLeEbzwGQKu8I1I+v7P2fTlnJPHarM7sBbL8bieukkFHYu78iV
|
9
|
+
u1wpKOCCfs5DTmJu8WN+z1Mar9vyrWMBlt2wBBgNHPz5mcXUzJHTzaI/D9RGgBgF
|
10
|
+
V0IkNqISx/IzR62jjj2g6MgTH4G/0mM6O5sxduM4yGmWZNZpVzh0yMLgH619MZlj
|
11
|
+
SMQIN3U/SQIDAQABo3MwcTAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYB
|
12
|
+
BQUHAwIGCCsGAQUFBwMBMCEGA1UdEQQaMBiCFnd3dy5kdW1teWNoZWZ0ZXN0cy5j
|
13
|
+
b20wHQYDVR0OBBYEFHwS3gs03m6RcpR+66u4OqGiZdYnMA0GCSqGSIb3DQEBCwUA
|
14
|
+
A4IBAQCFHqMjHUfBZahIsKHQIcFCbC1NFh1ZHlJKZzrRBRwRzX19OttHGMyLpDd6
|
15
|
+
tM9Ac6LLR8S4QIWg+HF3IrkN+vfTRDZAccj+tIwBRstmdsEz/rAJ79Vb/00mXZQx
|
16
|
+
0FPiBDR3hE7On2oo24DU8kJP3v6TrunwtIomVGqrrkwZzvxqyW+WJMB2shGNFw5J
|
17
|
+
mKYBiiXsHl4Bi7V4zhXssrLp877sqpNLeXloXBmAlT39SwQTP9ImZaV5R6udqlvo
|
18
|
+
Gfgm5PH/WeK6MV3n5ik0v1rS0LwR2o82WlIB6a4iSEbzY3qSLsWOwt8o5QjAVzCR
|
19
|
+
tNdbdS3U8nrG73iA2clmF57ARQWC
|
21
20
|
-----END CERTIFICATE-----
|
Binary file
|
@@ -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,7 +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, external: include_flag do
|
26
|
+
describe Chef::Resource::Ifconfig, :requires_root, :requires_ifconfig, external: include_flag do
|
27
27
|
include Chef::Mixin::ShellOut
|
28
28
|
|
29
29
|
let(:new_resource) do
|
@@ -47,7 +47,7 @@ module WindowsCertificateHelper
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
-
describe Chef::Resource::WindowsCertificate, :windows_only
|
50
|
+
describe Chef::Resource::WindowsCertificate, :windows_only do
|
51
51
|
include WindowsCertificateHelper
|
52
52
|
|
53
53
|
let(:stdout) { StringIO.new }
|
@@ -65,11 +65,11 @@ describe Chef::Resource::WindowsCertificate, :windows_only, :appveyor_only do
|
|
65
65
|
let(:p7b_path) { File.join(certificate_path, "test.p7b") }
|
66
66
|
let(:pfx_path) { File.join(certificate_path, "test.pfx") }
|
67
67
|
let(:out_path) { File.join(certificate_path, "testout.pem") }
|
68
|
-
let(:tests_thumbprint) { "
|
68
|
+
let(:tests_thumbprint) { "e45a4a7ff731e143cf20b8bfb9c7c4edd5238bb3" }
|
69
69
|
let(:other_cer_path) { File.join(certificate_path, "othertest.cer") }
|
70
|
-
let(:others_thumbprint) { "
|
71
|
-
let(:p7b_thumbprint) { "
|
72
|
-
let(:p7b_nested_thumbprint) { "
|
70
|
+
let(:others_thumbprint) { "6eae1deefaf59daf1a97c9ceeff39c98b3da38cb" }
|
71
|
+
let(:p7b_thumbprint) { "f867e25b928061318ed2c36ca517681774b06260" }
|
72
|
+
let(:p7b_nested_thumbprint) { "dc395eae6be5b69951b8b6e1090cfc33df30d2cd" }
|
73
73
|
|
74
74
|
before do
|
75
75
|
opts = { store_name: store }
|
@@ -221,7 +221,7 @@ describe Chef::Resource::WindowsCertificate, :windows_only, :appveyor_only do
|
|
221
221
|
expect(win_certificate).not_to be_updated_by_last_action
|
222
222
|
end
|
223
223
|
it "Nested certificates are also imported" do
|
224
|
-
expect(no_of_certificates).to eq(
|
224
|
+
expect(no_of_certificates).to eq(3)
|
225
225
|
end
|
226
226
|
end
|
227
227
|
|
@@ -322,7 +322,7 @@ describe Chef::Resource::WindowsCertificate, :windows_only, :appveyor_only do
|
|
322
322
|
win_certificate.run_action(:verify)
|
323
323
|
end
|
324
324
|
it "Initial check if certificate is present" do
|
325
|
-
expect(no_of_certificates).to eq(
|
325
|
+
expect(no_of_certificates).to eq(3)
|
326
326
|
end
|
327
327
|
it "Displays correct message" do
|
328
328
|
expect(stdout.string.strip).to eq("Certificate is valid")
|
@@ -338,7 +338,7 @@ describe Chef::Resource::WindowsCertificate, :windows_only, :appveyor_only do
|
|
338
338
|
win_certificate.run_action(:verify)
|
339
339
|
end
|
340
340
|
it "Initial check if certificate is present" do
|
341
|
-
expect(no_of_certificates).to eq(
|
341
|
+
expect(no_of_certificates).to eq(3)
|
342
342
|
end
|
343
343
|
it "Displays correct message" do
|
344
344
|
expect(stdout.string.strip).to eq("Certificate is valid")
|
@@ -354,7 +354,7 @@ describe Chef::Resource::WindowsCertificate, :windows_only, :appveyor_only do
|
|
354
354
|
win_certificate.run_action(:verify)
|
355
355
|
end
|
356
356
|
it "Initial check if certificate is present" do
|
357
|
-
expect(no_of_certificates).to eq(
|
357
|
+
expect(no_of_certificates).to eq(3)
|
358
358
|
end
|
359
359
|
it "Displays correct message" do
|
360
360
|
expect(stdout.string.strip).to eq("Certificate not found")
|
@@ -18,8 +18,7 @@
|
|
18
18
|
|
19
19
|
require "spec_helper"
|
20
20
|
|
21
|
-
describe Chef::Resource::WindowsService, :windows_only, :system_windows_service_gem_only
|
22
|
-
# Marking as broken. This test is causing appveyor tests to exit with 116.
|
21
|
+
describe Chef::Resource::WindowsService, :windows_only, :system_windows_service_gem_only do
|
23
22
|
|
24
23
|
include_context "using Win32::Service"
|
25
24
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Daniel DeLeo (<dan@chef.io>)
|
3
|
-
# Copyright:: Copyright 2012-
|
3
|
+
# Copyright:: Copyright 2012-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");
|
@@ -404,6 +404,12 @@ describe Chef::RunLock do
|
|
404
404
|
example.log_event("#{name}.stop finished (pid #{pid} wasn't running)")
|
405
405
|
end
|
406
406
|
end
|
407
|
+
|
408
|
+
# close the IO.pipes so we don't leak them as open filehandles
|
409
|
+
@read_from_process.close rescue nil
|
410
|
+
@write_to_tests.close rescue nil
|
411
|
+
@read_from_tests.close rescue nil
|
412
|
+
@write_to_process.close rescue nil
|
407
413
|
end
|
408
414
|
|
409
415
|
def fire_event(event)
|
@@ -33,7 +33,7 @@ end
|
|
33
33
|
# directories.
|
34
34
|
#
|
35
35
|
|
36
|
-
describe "Chef::Application::WindowsServiceManager", :windows_only, :system_windows_service_gem_only
|
36
|
+
describe "Chef::Application::WindowsServiceManager", :windows_only, :system_windows_service_gem_only do
|
37
37
|
|
38
38
|
include_context "using Win32::Service"
|
39
39
|
|
@@ -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
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "spec_helper"
|
1
2
|
require "support/shared/integration/integration_helper"
|
2
3
|
require "chef/mixin/shell_out"
|
3
4
|
require "tiny_server"
|
@@ -540,8 +541,7 @@ describe "chef-client" do
|
|
540
541
|
end
|
541
542
|
end
|
542
543
|
|
543
|
-
|
544
|
-
context "when using recipe-url", :skip_appveyor do
|
544
|
+
context "when using recipe-url" do
|
545
545
|
before(:each) do
|
546
546
|
start_tiny_server
|
547
547
|
end
|