chef 15.8.23 → 15.9.17
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/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/lib/chef/win32/system.rb +0 -0
- 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 +8 -6
@@ -109,7 +109,7 @@ describe Chef::Resource::Execute do
|
|
109
109
|
shared_examples_for "a consumer of the Execute resource" do
|
110
110
|
context "when running on Windows" do
|
111
111
|
before do
|
112
|
-
allow(resource).to receive(:
|
112
|
+
allow(resource).to receive(:windows?).and_return(true)
|
113
113
|
end
|
114
114
|
|
115
115
|
context "when no user, domain, or password is specified" do
|
@@ -179,6 +179,30 @@ describe Chef::Resource::RhsmRegister do
|
|
179
179
|
end
|
180
180
|
end
|
181
181
|
|
182
|
+
describe "#ca_consumer_package_source" do
|
183
|
+
let(:satellite_host) { "sat-host" }
|
184
|
+
|
185
|
+
before do
|
186
|
+
resource.satellite_host = satellite_host
|
187
|
+
end
|
188
|
+
|
189
|
+
context "when https_for_ca_consumer is true" do
|
190
|
+
before { resource.https_for_ca_consumer true }
|
191
|
+
|
192
|
+
it "returns url with https" do
|
193
|
+
expect(provider.ca_consumer_package_source).to eq("https://#{satellite_host}/pub/katello-ca-consumer-latest.noarch.rpm")
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
context "when https_for_ca_consumer is false" do
|
198
|
+
before { resource.https_for_ca_consumer false }
|
199
|
+
|
200
|
+
it "returns url with http" do
|
201
|
+
expect(provider.ca_consumer_package_source).to eq("http://#{satellite_host}/pub/katello-ca-consumer-latest.noarch.rpm")
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
182
206
|
describe "#registered_with_rhsm?" do
|
183
207
|
let(:cmd) { double("cmd") }
|
184
208
|
|
@@ -38,9 +38,11 @@ describe Chef::Resource::WindowsShare do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
it "coerces path to a single path separator format" do
|
41
|
-
resource.path("C:/chef")
|
41
|
+
resource.path("C:/chef".freeze)
|
42
42
|
expect(resource.path).to eql("C:\\chef")
|
43
43
|
resource.path("C:\\chef")
|
44
44
|
expect(resource.path).to eql("C:\\chef")
|
45
|
+
resource.path("C:/chef".dup)
|
46
|
+
expect(resource.path).to eql("C:\\chef")
|
45
47
|
end
|
46
48
|
end
|
data/tasks/rspec.rb
CHANGED
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: 15.
|
4
|
+
version: 15.9.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-03 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: 15.
|
19
|
+
version: 15.9.17
|
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: 15.
|
26
|
+
version: 15.9.17
|
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: 15.
|
33
|
+
version: 15.9.17
|
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: 15.
|
40
|
+
version: 15.9.17
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: train-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -2440,6 +2440,8 @@ files:
|
|
2440
2440
|
- spec/unit/resource/cron_d_spec.rb
|
2441
2441
|
- spec/unit/resource/cron_spec.rb
|
2442
2442
|
- spec/unit/resource/csh_spec.rb
|
2443
|
+
- spec/unit/resource/data/InstallHistory_with_CLT.plist
|
2444
|
+
- spec/unit/resource/data/InstallHistory_without_CLT.plist
|
2443
2445
|
- spec/unit/resource/directory_spec.rb
|
2444
2446
|
- spec/unit/resource/dmg_package_spec.rb
|
2445
2447
|
- spec/unit/resource/dnf_package_spec.rb
|