puppet 7.4.1 → 7.5.0
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +19 -13
- data/lib/puppet/application/ssl.rb +11 -0
- data/lib/puppet/defaults.rb +8 -0
- data/lib/puppet/environments.rb +16 -1
- data/lib/puppet/ffi/windows/api_types.rb +1 -1
- data/lib/puppet/file_system/memory_file.rb +8 -1
- data/lib/puppet/file_system/windows.rb +2 -0
- data/lib/puppet/http/factory.rb +4 -0
- data/lib/puppet/network/http.rb +5 -2
- data/lib/puppet/network/http/api.rb +10 -6
- data/lib/puppet/network/http/api/master.rb +3 -2
- data/lib/puppet/network/http/api/master/v3.rb +2 -25
- data/lib/puppet/network/http/api/master/v3/environments.rb +2 -33
- data/lib/puppet/network/http/api/server.rb +10 -0
- data/lib/puppet/network/http/api/server/v3.rb +39 -0
- data/lib/puppet/network/http/api/server/v3/environments.rb +48 -0
- data/lib/puppet/pops/parser/lexer2.rb +0 -4
- data/lib/puppet/pops/validation/checker4_0.rb +0 -1
- data/lib/puppet/settings/environment_conf.rb +1 -0
- data/lib/puppet/util/monkey_patches.rb +7 -0
- data/lib/puppet/util/windows/adsi.rb +46 -0
- data/lib/puppet/util/windows/principal.rb +9 -2
- data/lib/puppet/util/windows/sid.rb +4 -2
- data/lib/puppet/version.rb +1 -1
- data/man/man5/puppet.conf.5 +10 -2
- data/man/man8/puppet-agent.8 +1 -1
- data/man/man8/puppet-apply.8 +1 -1
- data/man/man8/puppet-catalog.8 +1 -1
- data/man/man8/puppet-config.8 +1 -1
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +1 -1
- data/man/man8/puppet-doc.8 +1 -1
- data/man/man8/puppet-epp.8 +1 -1
- data/man/man8/puppet-facts.8 +1 -1
- data/man/man8/puppet-filebucket.8 +1 -1
- data/man/man8/puppet-generate.8 +1 -1
- data/man/man8/puppet-help.8 +1 -1
- data/man/man8/puppet-lookup.8 +1 -1
- data/man/man8/puppet-module.8 +1 -1
- data/man/man8/puppet-node.8 +1 -1
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-report.8 +1 -1
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-script.8 +1 -1
- data/man/man8/puppet-ssl.8 +5 -1
- data/man/man8/puppet.8 +2 -2
- data/spec/integration/application/plugin_spec.rb +1 -1
- data/spec/integration/http/client_spec.rb +12 -0
- data/spec/integration/indirector/direct_file_server_spec.rb +1 -3
- data/spec/integration/parser/collection_spec.rb +10 -0
- data/spec/integration/util/windows/adsi_spec.rb +18 -0
- data/spec/integration/util/windows/principal_spec.rb +21 -0
- data/spec/integration/util/windows/registry_spec.rb +6 -0
- data/spec/unit/application/facts_spec.rb +5 -5
- data/spec/unit/application/ssl_spec.rb +23 -0
- data/spec/unit/environments_spec.rb +164 -88
- data/spec/unit/file_system_spec.rb +9 -0
- data/spec/unit/http/factory_spec.rb +19 -0
- data/spec/unit/network/http/api/master_spec.rb +38 -0
- data/spec/unit/network/http/api/{master → server}/v3/environments_spec.rb +2 -2
- data/spec/unit/network/http/api/{master → server}/v3_spec.rb +19 -19
- data/spec/unit/network/http/api_spec.rb +11 -11
- data/spec/unit/pops/parser/lexer2_spec.rb +0 -4
- data/spec/unit/pops/validator/validator_spec.rb +20 -43
- data/spec/unit/util/windows/sid_spec.rb +6 -0
- metadata +11 -16
- data/spec/lib/matchers/include.rb +0 -27
- data/spec/lib/matchers/include_spec.rb +0 -32
- data/spec/unit/pops/parser/parse_application_spec.rb +0 -13
- data/spec/unit/pops/parser/parse_capabilities_spec.rb +0 -23
- data/spec/unit/pops/parser/parse_site_spec.rb +0 -43
@@ -1,27 +0,0 @@
|
|
1
|
-
module Matchers; module Include
|
2
|
-
extend RSpec::Matchers::DSL
|
3
|
-
|
4
|
-
matcher :include_in_any_order do |*matchers|
|
5
|
-
match do |enumerable|
|
6
|
-
@not_matched = []
|
7
|
-
expected_as_array.each do |matcher|
|
8
|
-
if enumerable.empty?
|
9
|
-
break
|
10
|
-
end
|
11
|
-
|
12
|
-
if found = enumerable.find { |elem| matcher.matches?(elem) }
|
13
|
-
enumerable = enumerable.reject { |elem| elem == found }
|
14
|
-
else
|
15
|
-
@not_matched << matcher
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
|
20
|
-
@not_matched.empty? && enumerable.empty?
|
21
|
-
end
|
22
|
-
|
23
|
-
failure_message do |enumerable|
|
24
|
-
"did not match #{@not_matched.collect(&:description).join(', ')} in #{enumerable.inspect}: <#{@not_matched.collect(&:failure_message).join('>, <')}>"
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end; end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'matchers/include'
|
3
|
-
|
4
|
-
describe "include matchers" do
|
5
|
-
include Matchers::Include
|
6
|
-
|
7
|
-
context :include_in_any_order do
|
8
|
-
it "matches an empty list" do
|
9
|
-
expect([]).to include_in_any_order()
|
10
|
-
end
|
11
|
-
|
12
|
-
it "matches a list with a single element" do
|
13
|
-
expect([1]).to include_in_any_order(eq(1))
|
14
|
-
end
|
15
|
-
|
16
|
-
it "does not match when an expected element is missing" do
|
17
|
-
expect([1]).to_not include_in_any_order(eq(2))
|
18
|
-
end
|
19
|
-
|
20
|
-
it "matches a list with 2 elements in a different order from the expectation" do
|
21
|
-
expect([1, 2]).to include_in_any_order(eq(2), eq(1))
|
22
|
-
end
|
23
|
-
|
24
|
-
it "does not match when there are more than just the expected elements" do
|
25
|
-
expect([1, 2]).to_not include_in_any_order(eq(1))
|
26
|
-
end
|
27
|
-
|
28
|
-
it "matches multiple, equal elements when there are multiple, equal exepectations" do
|
29
|
-
expect([1, 1]).to include_in_any_order(eq(1), eq(1))
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'puppet/pops'
|
3
|
-
require_relative 'parser_rspec_helper'
|
4
|
-
|
5
|
-
describe "egrammar parsing of 'application'" do
|
6
|
-
include ParserRspecHelper
|
7
|
-
|
8
|
-
it "raises a syntax error" do
|
9
|
-
expect {
|
10
|
-
parse("application foo { }")
|
11
|
-
}.to raise_error(Puppet::ParseErrorWithIssue, /Syntax error at 'application' \(line: 1, column: 1\)/)
|
12
|
-
end
|
13
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'puppet/pops'
|
3
|
-
require_relative 'parser_rspec_helper'
|
4
|
-
|
5
|
-
describe "egrammar parsing of capability mappings" do
|
6
|
-
include ParserRspecHelper
|
7
|
-
|
8
|
-
context "when parsing 'produces'" do
|
9
|
-
it "raises syntax error" do
|
10
|
-
expect {
|
11
|
-
parse("Foo produces Sql { name => value }")
|
12
|
-
}.to raise_error(Puppet::ParseErrorWithIssue, /Syntax error at 'produces' \(line: 1, column: 5\)/)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
context "when parsing 'consumes'" do
|
17
|
-
it "raises syntax error" do
|
18
|
-
expect {
|
19
|
-
parse("Foo consumes Sql { name => value }")
|
20
|
-
}.to raise_error(Puppet::ParseErrorWithIssue, /Syntax error at 'consumes' \(line: 1, column: 5\)/)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'puppet/pops'
|
3
|
-
require_relative 'parser_rspec_helper'
|
4
|
-
|
5
|
-
describe "egrammar parsing of site expression" do
|
6
|
-
include ParserRspecHelper
|
7
|
-
|
8
|
-
context "when parsing 'site'" do
|
9
|
-
it "raises a syntax error" do
|
10
|
-
expect {
|
11
|
-
parse("site { }")
|
12
|
-
}.to raise_error(Puppet::ParseErrorWithIssue, /Syntax error at 'site' \(line: 1, column: 1\)/)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
context 'When parsing collections containing application management specific keywords' do
|
17
|
-
%w(application site produces consumes).each do |keyword|
|
18
|
-
it "disallows the keyword '#{keyword}' in a list" do
|
19
|
-
expect {
|
20
|
-
parse("$a = [#{keyword}]")
|
21
|
-
}.to raise_error(Puppet::ParseErrorWithIssue, /Syntax error at '#{keyword}' \(line: 1, column: 7\)/)
|
22
|
-
end
|
23
|
-
|
24
|
-
it "disallows the keyword '#{keyword}' as a key in a hash" do
|
25
|
-
expect {
|
26
|
-
parse("$a = {#{keyword}=>'x'}")
|
27
|
-
}.to raise_error(Puppet::ParseErrorWithIssue, /Syntax error at '#{keyword}' \(line: 1, column: 7\)/)
|
28
|
-
end
|
29
|
-
|
30
|
-
it "disallows the keyword '#{keyword}' as a value in a hash" do
|
31
|
-
expect {
|
32
|
-
parse("$a = {'x'=>#{keyword}}")
|
33
|
-
}.to raise_error(Puppet::ParseErrorWithIssue, /Syntax error at '#{keyword}' \(line: 1, column: 12\)/)
|
34
|
-
end
|
35
|
-
|
36
|
-
it "disallows the keyword '#{keyword}' as an attribute name" do
|
37
|
-
expect {
|
38
|
-
parse("foo { 'x': #{keyword} => 'value' } ")
|
39
|
-
}.to raise_error(Puppet::ParseErrorWithIssue, /Syntax error at '#{keyword}' \(line: 1, column: 12\)/)
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|