chef 13.6.4 → 13.7.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/acceptance/Gemfile +2 -2
- data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/top_cookbooks.rb +1 -6
- data/distro/powershell/chef/chef.psm1 +1 -5
- data/lib/chef/api_client.rb +5 -5
- data/lib/chef/api_client_v1.rb +6 -6
- data/lib/chef/application.rb +3 -2
- data/lib/chef/application/knife.rb +4 -0
- data/lib/chef/chef_class.rb +2 -2
- data/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/data_handler_base.rb +2 -4
- data/lib/chef/client.rb +3 -3
- data/lib/chef/cookbook/chefignore.rb +4 -0
- data/lib/chef/cookbook/cookbook_collection.rb +2 -2
- data/lib/chef/cookbook/metadata.rb +2 -2
- data/lib/chef/data_bag.rb +1 -1
- data/lib/chef/deprecated.rb +10 -0
- data/lib/chef/event_dispatch/base.rb +2 -2
- data/lib/chef/http.rb +10 -10
- data/lib/chef/knife.rb +16 -15
- data/lib/chef/knife/configure.rb +12 -36
- data/lib/chef/knife/cookbook_upload.rb +4 -4
- data/lib/chef/knife/core/bootstrap_context.rb +1 -1
- data/lib/chef/knife/core/status_presenter.rb +6 -2
- data/lib/chef/knife/core/ui.rb +1 -1
- data/lib/chef/knife/data_bag_secret_options.rb +1 -1
- data/lib/chef/knife/data_bag_show.rb +1 -1
- data/lib/chef/knife/edit.rb +1 -1
- data/lib/chef/knife/ssh.rb +47 -35
- data/lib/chef/knife/user_create.rb +2 -0
- data/lib/chef/knife/user_delete.rb +2 -0
- data/lib/chef/knife/user_edit.rb +2 -0
- data/lib/chef/knife/user_reregister.rb +2 -0
- data/lib/chef/knife/user_show.rb +2 -0
- data/lib/chef/mixin/powershell_out.rb +1 -1
- data/lib/chef/node/attribute.rb +46 -70
- data/lib/chef/node/attribute_collections.rb +5 -5
- data/lib/chef/node/common_api.rb +1 -1
- data/lib/chef/node/immutable_collections.rb +180 -23
- data/lib/chef/node/mixin/state_tracking.rb +6 -6
- data/lib/chef/node_map.rb +63 -45
- data/lib/chef/property.rb +8 -8
- data/lib/chef/provider.rb +9 -3
- data/lib/chef/provider/apt_preference.rb +1 -1
- data/lib/chef/provider/apt_repository.rb +1 -1
- data/lib/chef/provider/apt_update.rb +1 -1
- data/lib/chef/provider/file.rb +1 -1
- data/lib/chef/provider/group/dscl.rb +6 -2
- data/lib/chef/provider/ifconfig.rb +96 -34
- data/lib/chef/provider/launchd.rb +0 -1
- data/lib/chef/provider/log.rb +3 -13
- data/lib/chef/provider/package/dnf.rb +1 -1
- data/lib/chef/provider/package/smartos.rb +2 -2
- data/lib/chef/provider/reboot.rb +12 -0
- data/lib/chef/provider/remote_directory.rb +1 -1
- data/lib/chef/provider/remote_file/http.rb +3 -2
- data/lib/chef/provider/service/solaris.rb +6 -2
- data/lib/chef/provider/systemd_unit.rb +34 -33
- data/lib/chef/provider/user/dscl.rb +1 -1
- data/lib/chef/provider/windows_path.rb +6 -7
- data/lib/chef/provider/windows_task.rb +89 -33
- data/lib/chef/provider/yum_repository.rb +24 -9
- data/lib/chef/resource/apt_package.rb +1 -0
- data/lib/chef/resource/apt_preference.rb +4 -0
- data/lib/chef/resource/apt_repository.rb +4 -0
- data/lib/chef/resource/apt_update.rb +3 -0
- data/lib/chef/resource/bash.rb +4 -0
- data/lib/chef/resource/batch.rb +5 -0
- data/lib/chef/resource/bff_package.rb +4 -0
- data/lib/chef/resource/breakpoint.rb +6 -0
- data/lib/chef/resource/cab_package.rb +6 -6
- data/lib/chef/resource/chef_gem.rb +13 -0
- data/lib/chef/resource/chocolatey_package.rb +4 -6
- data/lib/chef/resource/cookbook_file.rb +13 -15
- data/lib/chef/resource/cron.rb +2 -0
- data/lib/chef/resource/csh.rb +4 -0
- data/lib/chef/resource/directory.rb +8 -26
- data/lib/chef/resource/dnf_package.rb +5 -0
- data/lib/chef/resource/dpkg_package.rb +2 -0
- data/lib/chef/resource/dsc_resource.rb +5 -0
- data/lib/chef/resource/dsc_script.rb +6 -0
- data/lib/chef/resource/env.rb +3 -0
- data/lib/chef/resource/erl_call.rb +5 -0
- data/lib/chef/resource/execute.rb +5 -1
- data/lib/chef/resource/file.rb +2 -1
- data/lib/chef/resource/file/verification.rb +10 -0
- data/lib/chef/resource/freebsd_package.rb +10 -2
- data/lib/chef/resource/gem_package.rb +2 -0
- data/lib/chef/resource/git.rb +2 -0
- data/lib/chef/resource/group.rb +1 -0
- data/lib/chef/resource/homebrew_package.rb +3 -0
- data/lib/chef/resource/http_request.rb +2 -0
- data/lib/chef/resource/ifconfig.rb +23 -150
- data/lib/chef/resource/ips_package.rb +1 -0
- data/lib/chef/resource/ksh.rb +6 -0
- data/lib/chef/resource/launchd.rb +5 -4
- data/lib/chef/resource/link.rb +10 -0
- data/lib/chef/resource/log.rb +19 -46
- data/lib/chef/resource/macports_package.rb +1 -0
- data/lib/chef/resource/mdadm.rb +4 -0
- data/lib/chef/resource/mount.rb +1 -0
- data/lib/chef/resource/msu_package.rb +7 -8
- data/lib/chef/resource/ohai.rb +2 -0
- data/lib/chef/resource/openbsd_package.rb +3 -0
- data/lib/chef/resource/osx_profile.rb +10 -40
- data/lib/chef/resource/package.rb +6 -0
- data/lib/chef/resource/pacman_package.rb +1 -0
- data/lib/chef/resource/paludis_package.rb +3 -0
- data/lib/chef/resource/perl.rb +4 -0
- data/lib/chef/resource/portage_package.rb +1 -0
- data/lib/chef/resource/powershell_package.rb +5 -0
- data/lib/chef/resource/powershell_script.rb +8 -0
- data/lib/chef/resource/python.rb +4 -0
- data/lib/chef/resource/reboot.rb +14 -20
- data/lib/chef/resource/registry_key.rb +1 -0
- data/lib/chef/resource/remote_directory.rb +3 -0
- data/lib/chef/resource/remote_file.rb +2 -0
- data/lib/chef/resource/resource_notification.rb +17 -0
- data/lib/chef/resource/route.rb +1 -0
- data/lib/chef/resource/rpm_package.rb +1 -0
- data/lib/chef/resource/ruby.rb +4 -0
- data/lib/chef/resource/ruby_block.rb +3 -0
- data/lib/chef/resource/script.rb +4 -0
- data/lib/chef/resource/service.rb +1 -0
- data/lib/chef/resource/smartos_package.rb +1 -0
- data/lib/chef/resource/solaris_package.rb +1 -0
- data/lib/chef/resource/subversion.rb +1 -0
- data/lib/chef/resource/systemd_unit.rb +6 -0
- data/lib/chef/resource/template.rb +9 -0
- data/lib/chef/resource/user.rb +1 -0
- data/lib/chef/resource/windows_package.rb +2 -0
- data/lib/chef/resource/windows_path.rb +5 -10
- data/lib/chef/resource/windows_service.rb +3 -0
- data/lib/chef/resource/windows_task.rb +66 -87
- data/lib/chef/resource/yum_repository.rb +26 -22
- data/lib/chef/resource/zypper_package.rb +2 -0
- data/lib/chef/resource/zypper_repository.rb +6 -1
- data/lib/chef/run_context.rb +8 -2
- data/lib/chef/server_api.rb +1 -0
- data/lib/chef/util/selinux.rb +5 -4
- data/lib/chef/version.rb +1 -1
- data/lib/chef/version/platform.rb +18 -0
- data/lib/chef/version_constraint/platform.rb +2 -0
- data/spec/data/client.d_00/02-strings.rb +2 -0
- data/spec/functional/assets/chefinittest +6 -4
- data/spec/functional/knife/ssh_spec.rb +54 -7
- data/spec/functional/resource/bff_spec.rb +3 -3
- data/spec/functional/resource/ifconfig_spec.rb +1 -1
- data/spec/functional/resource/mount_spec.rb +7 -3
- data/spec/functional/resource/user/useradd_spec.rb +4 -4
- data/spec/functional/resource/windows_task_spec.rb +6 -6
- data/spec/functional/win32/security_spec.rb +7 -33
- data/spec/integration/knife/data_bag_show_spec.rb +1 -1
- data/spec/integration/recipes/noop_resource_spec.rb +1 -1
- data/spec/integration/recipes/recipe_dsl_spec.rb +30 -30
- data/spec/integration/recipes/resource_action_spec.rb +2 -2
- data/spec/integration/recipes/resource_converge_if_changed_spec.rb +71 -15
- data/spec/spec_helper.rb +19 -0
- data/spec/support/shared/functional/execute_resource.rb +1 -1
- data/spec/support/shared/unit/application_dot_d.rb +2 -0
- data/spec/support/shared/unit/execute_resource.rb +8 -1
- data/spec/support/shared/unit/provider/file.rb +9 -1
- data/spec/unit/chef_fs/data_handler/data_bag_item_data_handler.rb +10 -7
- data/spec/unit/chef_fs/file_system/repository/directory_spec.rb +2 -2
- data/spec/unit/client_spec.rb +1 -1
- data/spec/unit/deprecated_spec.rb +4 -4
- data/spec/unit/http_spec.rb +9 -0
- data/spec/unit/knife/bootstrap_spec.rb +5 -0
- data/spec/unit/knife/configure_spec.rb +10 -60
- data/spec/unit/knife/data_bag_create_spec.rb +40 -2
- data/spec/unit/knife/data_bag_show_spec.rb +16 -2
- data/spec/unit/knife/ssh_spec.rb +85 -39
- data/spec/unit/knife_spec.rb +2 -0
- data/spec/unit/lwrp_spec.rb +5 -3
- data/spec/unit/mixin/powershell_type_coercions_spec.rb +7 -6
- data/spec/unit/node/attribute_spec.rb +55 -24
- data/spec/unit/node/immutable_collections_spec.rb +28 -14
- data/spec/unit/node/vivid_mash_spec.rb +27 -10
- data/spec/unit/node_map_spec.rb +34 -0
- data/spec/unit/property_spec.rb +13 -13
- data/spec/unit/provider/group/dscl_spec.rb +14 -5
- data/spec/unit/provider/ifconfig_spec.rb +10 -3
- data/spec/unit/provider/remote_file/http_spec.rb +23 -19
- data/spec/unit/provider/service/solaris_smf_service_spec.rb +6 -5
- data/spec/unit/provider/user/dscl_spec.rb +26 -0
- data/spec/unit/provider/windows_task_spec.rb +148 -4
- data/spec/unit/provider_spec.rb +1 -1
- data/spec/unit/resource/apt_package_spec.rb +1 -1
- data/spec/unit/resource/bash_spec.rb +8 -10
- data/spec/unit/resource/batch_spec.rb +1 -1
- data/spec/unit/resource/cab_package_spec.rb +19 -1
- data/spec/unit/resource/chef_gem_spec.rb +3 -3
- data/spec/unit/resource/chocolatey_package_spec.rb +10 -10
- data/spec/unit/resource/conditional_spec.rb +2 -2
- data/spec/unit/resource/cookbook_file_spec.rb +24 -30
- data/spec/unit/resource/cron_spec.rb +79 -82
- data/spec/unit/resource/csh_spec.rb +8 -10
- data/spec/unit/resource/deploy_spec.rb +1 -1
- data/spec/unit/resource/directory_spec.rb +28 -31
- data/spec/unit/resource/dnf_package_spec.rb +9 -9
- data/spec/unit/resource/env_spec.rb +7 -7
- data/spec/unit/resource/erl_call_spec.rb +9 -9
- data/spec/unit/resource/execute_spec.rb +6 -6
- data/spec/unit/resource/file/verification_spec.rb +18 -4
- data/spec/unit/resource/file_spec.rb +53 -56
- data/spec/unit/resource/freebsd_package_spec.rb +7 -7
- data/spec/unit/resource/gem_package_spec.rb +1 -1
- data/spec/unit/resource/git_spec.rb +7 -9
- data/spec/unit/resource/group_spec.rb +60 -70
- data/spec/unit/resource/http_request_spec.rb +16 -19
- data/spec/unit/resource/ifconfig_spec.rb +3 -3
- data/spec/unit/resource/ips_package_spec.rb +3 -5
- data/spec/unit/resource/ksh_spec.rb +8 -10
- data/spec/unit/resource/launchd_spec.rb +17 -10
- data/spec/unit/resource/link_spec.rb +53 -53
- data/spec/unit/resource/log_spec.rb +24 -28
- data/spec/unit/resource/mdadm_spec.rb +42 -44
- data/spec/unit/resource/mount_spec.rb +97 -99
- data/spec/unit/resource/msu_package_spec.rb +14 -8
- data/spec/unit/resource/ohai_spec.rb +15 -17
- data/spec/unit/resource/openbsd_package_spec.rb +3 -3
- data/spec/unit/resource/osx_profile_spec.rb +7 -7
- data/spec/unit/resource/package_spec.rb +36 -40
- data/spec/unit/resource/perl_spec.rb +8 -11
- data/spec/unit/resource/portage_package_spec.rb +8 -10
- data/spec/unit/resource/powershell_package_spec.rb +9 -9
- data/spec/unit/resource/python_spec.rb +8 -11
- data/spec/unit/resource/reboot_spec.rb +50 -0
- data/spec/unit/resource/registry_key_spec.rb +84 -98
- data/spec/unit/resource/remote_directory_spec.rb +40 -42
- data/spec/unit/resource/remote_file_spec.rb +78 -80
- data/spec/unit/resource/route_spec.rb +42 -44
- data/spec/unit/resource/rpm_package_spec.rb +5 -7
- data/spec/unit/resource/ruby_block_spec.rb +14 -16
- data/spec/unit/resource/ruby_spec.rb +8 -12
- data/spec/unit/resource/scm_spec.rb +66 -69
- data/spec/unit/resource/script_spec.rb +1 -1
- data/spec/unit/resource/service_spec.rb +80 -83
- data/spec/unit/resource/smartos_package_spec.rb +5 -0
- data/spec/unit/resource/solaris_package_spec.rb +3 -5
- data/spec/unit/resource/subversion_spec.rb +18 -16
- data/spec/unit/resource/systemd_unit_spec.rb +50 -54
- data/spec/unit/resource/template_spec.rb +56 -61
- data/spec/unit/resource/user_spec.rb +47 -53
- data/spec/unit/resource/windows_package_spec.rb +1 -1
- data/spec/unit/resource/windows_path_spec.rb +11 -8
- data/spec/unit/resource/windows_task_spec.rb +129 -33
- data/spec/unit/resource/yum_package_spec.rb +1 -1
- data/spec/unit/resource/yum_repository_spec.rb +61 -8
- data/spec/unit/resource/zypper_repository_spec.rb +17 -18
- data/spec/unit/util/selinux_spec.rb +3 -6
- data/tasks/dependencies.rb +0 -5
- data/tasks/rspec.rb +1 -1
- metadata +6 -6
- data/acceptance/top-cookbooks/.kitchen.docker.yml +0 -13
- data/acceptance/top-cookbooks/.kitchen.git.yml +0 -11
@@ -78,7 +78,7 @@ describe Chef::Resource::YumPackage, "arch" do
|
|
78
78
|
@resource = Chef::Resource::YumPackage.new("foo")
|
79
79
|
end
|
80
80
|
|
81
|
-
it "
|
81
|
+
it "sets the arch variable to whatever is passed in" do
|
82
82
|
@resource.arch("i386")
|
83
83
|
expect(@resource.arch).to eql("i386")
|
84
84
|
end
|
@@ -24,25 +24,78 @@ describe Chef::Resource::YumRepository do
|
|
24
24
|
let(:run_context) { Chef::RunContext.new(node, {}, events) }
|
25
25
|
let(:resource) { Chef::Resource::YumRepository.new("multiverse", run_context) }
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
it "has a resource_name of :yum_repository" do
|
28
|
+
expect(resource.resource_name).to eq(:yum_repository)
|
29
|
+
end
|
30
|
+
|
31
|
+
it "the repositoryid property is the name_property" do
|
32
|
+
expect(resource.repositoryid).to eq("multiverse")
|
33
|
+
end
|
34
|
+
|
35
|
+
it "the timeout property expects numeric Strings" do
|
36
|
+
expect { resource.timeout "123" }.not_to raise_error(ArgumentError)
|
37
|
+
expect { resource.timeout "123foo" }.to raise_error(ArgumentError)
|
38
|
+
end
|
39
|
+
|
40
|
+
it "the priority property expects numeric Strings from '1' to '99'" do
|
41
|
+
expect { resource.priority "99" }.not_to raise_error(ArgumentError)
|
42
|
+
expect { resource.priority "1" }.not_to raise_error(ArgumentError)
|
43
|
+
expect { resource.priority "100" }.to raise_error(ArgumentError)
|
44
|
+
expect { resource.priority "0" }.to raise_error(ArgumentError)
|
45
|
+
end
|
46
|
+
|
47
|
+
it "the failovermethod property accepts 'priority' or 'roundrobin'" do
|
48
|
+
expect { resource.failovermethod "priority" }.not_to raise_error(ArgumentError)
|
49
|
+
expect { resource.failovermethod "roundrobin" }.not_to raise_error(ArgumentError)
|
50
|
+
expect { resource.failovermethod "bob" }.to raise_error(ArgumentError)
|
51
|
+
end
|
52
|
+
|
53
|
+
it "the http_caching property accepts 'packages', 'all', or 'none'" do
|
54
|
+
expect { resource.http_caching "packages" }.not_to raise_error(ArgumentError)
|
55
|
+
expect { resource.http_caching "all" }.not_to raise_error(ArgumentError)
|
56
|
+
expect { resource.http_caching "none" }.not_to raise_error(ArgumentError)
|
57
|
+
expect { resource.http_caching "bob" }.to raise_error(ArgumentError)
|
58
|
+
end
|
59
|
+
|
60
|
+
it "the metadata_expire property accepts a time value or 'never'" do
|
61
|
+
expect { resource.metadata_expire "100" }.not_to raise_error(ArgumentError)
|
62
|
+
expect { resource.metadata_expire "100d" }.not_to raise_error(ArgumentError)
|
63
|
+
expect { resource.metadata_expire "100h" }.not_to raise_error(ArgumentError)
|
64
|
+
expect { resource.metadata_expire "100m" }.not_to raise_error(ArgumentError)
|
65
|
+
expect { resource.metadata_expire "never" }.not_to raise_error(ArgumentError)
|
66
|
+
expect { resource.metadata_expire "100s" }.to raise_error(ArgumentError)
|
67
|
+
end
|
32
68
|
|
33
|
-
|
69
|
+
it "the mirror_expire property accepts a time value" do
|
70
|
+
expect { resource.mirror_expire "100" }.not_to raise_error(ArgumentError)
|
71
|
+
expect { resource.mirror_expire "100d" }.not_to raise_error(ArgumentError)
|
72
|
+
expect { resource.mirror_expire "100h" }.not_to raise_error(ArgumentError)
|
73
|
+
expect { resource.mirror_expire "100m" }.not_to raise_error(ArgumentError)
|
74
|
+
expect { resource.mirror_expire "never" }.to raise_error(ArgumentError)
|
75
|
+
end
|
76
|
+
|
77
|
+
it "the mirrorlist_expire property accepts a time value" do
|
78
|
+
expect { resource.mirrorlist_expire "100" }.not_to raise_error(ArgumentError)
|
79
|
+
expect { resource.mirrorlist_expire "100d" }.not_to raise_error(ArgumentError)
|
80
|
+
expect { resource.mirrorlist_expire "100h" }.not_to raise_error(ArgumentError)
|
81
|
+
expect { resource.mirrorlist_expire "100m" }.not_to raise_error(ArgumentError)
|
82
|
+
expect { resource.mirrorlist_expire "never" }.to raise_error(ArgumentError)
|
83
|
+
end
|
84
|
+
|
85
|
+
context "on linux", :linux_only do
|
86
|
+
it "resolves to a Noop class when yum is not found" do
|
34
87
|
expect(Chef::Provider::YumRepository).to receive(:which).with("yum").and_return(false)
|
35
88
|
expect(resource.provider_for_action(:add)).to be_a(Chef::Provider::Noop)
|
36
89
|
end
|
37
90
|
|
38
|
-
it "
|
91
|
+
it "resolves to a YumRepository class when yum is found" do
|
39
92
|
expect(Chef::Provider::YumRepository).to receive(:which).with("yum").and_return(true)
|
40
93
|
expect(resource.provider_for_action(:add)).to be_a(Chef::Provider::YumRepository)
|
41
94
|
end
|
42
95
|
end
|
43
96
|
|
44
97
|
context "on windows", :windows_only do
|
45
|
-
it "
|
98
|
+
it "resolves to a NoOp provider" do
|
46
99
|
expect(resource.provider_for_action(:add)).to be_a(Chef::Provider::Noop)
|
47
100
|
end
|
48
101
|
end
|
@@ -24,28 +24,27 @@ describe Chef::Resource::ZypperRepository do
|
|
24
24
|
let(:run_context) { Chef::RunContext.new(node, {}, events) }
|
25
25
|
let(:resource) { Chef::Resource::ZypperRepository.new("repo-source", run_context) }
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
expect(resource).to be_a_kind_of(Chef::Resource::ZypperRepository)
|
31
|
-
end
|
27
|
+
it "has a resource_name of :zypper_repository" do
|
28
|
+
expect(resource.resource_name).to eq(:zypper_repository)
|
29
|
+
end
|
32
30
|
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
it "repo_name is the name_property" do
|
32
|
+
expect(resource.repo_name).to eql("repo-source")
|
33
|
+
end
|
36
34
|
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
it "has a default action of create" do
|
36
|
+
expect(resource.action).to eql([:create])
|
37
|
+
end
|
40
38
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
39
|
+
it "supports all valid actions" do
|
40
|
+
expect { resource.action :add }.not_to raise_error
|
41
|
+
expect { resource.action :remove }.not_to raise_error
|
42
|
+
expect { resource.action :create }.not_to raise_error
|
43
|
+
expect { resource.action :refresh }.not_to raise_error
|
44
|
+
expect { resource.action :delete }.to raise_error(ArgumentError)
|
45
|
+
end
|
48
46
|
|
47
|
+
context "on linux", :linux_only do
|
49
48
|
it "resolves to a Noop class when on non-linux OS" do
|
50
49
|
node.automatic[:os] = "windows"
|
51
50
|
node.automatic[:platform_family] = "windows"
|
@@ -124,24 +124,21 @@ describe Chef::Util::Selinux do
|
|
124
124
|
end
|
125
125
|
|
126
126
|
it "should call restorecon non-recursive by default" do
|
127
|
-
|
128
|
-
expect(@test_instance).to receive(:shell_out!).twice.with(restorecon_command)
|
127
|
+
expect(@test_instance).to receive(:shell_out_compact!).twice.with(@restorecon_enabled_path, [ "-R", path ])
|
129
128
|
@test_instance.restore_security_context(path)
|
130
129
|
expect(File).not_to receive(:executable?)
|
131
130
|
@test_instance.restore_security_context(path)
|
132
131
|
end
|
133
132
|
|
134
133
|
it "should call restorecon recursive when recursive is set" do
|
135
|
-
|
136
|
-
expect(@test_instance).to receive(:shell_out!).twice.with(restorecon_command)
|
134
|
+
expect(@test_instance).to receive(:shell_out_compact!).twice.with(@restorecon_enabled_path, [ "-R", "-r", path ])
|
137
135
|
@test_instance.restore_security_context(path, true)
|
138
136
|
expect(File).not_to receive(:executable?)
|
139
137
|
@test_instance.restore_security_context(path, true)
|
140
138
|
end
|
141
139
|
|
142
140
|
it "should call restorecon non-recursive when recursive is not set" do
|
143
|
-
|
144
|
-
expect(@test_instance).to receive(:shell_out!).twice.with(restorecon_command)
|
141
|
+
expect(@test_instance).to receive(:shell_out_compact!).twice.with(@restorecon_enabled_path, [ "-R", path ])
|
145
142
|
@test_instance.restore_security_context(path)
|
146
143
|
expect(File).not_to receive(:executable?)
|
147
144
|
@test_instance.restore_security_context(path)
|
data/tasks/dependencies.rb
CHANGED
@@ -39,8 +39,6 @@ namespace :dependencies do
|
|
39
39
|
dependencies:update_gemfile_lock
|
40
40
|
dependencies:update_omnibus_gemfile_lock
|
41
41
|
dependencies:update_acceptance_gemfile_lock
|
42
|
-
dependencies:update_kitchen_tests_gemfile_lock
|
43
|
-
dependencies:update_kitchen_tests_berksfile_lock
|
44
42
|
dependencies:update_audit_tests_berksfile_lock
|
45
43
|
}
|
46
44
|
|
@@ -84,9 +82,6 @@ namespace :dependencies do
|
|
84
82
|
bundle_update_locked_multiplatform_task :update_gemfile_lock, "."
|
85
83
|
bundle_update_locked_multiplatform_task :update_omnibus_gemfile_lock, "omnibus"
|
86
84
|
bundle_update_task :update_acceptance_gemfile_lock, "acceptance"
|
87
|
-
bundle_update_locked_multiplatform_task :update_kitchen_tests_gemfile_lock, "kitchen-tests"
|
88
|
-
|
89
|
-
berks_update_task :update_kitchen_tests_berksfile_lock, "kitchen-tests"
|
90
85
|
berks_update_task :update_audit_tests_berksfile_lock, "kitchen-tests/cookbooks/audit_test"
|
91
86
|
|
92
87
|
end
|
data/tasks/rspec.rb
CHANGED
@@ -25,7 +25,7 @@ CHEF_ROOT = File.join(File.dirname(__FILE__), "..")
|
|
25
25
|
begin
|
26
26
|
require "rspec/core/rake_task"
|
27
27
|
|
28
|
-
desc "Run specs for Chef's Components"
|
28
|
+
desc "Run specs for Chef's Components (chef-config)"
|
29
29
|
task :component_specs do
|
30
30
|
Dir.chdir("chef-config") do
|
31
31
|
Bundler.with_clean_env 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: 13.
|
4
|
+
version: 13.7.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-config
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 13.
|
19
|
+
version: 13.7.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: 13.
|
26
|
+
version: 13.7.16
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mixlib-cli
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -519,8 +519,6 @@ files:
|
|
519
519
|
- acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/verify.rb
|
520
520
|
- acceptance/top-cookbooks/.gitignore
|
521
521
|
- acceptance/top-cookbooks/.kitchen.chocolatey.yml
|
522
|
-
- acceptance/top-cookbooks/.kitchen.docker.yml
|
523
|
-
- acceptance/top-cookbooks/.kitchen.git.yml
|
524
522
|
- acceptance/top-cookbooks/.kitchen.iis.yml
|
525
523
|
- acceptance/top-cookbooks/.kitchen.learn-the-basics-rhel.yml
|
526
524
|
- acceptance/top-cookbooks/.kitchen.learn-the-basics-ubuntu.yml
|
@@ -1620,6 +1618,7 @@ files:
|
|
1620
1618
|
- spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-xi0l6h-0
|
1621
1619
|
- spec/data/client.d_00/00-foo.rb
|
1622
1620
|
- spec/data/client.d_00/01-bar.rb
|
1621
|
+
- spec/data/client.d_00/02-strings.rb
|
1623
1622
|
- spec/data/client.d_00/bar
|
1624
1623
|
- spec/data/client.d_01/foo/bar.rb
|
1625
1624
|
- spec/data/client.d_02/foo.rb/foo.txt
|
@@ -2539,6 +2538,7 @@ files:
|
|
2539
2538
|
- spec/unit/resource/powershell_package_spec.rb
|
2540
2539
|
- spec/unit/resource/powershell_script_spec.rb
|
2541
2540
|
- spec/unit/resource/python_spec.rb
|
2541
|
+
- spec/unit/resource/reboot_spec.rb
|
2542
2542
|
- spec/unit/resource/registry_key_spec.rb
|
2543
2543
|
- spec/unit/resource/remote_directory_spec.rb
|
2544
2544
|
- spec/unit/resource/remote_file_spec.rb
|
@@ -1,11 +0,0 @@
|
|
1
|
-
suites:
|
2
|
-
- name: git-default
|
3
|
-
# Ubuntu images need to run apt update
|
4
|
-
run_list: ["recipe[apt]","recipe[git]"]
|
5
|
-
includes: [ubuntu-14.04]
|
6
|
-
- name: git-source
|
7
|
-
run_list: ["recipe[git::source]"]
|
8
|
-
includes: [nonexistent]
|
9
|
-
- name: git-default-windows
|
10
|
-
run_list: ["recipe[git]"]
|
11
|
-
includes: [windows-2012r2]
|