chef 16.8.14 → 16.9.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -3
- data/README.md +1 -1
- data/chef.gemspec +10 -1
- data/lib/chef/compliance/default_attributes.rb +5 -1
- data/lib/chef/compliance/fetcher/automate.rb +2 -2
- data/lib/chef/compliance/fetcher/chef_server.rb +2 -2
- data/lib/chef/compliance/reporter/automate.rb +1 -2
- data/lib/chef/compliance/reporter/chef_server_automate.rb +2 -2
- data/lib/chef/compliance/runner.rb +7 -2
- data/lib/chef/http/ssl_policies.rb +27 -14
- data/lib/chef/knife/core/formatting_options.rb +49 -0
- data/lib/chef/knife/core/node_presenter.rb +0 -25
- data/lib/chef/knife/core/status_presenter.rb +1 -26
- data/lib/chef/knife/core/windows_bootstrap_context.rb +1 -1
- data/lib/chef/knife/node_show.rb +2 -1
- data/lib/chef/knife/search.rb +2 -1
- data/lib/chef/knife/status.rb +8 -11
- data/lib/chef/policy_builder/policyfile.rb +1 -1
- data/lib/chef/provider/package.rb +53 -19
- data/lib/chef/provider/package/dnf.rb +39 -12
- data/lib/chef/provider/package/dnf/dnf_helper.py +18 -5
- data/lib/chef/provider/package/dnf/python_helper.rb +6 -6
- data/lib/chef/provider/yum_repository.rb +2 -2
- data/lib/chef/resource/chef_gem.rb +2 -2
- data/lib/chef/resource/cron/cron_d.rb +1 -0
- data/lib/chef/resource/file.rb +1 -1
- data/lib/chef/resource/gem_package.rb +2 -2
- data/lib/chef/resource/homebrew_cask.rb +3 -3
- data/lib/chef/resource/http_request.rb +1 -1
- data/lib/chef/resource/locale.rb +1 -1
- data/lib/chef/resource/mdadm.rb +2 -2
- data/lib/chef/resource/osx_profile.rb +7 -7
- data/lib/chef/resource/remote_directory.rb +1 -1
- data/lib/chef/resource/ruby.rb +1 -5
- data/lib/chef/resource/ruby_block.rb +1 -1
- data/lib/chef/resource/user/windows_user.rb +5 -0
- data/lib/chef/resource/windows_certificate.rb +2 -12
- data/lib/chef/resource/yum_repository.rb +5 -0
- data/lib/chef/version.rb +1 -1
- data/spec/data/rubygems.org/latest_specs.4.8.gz +0 -0
- data/spec/data/rubygems.org/nonexistent_gem +0 -0
- data/spec/data/rubygems.org/sexp_processor +0 -0
- data/spec/data/rubygems.org/sexp_processor-4.15.1.gemspec.rz +0 -0
- data/spec/data/ssl/binary/chef-rspec-der.cert +0 -0
- data/spec/data/ssl/binary/chef-rspec-der.key +0 -0
- data/spec/functional/resource/dnf_package_spec.rb +319 -16
- data/spec/functional/resource/windows_certificate_spec.rb +204 -384
- data/spec/unit/compliance/runner_spec.rb +28 -0
- data/spec/unit/http/ssl_policies_spec.rb +106 -78
- data/spec/unit/knife/bootstrap_spec.rb +5 -17
- data/spec/unit/knife/core/status_presenter_spec.rb +54 -0
- data/spec/unit/mixin/openssl_helper_spec.rb +0 -7
- data/spec/unit/provider/package/rubygems_spec.rb +39 -7
- data/spec/unit/resource/user/windows_user_spec.rb +36 -0
- metadata +24 -12
- data/spec/data/trusted_certs_empty/.gitkeep +0 -0
- data/spec/data/trusted_certs_empty/README.md +0 -1
- data/spec/scripts/ssl-serve.rb +0 -47
@@ -0,0 +1,36 @@
|
|
1
|
+
#
|
2
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
3
|
+
# License:: Apache License, Version 2.0
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
#
|
17
|
+
|
18
|
+
require "spec_helper"
|
19
|
+
|
20
|
+
describe Chef::Resource::User::WindowsUser, "#uid" do
|
21
|
+
let(:resource) { Chef::Resource::User::WindowsUser.new("notarealuser") }
|
22
|
+
|
23
|
+
it "allows a string" do
|
24
|
+
resource.uid "100"
|
25
|
+
expect(resource.uid).to eql(100)
|
26
|
+
end
|
27
|
+
|
28
|
+
it "allows an integer" do
|
29
|
+
resource.uid 100
|
30
|
+
expect(resource.uid).to eql(100)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "does not allow a hash" do
|
34
|
+
expect { resource.uid({ woot: "i found it" }) }.to raise_error(ArgumentError)
|
35
|
+
end
|
36
|
+
end
|
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.
|
4
|
+
version: 16.9.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: 2021-01-05 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.
|
19
|
+
version: 16.9.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.
|
26
|
+
version: 16.9.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.
|
33
|
+
version: 16.9.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.
|
40
|
+
version: 16.9.16
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: train-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -328,14 +328,14 @@ dependencies:
|
|
328
328
|
requirements:
|
329
329
|
- - '='
|
330
330
|
- !ruby/object:Gem::Version
|
331
|
-
version: 1.1.0.
|
331
|
+
version: 1.1.0.rc2
|
332
332
|
type: :runtime
|
333
333
|
prerelease: false
|
334
334
|
version_requirements: !ruby/object:Gem::Requirement
|
335
335
|
requirements:
|
336
336
|
- - '='
|
337
337
|
- !ruby/object:Gem::Version
|
338
|
-
version: 1.1.0.
|
338
|
+
version: 1.1.0.rc2
|
339
339
|
- !ruby/object:Gem::Dependency
|
340
340
|
name: highline
|
341
341
|
requirement: !ruby/object:Gem::Requirement
|
@@ -906,6 +906,7 @@ files:
|
|
906
906
|
- lib/chef/knife/cookbook_upload.rb
|
907
907
|
- lib/chef/knife/core/bootstrap_context.rb
|
908
908
|
- lib/chef/knife/core/cookbook_scm_repo.rb
|
909
|
+
- lib/chef/knife/core/formatting_options.rb
|
909
910
|
- lib/chef/knife/core/gem_glob_loader.rb
|
910
911
|
- lib/chef/knife/core/generic_presenter.rb
|
911
912
|
- lib/chef/knife/core/hashed_command_loader.rb
|
@@ -1774,6 +1775,10 @@ files:
|
|
1774
1775
|
- spec/data/root_alias_cookbooks/simple/attributes.rb
|
1775
1776
|
- spec/data/root_alias_cookbooks/simple/metadata.rb
|
1776
1777
|
- spec/data/root_alias_cookbooks/simple/recipe.rb
|
1778
|
+
- spec/data/rubygems.org/latest_specs.4.8.gz
|
1779
|
+
- spec/data/rubygems.org/nonexistent_gem
|
1780
|
+
- spec/data/rubygems.org/sexp_processor
|
1781
|
+
- spec/data/rubygems.org/sexp_processor-4.15.1.gemspec.rz
|
1777
1782
|
- spec/data/run_context/cookbooks/circular-dep1/attributes/default.rb
|
1778
1783
|
- spec/data/run_context/cookbooks/circular-dep1/definitions/circular_dep1_res.rb
|
1779
1784
|
- spec/data/run_context/cookbooks/circular-dep1/libraries/lib.rb
|
@@ -1855,6 +1860,8 @@ files:
|
|
1855
1860
|
- spec/data/snap_package/get_conf_success.json
|
1856
1861
|
- spec/data/snap_package/result_failure.json
|
1857
1862
|
- spec/data/ssl/5e707473.0
|
1863
|
+
- spec/data/ssl/binary/chef-rspec-der.cert
|
1864
|
+
- spec/data/ssl/binary/chef-rspec-der.key
|
1858
1865
|
- spec/data/ssl/chef-rspec.cert
|
1859
1866
|
- spec/data/ssl/chef-rspec.key
|
1860
1867
|
- spec/data/ssl/key.pem
|
@@ -1874,8 +1881,6 @@ files:
|
|
1874
1881
|
- spec/data/trusted_certs/intermediate.pem
|
1875
1882
|
- spec/data/trusted_certs/opscode.pem
|
1876
1883
|
- spec/data/trusted_certs/root.pem
|
1877
|
-
- spec/data/trusted_certs_empty/.gitkeep
|
1878
|
-
- spec/data/trusted_certs_empty/README.md
|
1879
1884
|
- spec/data/windows_certificates/base64_test.cer
|
1880
1885
|
- spec/data/windows_certificates/othertest.cer
|
1881
1886
|
- spec/data/windows_certificates/test.cer
|
@@ -2100,7 +2105,6 @@ files:
|
|
2100
2105
|
- spec/integration/recipes/use_partial_spec.rb
|
2101
2106
|
- spec/integration/solo/solo_spec.rb
|
2102
2107
|
- spec/rcov.opts
|
2103
|
-
- spec/scripts/ssl-serve.rb
|
2104
2108
|
- spec/spec_helper.rb
|
2105
2109
|
- spec/stress/win32/file_spec.rb
|
2106
2110
|
- spec/stress/win32/memory_spec.rb
|
@@ -2293,6 +2297,7 @@ files:
|
|
2293
2297
|
- spec/unit/knife/core/hashed_command_loader_spec.rb
|
2294
2298
|
- spec/unit/knife/core/node_editor_spec.rb
|
2295
2299
|
- spec/unit/knife/core/object_loader_spec.rb
|
2300
|
+
- spec/unit/knife/core/status_presenter_spec.rb
|
2296
2301
|
- spec/unit/knife/core/subcommand_loader_spec.rb
|
2297
2302
|
- spec/unit/knife/core/ui_spec.rb
|
2298
2303
|
- spec/unit/knife/core/windows_bootstrap_context_spec.rb
|
@@ -2652,6 +2657,7 @@ files:
|
|
2652
2657
|
- spec/unit/resource/systemd_unit_spec.rb
|
2653
2658
|
- spec/unit/resource/template_spec.rb
|
2654
2659
|
- spec/unit/resource/timezone_spec.rb
|
2660
|
+
- spec/unit/resource/user/windows_user_spec.rb
|
2655
2661
|
- spec/unit/resource/user_spec.rb
|
2656
2662
|
- spec/unit/resource/user_ulimit_spec.rb
|
2657
2663
|
- spec/unit/resource/windows_ad_join_spec.rb
|
@@ -2744,7 +2750,13 @@ files:
|
|
2744
2750
|
homepage: https://www.chef.io
|
2745
2751
|
licenses:
|
2746
2752
|
- Apache-2.0
|
2747
|
-
metadata:
|
2753
|
+
metadata:
|
2754
|
+
bug_tracker_uri: https://github.com/chef/chef/issues
|
2755
|
+
changelog_uri: https://github.com/chef/chef/blob/master/CHANGELOG.md
|
2756
|
+
documentation_uri: https://docs.chef.io/
|
2757
|
+
homepage_uri: https://www.chef.io
|
2758
|
+
mailing_list_uri: https://discourse.chef.io/
|
2759
|
+
source_code_uri: https://github.com/chef/chef/
|
2748
2760
|
post_install_message:
|
2749
2761
|
rdoc_options: []
|
2750
2762
|
require_paths:
|
File without changes
|
@@ -1 +0,0 @@
|
|
1
|
-
A directory with no certs. Used for testing directories with no certs during bootstrap.
|
data/spec/scripts/ssl-serve.rb
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
# ssl-serve.rb
|
2
|
-
# USAGE: ruby ssl-serve.rb
|
3
|
-
#
|
4
|
-
# ssl-serve is a script that serves a local directory over SSL.
|
5
|
-
# You can use it to test various HTTP behaviors in chef, like chef-client's
|
6
|
-
# `-j` and `-c` options and remote_file with https connections.
|
7
|
-
#
|
8
|
-
require "pp"
|
9
|
-
require "openssl"
|
10
|
-
require "webrick"
|
11
|
-
require "webrick/https"
|
12
|
-
|
13
|
-
$ssl = true
|
14
|
-
|
15
|
-
CHEF_SPEC_DATA = File.expand_path("../data", __dir__)
|
16
|
-
cert_text = File.read(File.expand_path("ssl/chef-rspec.cert", CHEF_SPEC_DATA))
|
17
|
-
cert = OpenSSL::X509::Certificate.new(cert_text)
|
18
|
-
key_text = File.read(File.expand_path("ssl/chef-rspec.key", CHEF_SPEC_DATA))
|
19
|
-
key = OpenSSL::PKey::RSA.new(key_text)
|
20
|
-
|
21
|
-
server_opts = {}
|
22
|
-
if $ssl
|
23
|
-
server_opts.merge!( { SSLEnable: true,
|
24
|
-
SSLVerifyClient: OpenSSL::SSL::VERIFY_NONE,
|
25
|
-
SSLCertificate: cert,
|
26
|
-
SSLPrivateKey: key })
|
27
|
-
end
|
28
|
-
|
29
|
-
# 5 == debug, 3 == warning
|
30
|
-
LOGGER = WEBrick::Log.new(STDOUT, 5)
|
31
|
-
DEFAULT_OPTIONS = {
|
32
|
-
server: "webrick",
|
33
|
-
Port: 9000,
|
34
|
-
Host: "localhost",
|
35
|
-
environment: :none,
|
36
|
-
Logger: LOGGER,
|
37
|
-
DocumentRoot: File.expand_path("#{Dir.tmpdir}/chef-118-sampledata"),
|
38
|
-
#:AccessLog => [] # Remove this option to enable the access log when debugging.
|
39
|
-
}.freeze
|
40
|
-
|
41
|
-
webrick_opts = DEFAULT_OPTIONS.merge(server_opts)
|
42
|
-
pp webrick_opts: webrick_opts
|
43
|
-
|
44
|
-
server = WEBrick::HTTPServer.new(webrick_opts)
|
45
|
-
trap("INT") { server.shutdown }
|
46
|
-
|
47
|
-
server.start
|