chef 16.1.0-universal-mingw32 → 16.1.16-universal-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +15 -1
- data/distro/powershell/chef/chef.psm1 +3 -3
- data/distro/templates/powershell/chef/chef.psm1.erb +3 -3
- data/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/directory.rb +1 -1
- data/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb +1 -1
- data/lib/chef/chef_fs/path_utils.rb +3 -3
- data/lib/chef/cookbook/file_system_file_vendor.rb +1 -1
- data/lib/chef/cookbook/metadata.rb +1 -1
- data/lib/chef/cookbook_loader.rb +1 -1
- data/lib/chef/cookbook_manifest.rb +1 -1
- data/lib/chef/cookbook_site_streaming_uploader.rb +1 -1
- data/lib/chef/cookbook_version.rb +2 -2
- data/lib/chef/data_collector.rb +1 -1
- data/lib/chef/data_collector/error_handlers.rb +1 -1
- data/lib/chef/decorator/lazy_array.rb +2 -2
- data/lib/chef/digester.rb +4 -4
- data/lib/chef/dsl/declare_resource.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/decryptor.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/encryptor.rb +1 -1
- data/lib/chef/formatters/base.rb +1 -1
- data/lib/chef/http.rb +1 -1
- data/lib/chef/http/decompressor.rb +1 -1
- data/lib/chef/json_compat.rb +1 -1
- data/lib/chef/key.rb +1 -1
- data/lib/chef/knife.rb +1 -1
- data/lib/chef/knife/bootstrap.rb +5 -5
- data/lib/chef/knife/bootstrap/chef_vault_handler.rb +1 -1
- data/lib/chef/knife/bootstrap/client_builder.rb +1 -1
- data/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb +3 -1
- data/lib/chef/knife/core/hashed_command_loader.rb +1 -1
- data/lib/chef/knife/core/node_presenter.rb +1 -1
- data/lib/chef/knife/core/status_presenter.rb +1 -1
- data/lib/chef/knife/core/subcommand_loader.rb +1 -1
- data/lib/chef/knife/core/windows_bootstrap_context.rb +18 -3
- data/lib/chef/knife/key_create_base.rb +1 -1
- data/lib/chef/knife/key_edit_base.rb +1 -1
- data/lib/chef/knife/ssh.rb +1 -1
- data/lib/chef/mixin/api_version_request_handling.rb +1 -1
- data/lib/chef/mixin/checksum.rb +0 -1
- data/lib/chef/mixin/openssl_helper.rb +4 -4
- data/lib/chef/mixin/properties.rb +2 -2
- data/lib/chef/mixin/shell_out.rb +1 -1
- data/lib/chef/node/attribute.rb +2 -2
- data/lib/chef/node/immutable_collections.rb +1 -1
- data/lib/chef/policy_builder/policyfile.rb +1 -1
- data/lib/chef/property.rb +2 -2
- data/lib/chef/provider.rb +3 -3
- data/lib/chef/provider/directory.rb +1 -1
- data/lib/chef/provider/file.rb +1 -1
- data/lib/chef/provider/package/chocolatey.rb +1 -1
- data/lib/chef/provider/package/dpkg.rb +1 -1
- data/lib/chef/provider/package/portage.rb +1 -0
- data/lib/chef/provider/package/rubygems.rb +1 -1
- data/lib/chef/provider/package/windows.rb +2 -2
- data/lib/chef/provider/package/yum.rb +1 -1
- data/lib/chef/provider/package/yum/yum_cache.rb +1 -1
- data/lib/chef/provider/remote_directory.rb +2 -2
- data/lib/chef/provider/service/arch.rb +1 -1
- data/lib/chef/provider/service/upstart.rb +1 -1
- data/lib/chef/provider/user/aix.rb +1 -1
- data/lib/chef/provider/user/dscl.rb +2 -2
- data/lib/chef/provider/user/mac.rb +10 -6
- data/lib/chef/provider/windows_task.rb +4 -2
- data/lib/chef/resource.rb +3 -3
- data/lib/chef/resource/chef_handler.rb +2 -2
- data/lib/chef/resource/chef_vault_secret.rb +1 -1
- 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/file.rb +10 -8
- data/lib/chef/resource/hostname.rb +1 -1
- data/lib/chef/resource/locale.rb +3 -3
- data/lib/chef/resource/macos_userdefaults.rb +11 -6
- data/lib/chef/resource/scm/git.rb +1 -1
- data/lib/chef/resource/windows_certificate.rb +1 -1
- data/lib/chef/resource/windows_dfs_server.rb +1 -1
- data/lib/chef/resource/windows_pagefile.rb +1 -1
- data/lib/chef/resource/windows_task.rb +6 -6
- data/lib/chef/resource/windows_user_privilege.rb +3 -3
- data/lib/chef/resource_inspector.rb +4 -3
- data/lib/chef/run_context/cookbook_compiler.rb +1 -1
- data/lib/chef/shell/ext.rb +1 -1
- data/lib/chef/version.rb +1 -1
- data/lib/chef/win32/api.rb +2 -2
- data/lib/chef/win32/api/error.rb +3 -1
- data/lib/chef/win32/api/file.rb +1 -1
- data/lib/chef/win32/api/net.rb +1 -0
- data/lib/chef/win32/mutex.rb +1 -1
- data/lib/chef/win32/net.rb +1 -0
- data/lib/chef/win32/security/sid.rb +4 -4
- data/spec/functional/resource/dnf_package_spec.rb +2 -2
- data/spec/functional/resource/git_spec.rb +6 -6
- data/spec/functional/resource/windows_task_spec.rb +4 -4
- data/spec/support/chef_helpers.rb +1 -1
- data/spec/support/shared/functional/windows_script.rb +1 -1
- data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +4 -4
- data/spec/unit/knife/core/windows_bootstrap_context_spec.rb +7 -1
- data/spec/unit/mixin/openssl_helper_spec.rb +4 -4
- data/spec/unit/node/attribute_spec.rb +1 -1
- data/spec/unit/provider/group/groupadd_spec.rb +1 -1
- data/spec/unit/provider/package/portage_spec.rb +2 -2
- data/spec/unit/provider/package/powershell_spec.rb +1 -1
- data/spec/unit/win32/registry_spec.rb +1 -1
- metadata +6 -6
@@ -261,7 +261,7 @@ class Chef
|
|
261
261
|
|
262
262
|
SYSTEM_USER = SERVICE_ACCOUNT_USERS + BUILT_IN_GROUPS
|
263
263
|
|
264
|
-
#
|
264
|
+
# Check if the user belongs to service accounts category
|
265
265
|
#
|
266
266
|
# @return [Boolean] True or False
|
267
267
|
#
|
@@ -269,7 +269,7 @@ class Chef
|
|
269
269
|
SERVICE_ACCOUNT_USERS.include?(user.to_s.upcase)
|
270
270
|
end
|
271
271
|
|
272
|
-
#
|
272
|
+
# Check if the user is in builtin system group
|
273
273
|
#
|
274
274
|
# @return [Boolean] True or False
|
275
275
|
#
|
@@ -277,7 +277,7 @@ class Chef
|
|
277
277
|
BUILT_IN_GROUPS.include?(user.to_s.upcase)
|
278
278
|
end
|
279
279
|
|
280
|
-
#
|
280
|
+
# Check if the user belongs to system users category
|
281
281
|
#
|
282
282
|
# @return [Boolean] True or False
|
283
283
|
#
|
@@ -325,7 +325,7 @@ class Chef
|
|
325
325
|
Array.new(entriesread.read_long) do |i|
|
326
326
|
user_info = USER_INFO_3.new(bufptr.read_pointer + i * USER_INFO_3.size)
|
327
327
|
# Check if the account is the Administrator account
|
328
|
-
# RID for the Administrator account is always 500 and it's
|
328
|
+
# RID for the Administrator account is always 500 and it's privilege is set to USER_PRIV_ADMIN
|
329
329
|
if user_info[:usri3_user_id] == 500 && user_info[:usri3_priv] == 2 # USER_PRIV_ADMIN (2) - Administrator
|
330
330
|
admin_account_name = user_info[:usri3_name].read_wstring
|
331
331
|
break
|
@@ -726,7 +726,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
|
|
726
726
|
|
727
727
|
it "with a prco equality pin in the name it upgrades a prior package" do
|
728
728
|
preinstall("chef_rpm-1.2-1.#{pkg_arch}.rpm")
|
729
|
-
dnf_package.package_name("chef_rpm
|
729
|
+
dnf_package.package_name("chef_rpm = 1.10")
|
730
730
|
dnf_package.run_action(:upgrade)
|
731
731
|
expect(dnf_package.updated_by_last_action?).to be true
|
732
732
|
expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
|
@@ -742,7 +742,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
|
|
742
742
|
|
743
743
|
it "with a prco equality pin in the name it downgrades a later package" do
|
744
744
|
preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
|
745
|
-
dnf_package.package_name("chef_rpm
|
745
|
+
dnf_package.package_name("chef_rpm = 1.2")
|
746
746
|
dnf_package.run_action(:upgrade)
|
747
747
|
expect(dnf_package.updated_by_last_action?).to be true
|
748
748
|
expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}$")
|
@@ -103,7 +103,7 @@ describe Chef::Resource::Git, requires_git: true do
|
|
103
103
|
revision "v1.0.0"
|
104
104
|
end.should_be_updated
|
105
105
|
expect_revision_to_be("HEAD", v1_commit)
|
106
|
-
expect_branch_to_be("tags/v1.0.0^0") #
|
106
|
+
expect_branch_to_be("tags/v1.0.0^0") # detached
|
107
107
|
# also verify the tag commit itself is what we expect as an extra sanity check
|
108
108
|
expect_revision_to_be("v1.0.0", v1_tag)
|
109
109
|
end
|
@@ -116,7 +116,7 @@ describe Chef::Resource::Git, requires_git: true do
|
|
116
116
|
git deploy_directory do
|
117
117
|
repository origin_repo
|
118
118
|
revision "v1.0.0"
|
119
|
-
expect_branch_to_be("tags/v1.0.0^0") #
|
119
|
+
expect_branch_to_be("tags/v1.0.0^0") # detached
|
120
120
|
end.should_not_be_updated
|
121
121
|
end
|
122
122
|
end
|
@@ -128,7 +128,7 @@ describe Chef::Resource::Git, requires_git: true do
|
|
128
128
|
revision rev_foo
|
129
129
|
end.should_be_updated
|
130
130
|
expect_revision_to_be("HEAD", rev_foo)
|
131
|
-
expect_branch_to_be("master~1") #
|
131
|
+
expect_branch_to_be("master~1") # detached
|
132
132
|
end
|
133
133
|
|
134
134
|
it "checks out the expected revision ed18 to a local branch" do
|
@@ -138,7 +138,7 @@ describe Chef::Resource::Git, requires_git: true do
|
|
138
138
|
checkout_branch "deploy"
|
139
139
|
end.should_be_updated
|
140
140
|
expect_revision_to_be("HEAD", rev_foo)
|
141
|
-
expect_branch_to_be("deploy") #
|
141
|
+
expect_branch_to_be("deploy") # detached
|
142
142
|
end
|
143
143
|
|
144
144
|
it "doesn't update if up-to-date" do
|
@@ -152,7 +152,7 @@ describe Chef::Resource::Git, requires_git: true do
|
|
152
152
|
repository origin_repo
|
153
153
|
revision rev_foo
|
154
154
|
end.should_not_be_updated
|
155
|
-
expect_branch_to_be("master~1") #
|
155
|
+
expect_branch_to_be("master~1") # detached
|
156
156
|
end
|
157
157
|
|
158
158
|
it "checks out the expected revision 972d" do
|
@@ -161,7 +161,7 @@ describe Chef::Resource::Git, requires_git: true do
|
|
161
161
|
revision rev_testing
|
162
162
|
end.should_be_updated
|
163
163
|
expect_revision_to_be("HEAD", rev_testing)
|
164
|
-
expect_branch_to_be("master~2") #
|
164
|
+
expect_branch_to_be("master~2") # detached
|
165
165
|
end
|
166
166
|
|
167
167
|
it "checks out the expected revision 972d to a local branch" do
|
@@ -317,12 +317,12 @@ describe Chef::Resource::WindowsTask, :windows_only do
|
|
317
317
|
expect(subject).not_to be_updated_by_last_action
|
318
318
|
end
|
319
319
|
|
320
|
-
it "updates a scheduled task to run every 5 hrs when frequency
|
320
|
+
it "updates a scheduled task to run every 5 hrs when frequency modifier updated to 5" do
|
321
321
|
subject.run_action(:create)
|
322
322
|
current_resource = call_for_load_current_resource
|
323
323
|
trigger_details = current_resource.task.trigger(0)
|
324
324
|
expect(trigger_details[:minutes_interval]).to eq(180)
|
325
|
-
# updating frequency
|
325
|
+
# updating frequency modifier to 5 from 3
|
326
326
|
subject.frequency_modifier 5
|
327
327
|
subject.run_action(:create)
|
328
328
|
expect(subject).to be_updated_by_last_action
|
@@ -501,7 +501,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
|
|
501
501
|
|
502
502
|
it "raises argument error if frequency_modifier is 'first, second' and day is not provided." do
|
503
503
|
subject.frequency_modifier "first, second"
|
504
|
-
expect { subject.after_created }.to raise_error("Please select day on which you want to run the task e.g. 'Mon, Tue'. Multiple values must be
|
504
|
+
expect { subject.after_created }.to raise_error("Please select day on which you want to run the task e.g. 'Mon, Tue'. Multiple values must be separated by comma.")
|
505
505
|
end
|
506
506
|
|
507
507
|
it "raises argument error if months is passed along with frequency_modifier" do
|
@@ -532,7 +532,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
|
|
532
532
|
expect { subject.after_created }.to raise_error("frequency_modifier value 0 is invalid. Valid values for :monthly frequency are 1 - 12, 'FIRST', 'SECOND', 'THIRD', 'FOURTH', 'LAST'.")
|
533
533
|
end
|
534
534
|
|
535
|
-
it "creates scheduled task to run task monthly on Monday and Friday of first, second and
|
535
|
+
it "creates scheduled task to run task monthly on Monday and Friday of first, second and third week of month" do
|
536
536
|
subject.frequency_modifier "first, second, third"
|
537
537
|
subject.day "Mon, Fri"
|
538
538
|
expect { subject.after_created }.not_to raise_error(ArgumentError)
|
@@ -27,7 +27,7 @@ Chef::Log.level(Chef::Config.log_level)
|
|
27
27
|
Chef::Config.solo(false)
|
28
28
|
|
29
29
|
def sha256_checksum(path)
|
30
|
-
OpenSSL::Digest
|
30
|
+
OpenSSL::Digest.hexdigest("SHA256", File.read(path))
|
31
31
|
end
|
32
32
|
|
33
33
|
# extracted from Ruby < 2.5 to return a unique temp file name without creating it
|
@@ -146,7 +146,7 @@ shared_context Chef::Resource::WindowsScript do
|
|
146
146
|
shared_examples_for "a script whose file system location cannot be accessed by other non-admin users" do
|
147
147
|
let(:ruby_access_command) { file_access_command }
|
148
148
|
it "generates a script in the local file system that prevents read access to other non-admin users" do
|
149
|
-
shell_out!(access_command,
|
149
|
+
shell_out!(access_command, user: windows_nonadmin_user, password: windows_nonadmin_user_password, returns: [access_denied_sentinel])
|
150
150
|
end
|
151
151
|
end
|
152
152
|
|
@@ -106,25 +106,25 @@ shared_examples_for "a useradd-based user provider" do |supported_useradd_option
|
|
106
106
|
|
107
107
|
describe "when the resource has a different home directory and supports home directory management" do
|
108
108
|
before do
|
109
|
-
@new_resource.home "/
|
109
|
+
@new_resource.home "/banana"
|
110
110
|
@new_resource.manage_home true
|
111
111
|
end
|
112
112
|
|
113
113
|
it "should set -m -d /homedir" do
|
114
|
-
expect(provider.universal_options).to eq(%w{-d /
|
114
|
+
expect(provider.universal_options).to eq(%w{-d /banana})
|
115
115
|
expect(provider.usermod_options).to eq(%w{-m})
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
119
119
|
describe "when the resource has a different home directory and supports home directory management (using real attributes)" do
|
120
120
|
before do
|
121
|
-
@new_resource.home("/
|
121
|
+
@new_resource.home("/banana")
|
122
122
|
@new_resource.manage_home true
|
123
123
|
@new_resource.non_unique false
|
124
124
|
end
|
125
125
|
|
126
126
|
it "should set -m -d /homedir" do
|
127
|
-
expect(provider.universal_options).to eq(%w{-d /
|
127
|
+
expect(provider.universal_options).to eq(%w{-d /banana})
|
128
128
|
expect(provider.usermod_options).to eq(%w{-m})
|
129
129
|
end
|
130
130
|
end
|
@@ -181,6 +181,12 @@ describe Chef::Knife::Core::WindowsBootstrapContext do
|
|
181
181
|
end
|
182
182
|
end
|
183
183
|
|
184
|
+
describe "#start_chef" do
|
185
|
+
it "returns the expected string" do
|
186
|
+
expect(bootstrap_context.start_chef).to match(%r{SET \"PATH=%SystemRoot%\\system32;%SystemRoot%;%SystemRoot%\\System32\\Wbem;%SYSTEMROOT%\\System32\\WindowsPowerShell\\v1.0\\;C:\\ruby\\bin;C:\/opscode\/chef\\bin;C:\/opscode\/chef\\embedded\\bin\;%PATH%\"\n})
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
184
190
|
describe "msi_url" do
|
185
191
|
context "when msi_url config option is not set" do
|
186
192
|
let(:config) { { channel: "stable" } }
|
@@ -211,7 +217,7 @@ describe Chef::Knife::Core::WindowsBootstrapContext do
|
|
211
217
|
let(:custom_url) { "file://something" }
|
212
218
|
let(:config) { { msi_url: custom_url, install: true } }
|
213
219
|
|
214
|
-
it "returns the
|
220
|
+
it "returns the overridden url" do
|
215
221
|
expect(bootstrap_context.msi_url).to eq(custom_url)
|
216
222
|
end
|
217
223
|
|
@@ -488,7 +488,7 @@ describe Chef::Mixin::OpenSSLHelper do
|
|
488
488
|
@ca_cert.add_extension(ef.create_extension("keyUsage", "keyCertSign, cRLSign", true))
|
489
489
|
@ca_cert.add_extension(ef.create_extension("subjectKeyIdentifier", "hash", false))
|
490
490
|
@ca_cert.add_extension(ef.create_extension("authorityKeyIdentifier", "keyid:always", false))
|
491
|
-
@ca_cert.sign(@ca_key, OpenSSL::Digest
|
491
|
+
@ca_cert.sign(@ca_key, OpenSSL::Digest.new("SHA256"))
|
492
492
|
|
493
493
|
@info_with_issuer = { "validity" => 365, "issuer" => @ca_cert }
|
494
494
|
@info_without_issuer = { "validity" => 365 }
|
@@ -614,7 +614,7 @@ describe Chef::Mixin::OpenSSLHelper do
|
|
614
614
|
@ca_cert.add_extension(ef.create_extension("keyUsage", "keyCertSign, cRLSign", true))
|
615
615
|
@ca_cert.add_extension(ef.create_extension("subjectKeyIdentifier", "hash", false))
|
616
616
|
@ca_cert.add_extension(ef.create_extension("authorityKeyIdentifier", "keyid:always", false))
|
617
|
-
@ca_cert.sign(@ca_key, OpenSSL::Digest
|
617
|
+
@ca_cert.sign(@ca_key, OpenSSL::Digest.new("SHA256"))
|
618
618
|
|
619
619
|
@info = { "validity" => 8, "issuer" => @ca_cert }
|
620
620
|
end
|
@@ -684,7 +684,7 @@ describe Chef::Mixin::OpenSSLHelper do
|
|
684
684
|
@ca_cert.add_extension(ef.create_extension("keyUsage", "keyCertSign, cRLSign", true))
|
685
685
|
@ca_cert.add_extension(ef.create_extension("subjectKeyIdentifier", "hash", false))
|
686
686
|
@ca_cert.add_extension(ef.create_extension("authorityKeyIdentifier", "keyid:always", false))
|
687
|
-
@ca_cert.sign(@ca_key, OpenSSL::Digest
|
687
|
+
@ca_cert.sign(@ca_key, OpenSSL::Digest.new("SHA256"))
|
688
688
|
|
689
689
|
@info = { "validity" => 8, "issuer" => @ca_cert }
|
690
690
|
|
@@ -765,7 +765,7 @@ describe Chef::Mixin::OpenSSLHelper do
|
|
765
765
|
@ca_cert.add_extension(ef.create_extension("keyUsage", "keyCertSign, cRLSign", true))
|
766
766
|
@ca_cert.add_extension(ef.create_extension("subjectKeyIdentifier", "hash", false))
|
767
767
|
@ca_cert.add_extension(ef.create_extension("authorityKeyIdentifier", "keyid:always", false))
|
768
|
-
@ca_cert.sign(@ca_key, OpenSSL::Digest
|
768
|
+
@ca_cert.sign(@ca_key, OpenSSL::Digest.new("SHA256"))
|
769
769
|
|
770
770
|
@info = { "validity" => 8, "issuer" => @ca_cert }
|
771
771
|
|
@@ -382,7 +382,7 @@ describe Chef::Node::Attribute do
|
|
382
382
|
expect(@attributes["command"]["ps"]).to eq("ps -ef")
|
383
383
|
end
|
384
384
|
|
385
|
-
it "should return default data if it is not
|
385
|
+
it "should return default data if it is not overridden or in attribute data" do
|
386
386
|
expect(@attributes["music"]["mastodon"]).to eq("rocks")
|
387
387
|
end
|
388
388
|
|
@@ -57,7 +57,7 @@ describe Chef::Provider::Group::Groupadd do
|
|
57
57
|
end
|
58
58
|
|
59
59
|
it "should set the option for #{property} if the new resources #{property} is not null" do
|
60
|
-
allow(new_resource).to receive(property).and_return("
|
60
|
+
allow(new_resource).to receive(property).and_return("cactus")
|
61
61
|
expect(provider.set_options).to eql([ option, new_resource.send(property), new_resource.group_name])
|
62
62
|
end
|
63
63
|
end
|
@@ -118,13 +118,13 @@ describe Chef::Provider::Package::Portage, "load_current_resource" do
|
|
118
118
|
expect { @provider.candidate_version }.to raise_error(Chef::Exceptions::Package)
|
119
119
|
end
|
120
120
|
|
121
|
-
it "should find the candidate_version if a category is
|
121
|
+
it "should find the candidate_version if a category is specified and there are no duplicates" do
|
122
122
|
status = double(stdout: "dev-vcs/git-2.16.2", exitstatus: 0)
|
123
123
|
expect(@provider).to receive(:shell_out_compacted).and_return(status)
|
124
124
|
expect(@provider.candidate_version).to eq("2.16.2")
|
125
125
|
end
|
126
126
|
|
127
|
-
it "should find the candidate_version if a category is not
|
127
|
+
it "should find the candidate_version if a category is not specified and there are no duplicates" do
|
128
128
|
status = double(stdout: "dev-vcs/git-2.16.2", exitstatus: 0)
|
129
129
|
@provider = Chef::Provider::Package::Portage.new(@new_resource_without_category, @run_context)
|
130
130
|
expect(@provider).to receive(:shell_out_compacted).and_return(status)
|
@@ -131,7 +131,7 @@ describe Chef::Provider::Package::Powershell, :windows_only do
|
|
131
131
|
expect(provider.candidate_version).to eql(["2.12.0.0"])
|
132
132
|
end
|
133
133
|
|
134
|
-
it "should set the candidate_version to the latest version when not pinning and package name is space
|
134
|
+
it "should set the candidate_version to the latest version when not pinning and package name is space separated" do
|
135
135
|
allow(provider).to receive(:powershell_out).with("( Find-Package '7-Zip 16.02 (x64)' -Force -ForceBootstrap ).Version", { timeout: new_resource.timeout }).and_return(package_7zip_available)
|
136
136
|
new_resource.package_name(["7-Zip 16.02 (x64)"])
|
137
137
|
new_resource.version(nil)
|
@@ -30,7 +30,7 @@ describe Chef::Win32::Registry do
|
|
30
30
|
let(:sub_key) { "OpscodePrimes" }
|
31
31
|
let(:missing_key_path) { 'HKCU\Software' }
|
32
32
|
let(:registry) { Chef::Win32::Registry.new }
|
33
|
-
let(:hive_mock) { double("::Win32::Registry::
|
33
|
+
let(:hive_mock) { double("::Win32::Registry::HKEY_CURRENT_USER") }
|
34
34
|
let(:reg_mock) { double("reg") }
|
35
35
|
|
36
36
|
before(:all) do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 16.1.
|
4
|
+
version: 16.1.16
|
5
5
|
platform: universal-mingw32
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-config
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 16.1.
|
19
|
+
version: 16.1.16
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 16.1.
|
26
|
+
version: 16.1.16
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: chef-utils
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 16.1.
|
33
|
+
version: 16.1.16
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 16.1.
|
40
|
+
version: 16.1.16
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: train-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|