puppet 5.2.0-x86-mingw32 → 5.3.1-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- data/Gemfile +9 -28
- data/lib/puppet.rb +1 -0
- data/lib/puppet/defaults.rb +21 -5
- data/lib/puppet/indirector/certificate_revocation_list/rest.rb +12 -0
- data/lib/puppet/network/http/connection.rb +108 -15
- data/lib/puppet/parser/compiler.rb +1 -1
- data/lib/puppet/pops/loader/puppet_resource_type_impl_instantiator.rb +1 -1
- data/lib/puppet/pops/lookup/hiera_config.rb +1 -1
- data/lib/puppet/pops/parser/egrammar.ra +1 -1
- data/lib/puppet/pops/parser/eparser.rb +378 -378
- data/lib/puppet/pops/parser/heredoc_support.rb +1 -1
- data/lib/puppet/pops/patterns.rb +2 -1
- data/lib/puppet/pops/types/p_object_type.rb +2 -0
- data/lib/puppet/pops/types/puppet_object.rb +1 -1
- data/lib/puppet/pops/types/ruby_generator.rb +1 -1
- data/lib/puppet/pops/types/type_calculator.rb +1 -0
- data/lib/puppet/settings.rb +3 -1
- data/lib/puppet/settings/certificate_revocation_setting.rb +21 -0
- data/lib/puppet/ssl/certificate_authority.rb +1 -1
- data/lib/puppet/ssl/certificate_revocation_list.rb +1 -1
- data/lib/puppet/ssl/host.rb +29 -16
- data/lib/puppet/transaction/report.rb +9 -3
- data/lib/puppet/type/scheduled_task.rb +4 -5
- data/lib/puppet/vendor/pathspec/lib/pathspec.rb +1 -1
- data/lib/puppet/version.rb +1 -1
- data/locales/ja/puppet.po +63 -57
- data/locales/puppet.pot +46 -32
- data/spec/unit/functions/epp_spec.rb +7 -2
- data/spec/unit/functions4_spec.rb +3 -2
- data/spec/unit/indirector/certificate_revocation_list/rest_spec.rb +8 -0
- data/spec/unit/network/http/connection_spec.rb +88 -1
- data/spec/unit/pops/parser/lexer2_spec.rb +30 -0
- data/spec/unit/pops/parser/parse_basic_expressions_spec.rb +30 -0
- data/spec/unit/pops/types/p_object_type_spec.rb +10 -2
- data/spec/unit/pops/types/type_calculator_spec.rb +13 -0
- data/spec/unit/pops/validator/validator_spec.rb +10 -0
- data/spec/unit/settings/certificate_revocation_setting_spec.rb +37 -0
- data/spec/unit/ssl/host_spec.rb +22 -4
- data/spec/unit/transaction/report_spec.rb +5 -0
- metadata +5 -2
@@ -574,6 +574,16 @@ describe "validating 4x" do
|
|
574
574
|
end
|
575
575
|
end
|
576
576
|
|
577
|
+
context 'uses a var pattern that is performant' do
|
578
|
+
it 'such that illegal VAR_NAME is not too slow' do
|
579
|
+
t = Time.now.nsec
|
580
|
+
result = '$hg_oais::archivematica::requirements::automation_tools::USER' =~ Puppet::Pops::Patterns::VAR_NAME
|
581
|
+
t2 = Time.now.nsec
|
582
|
+
expect(result).to be(nil)
|
583
|
+
expect(t2-t).to be < 1000000 # one ms as a check for very slow operation, is in fact at ~< 10 microsecond
|
584
|
+
end
|
585
|
+
end
|
586
|
+
|
577
587
|
def parse(source)
|
578
588
|
Puppet::Pops::Parser::Parser.new.parse_string(source)
|
579
589
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
require 'puppet/settings'
|
4
|
+
require 'puppet/settings/certificate_revocation_setting'
|
5
|
+
|
6
|
+
describe Puppet::Settings::CertificateRevocationSetting do
|
7
|
+
subject { described_class.new(:settings => stub('settings'), :desc => "test") }
|
8
|
+
|
9
|
+
it "is of type :certificate_revocation" do
|
10
|
+
expect(subject.type).to eq :certificate_revocation
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "munging the value" do
|
14
|
+
['true', true, 'chain'].each do |setting|
|
15
|
+
it "munges #{setting.inspect} to :chain" do
|
16
|
+
expect(subject.munge(setting)).to eq :chain
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
it "munges 'leaf' to :leaf" do
|
21
|
+
expect(subject.munge("leaf")).to eq :leaf
|
22
|
+
end
|
23
|
+
|
24
|
+
['false', false, nil].each do |setting|
|
25
|
+
it "munges #{setting.inspect} to false" do
|
26
|
+
expect(subject.munge(setting)).to eq false
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
it "raises an error when given an unexpected object type" do
|
31
|
+
expect {
|
32
|
+
subject.munge(1)
|
33
|
+
}.to raise_error(Puppet::Settings::ValidationError, "Invalid certificate revocation value 1: must be one of 'true', 'chain', 'leaf', or 'false'")
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
data/spec/unit/ssl/host_spec.rb
CHANGED
@@ -714,9 +714,27 @@ describe Puppet::SSL::Host do
|
|
714
714
|
Puppet::SSL::CertificateRevocationList.indirection.stubs(:find).returns @crl
|
715
715
|
end
|
716
716
|
|
717
|
-
|
717
|
+
[true, 'chain'].each do |crl_setting|
|
718
|
+
describe "and 'certificate_revocation' is #{crl_setting}" do
|
719
|
+
before do
|
720
|
+
Puppet[:certificate_revocation] = crl_setting
|
721
|
+
end
|
722
|
+
|
723
|
+
it "should add the CRL" do
|
724
|
+
@store.expects(:add_crl).with "real_crl"
|
725
|
+
@host.ssl_store
|
726
|
+
end
|
727
|
+
|
728
|
+
it "should set the flags to OpenSSL::X509::V_FLAG_CRL_CHECK_ALL|OpenSSL::X509::V_FLAG_CRL_CHECK" do
|
729
|
+
@store.expects(:flags=).with(OpenSSL::X509::V_FLAG_CRL_CHECK_ALL|OpenSSL::X509::V_FLAG_CRL_CHECK)
|
730
|
+
@host.ssl_store
|
731
|
+
end
|
732
|
+
end
|
733
|
+
end
|
734
|
+
|
735
|
+
describe "and 'certificate_revocation' is leaf" do
|
718
736
|
before do
|
719
|
-
Puppet[:certificate_revocation] =
|
737
|
+
Puppet[:certificate_revocation] = 'leaf'
|
720
738
|
end
|
721
739
|
|
722
740
|
it "should add the CRL" do
|
@@ -724,8 +742,8 @@ describe Puppet::SSL::Host do
|
|
724
742
|
@host.ssl_store
|
725
743
|
end
|
726
744
|
|
727
|
-
it "should set the flags to OpenSSL::X509::
|
728
|
-
@store.expects(:flags=).with
|
745
|
+
it "should set the flags to OpenSSL::X509::V_FLAG_CRL_CHECK" do
|
746
|
+
@store.expects(:flags=).with(OpenSSL::X509::V_FLAG_CRL_CHECK)
|
729
747
|
@host.ssl_store
|
730
748
|
end
|
731
749
|
end
|
@@ -199,6 +199,11 @@ describe Puppet::Transaction::Report do
|
|
199
199
|
end
|
200
200
|
|
201
201
|
describe "when computing exit status" do
|
202
|
+
it "should produce -1 if no metrics are present" do
|
203
|
+
report = Puppet::Transaction::Report.new("apply")
|
204
|
+
expect(report.exit_status).to eq(-1)
|
205
|
+
end
|
206
|
+
|
202
207
|
it "should produce 2 if changes are present" do
|
203
208
|
report = Puppet::Transaction::Report.new
|
204
209
|
report.add_metric("changes", {"total" => 1})
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: x86-mingw32
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-09-
|
12
|
+
date: 2017-09-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: facter
|
@@ -797,6 +797,7 @@ files:
|
|
797
797
|
- lib/puppet/settings/file_or_directory_setting.rb
|
798
798
|
- lib/puppet/settings/duration_setting.rb
|
799
799
|
- lib/puppet/settings/symbolic_enum_setting.rb
|
800
|
+
- lib/puppet/settings/certificate_revocation_setting.rb
|
800
801
|
- lib/puppet/settings/environment_conf.rb
|
801
802
|
- lib/puppet/settings/server_list_setting.rb
|
802
803
|
- lib/puppet/settings/ttl_setting.rb
|
@@ -2356,6 +2357,7 @@ files:
|
|
2356
2357
|
- spec/unit/settings/environment_conf_spec.rb
|
2357
2358
|
- spec/unit/settings/ini_file_spec.rb
|
2358
2359
|
- spec/unit/settings/priority_setting_spec.rb
|
2360
|
+
- spec/unit/settings/certificate_revocation_setting_spec.rb
|
2359
2361
|
- spec/unit/settings/file_setting_spec.rb
|
2360
2362
|
- spec/unit/settings/array_setting_spec.rb
|
2361
2363
|
- spec/unit/settings/duration_setting_spec.rb
|
@@ -3629,6 +3631,7 @@ test_files:
|
|
3629
3631
|
- spec/unit/settings/environment_conf_spec.rb
|
3630
3632
|
- spec/unit/settings/ini_file_spec.rb
|
3631
3633
|
- spec/unit/settings/priority_setting_spec.rb
|
3634
|
+
- spec/unit/settings/certificate_revocation_setting_spec.rb
|
3632
3635
|
- spec/unit/settings/file_setting_spec.rb
|
3633
3636
|
- spec/unit/settings/array_setting_spec.rb
|
3634
3637
|
- spec/unit/settings/duration_setting_spec.rb
|