puppet 4.3.1-x86-mingw32 → 4.3.2-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.
- checksums.yaml +4 -4
- data/ext/build_defaults.yaml +1 -1
- data/lib/hiera/scope.rb +1 -1
- data/lib/puppet/application/lookup.rb +41 -43
- data/lib/puppet/data_providers/lookup_adapter.rb +73 -26
- data/lib/puppet/functions/lookup.rb +126 -150
- data/lib/puppet/functions/match.rb +1 -0
- data/lib/puppet/indirector/hiera.rb +3 -1
- data/lib/puppet/indirector/indirection.rb +6 -2
- data/lib/puppet/indirector/json.rb +2 -2
- data/lib/puppet/module.rb +3 -2
- data/lib/puppet/node.rb +11 -2
- data/lib/puppet/parser/compiler.rb +1 -8
- data/lib/puppet/parser/functions/lookup.rb +128 -149
- data/lib/puppet/parser/functions/match.rb +1 -0
- data/lib/puppet/plugins/data_providers/data_provider.rb +3 -2
- data/lib/puppet/pops/adapters.rb +43 -0
- data/lib/puppet/pops/evaluator/access_operator.rb +3 -3
- data/lib/puppet/pops/evaluator/closure.rb +51 -51
- data/lib/puppet/pops/evaluator/collector_transformer.rb +16 -0
- data/lib/puppet/pops/evaluator/runtime3_support.rb +11 -2
- data/lib/puppet/pops/functions/function.rb +6 -2
- data/lib/puppet/pops/issues.rb +16 -0
- data/lib/puppet/pops/loader/puppet_function_instantiator.rb +3 -2
- data/lib/puppet/pops/lookup.rb +3 -0
- data/lib/puppet/pops/lookup/explainer.rb +73 -3
- data/lib/puppet/pops/lookup/invocation.rb +21 -19
- data/lib/puppet/pops/model/factory.rb +153 -155
- data/lib/puppet/pops/model/model.rb +9 -0
- data/lib/puppet/pops/model/model_label_provider.rb +1 -0
- data/lib/puppet/pops/parser/evaluating_parser.rb +3 -3
- data/lib/puppet/pops/parser/lexer2.rb +411 -393
- data/lib/puppet/pops/parser/slurp_support.rb +5 -1
- data/lib/puppet/pops/types/type_calculator.rb +2 -6
- data/lib/puppet/pops/types/types.rb +3 -9
- data/lib/puppet/pops/validation/checker4_0.rb +36 -12
- data/lib/puppet/provider/group/windows_adsi.rb +2 -2
- data/lib/puppet/provider/package/pip.rb +11 -1
- data/lib/puppet/provider/package/rpm.rb +0 -1
- data/lib/puppet/provider/package/yum.rb +1 -1
- data/lib/puppet/provider/service/debian.rb +5 -18
- data/lib/puppet/provider/service/init.rb +7 -0
- data/lib/puppet/provider/service/launchd.rb +6 -0
- data/lib/puppet/provider/service/systemd.rb +1 -1
- data/lib/puppet/provider/user/windows_adsi.rb +2 -2
- data/lib/puppet/provider/yumrepo/inifile.rb +6 -3
- data/lib/puppet/resource/type.rb +2 -1
- data/lib/puppet/transaction/additional_resource_generator.rb +17 -3
- data/lib/puppet/type/group.rb +6 -2
- data/lib/puppet/util/windows.rb +4 -0
- data/lib/puppet/util/windows/adsi.rb +61 -24
- data/lib/puppet/util/windows/principal.rb +181 -0
- data/lib/puppet/util/windows/registry.rb +21 -15
- data/lib/puppet/util/windows/sid.rb +42 -11
- data/lib/puppet/version.rb +1 -1
- data/spec/fixtures/unit/application/environments/production/data/common.yaml +4 -0
- data/spec/fixtures/unit/application/environments/production/manifests/site.pp +1 -0
- data/spec/fixtures/unit/application/environments/puppet_func_provider/environment.conf +1 -0
- data/spec/fixtures/unit/application/environments/puppet_func_provider/functions/data.pp +10 -0
- data/spec/fixtures/unit/application/environments/puppet_func_provider/manifests/site.pp +1 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_module_config/data/common.yaml +4 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_module_config/data/specific.yaml +4 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_module_config/hiera.yaml +7 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_modules/data/common.yaml +4 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_modules/data/specific.yaml +4 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_modules/environment.conf +2 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_modules/hiera.yaml +7 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_modules/manifests/site.pp +1 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/data/common.yaml +6 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/hiera.yaml +5 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/manifests/init.pp +2 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/metadata.json +9 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/data/common.yaml +4 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/hiera.yaml +5 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/manifests/init.pp +3 -0
- data/spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/metadata.json +9 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/functions/usee_puppet.pp +3 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/{usee → modules/usee}/lib/puppet/functions/usee/callee.rb +0 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/lib/puppet/functions/usee/usee_ruby.rb +6 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/manifests/init.pp +6 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee2/lib/puppet/functions/usee2/callee.rb +5 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/functions/puppet_calling_puppet.pp +5 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/functions/puppet_calling_puppet_init.pp +5 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/functions/puppet_calling_ruby.pp +5 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/{user → modules/user}/lib/puppet/functions/user/caller.rb +0 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/caller2.rb +5 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/ruby_calling_puppet.rb +5 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/ruby_calling_puppet_init.rb +5 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/ruby_calling_ruby.rb +5 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/manifests/init.pp +81 -0
- data/spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/{user → modules/user}/metadata.json +2 -1
- data/spec/integration/parser/collection_spec.rb +8 -0
- data/spec/integration/util/windows/principal_spec.rb +115 -0
- data/spec/{unit → integration}/util/windows/registry_spec.rb +91 -1
- data/spec/integration/util/windows/security_spec.rb +2 -2
- data/spec/unit/application/lookup_spec.rb +138 -28
- data/spec/unit/data_providers/hiera_data_provider_spec.rb +182 -5
- data/spec/unit/face/epp_face_spec.rb +2 -2
- data/spec/unit/functions/epp_spec.rb +6 -6
- data/spec/unit/functions/inline_epp_spec.rb +4 -4
- data/spec/unit/functions/lookup_spec.rb +30 -3
- data/spec/unit/functions4_spec.rb +1 -1
- data/spec/unit/hiera/scope_spec.rb +5 -2
- data/spec/unit/indirector/json_spec.rb +1 -1
- data/spec/unit/node_spec.rb +8 -0
- data/spec/unit/parser/compiler_spec.rb +0 -18
- data/spec/unit/pops/evaluator/access_ops_spec.rb +4 -4
- data/spec/unit/pops/evaluator/evaluating_parser_spec.rb +1 -1
- data/spec/unit/pops/loaders/loaders_spec.rb +84 -2
- data/spec/unit/pops/parser/lexer2_spec.rb +6 -0
- data/spec/unit/pops/parser/parser_rspec_helper.rb +5 -0
- data/spec/unit/pops/types/type_calculator_spec.rb +0 -17
- data/spec/unit/pops/validator/validator_spec.rb +87 -0
- data/spec/unit/provider/group/windows_adsi_spec.rb +8 -8
- data/spec/unit/provider/package/pip_spec.rb +41 -13
- data/spec/unit/provider/package/rpm_spec.rb +2 -25
- data/spec/unit/provider/package/yum_spec.rb +1 -1
- data/spec/unit/provider/service/debian_spec.rb +6 -24
- data/spec/unit/provider/service/init_spec.rb +11 -1
- data/spec/unit/provider/service/launchd_spec.rb +11 -0
- data/spec/unit/provider/service/systemd_spec.rb +18 -12
- data/spec/unit/provider/service/upstart_spec.rb +57 -0
- data/spec/unit/provider/user/windows_adsi_spec.rb +5 -5
- data/spec/unit/provider/yumrepo/inifile_spec.rb +16 -0
- data/spec/unit/resource_spec.rb +12 -2
- data/spec/unit/util/windows/adsi_spec.rb +44 -36
- data/spec/unit/util/windows/sid_spec.rb +47 -10
- metadata +77 -10
@@ -249,6 +249,22 @@ describe Puppet::Type.type(:yumrepo).provider(:inifile) do
|
|
249
249
|
expect(described_class.reposdir('/etc/yum.conf')).to include("/etc/yum/extra.repos.d")
|
250
250
|
end
|
251
251
|
|
252
|
+
it "includes the directory if the value is split by whitespace" do
|
253
|
+
Puppet::FileSystem.expects(:exist?).with("/etc/yum/extra.repos.d").returns(true)
|
254
|
+
Puppet::FileSystem.expects(:exist?).with("/etc/yum/misc.repos.d").returns(true)
|
255
|
+
|
256
|
+
described_class.expects(:find_conf_value).with('reposdir', '/etc/yum.conf').returns "/etc/yum/extra.repos.d /etc/yum/misc.repos.d"
|
257
|
+
expect(described_class.reposdir('/etc/yum.conf')).to include("/etc/yum/extra.repos.d", "/etc/yum/misc.repos.d")
|
258
|
+
end
|
259
|
+
|
260
|
+
it "includes the directory if the value is split by new lines" do
|
261
|
+
Puppet::FileSystem.expects(:exist?).with("/etc/yum/extra.repos.d").returns(true)
|
262
|
+
Puppet::FileSystem.expects(:exist?).with("/etc/yum/misc.repos.d").returns(true)
|
263
|
+
|
264
|
+
described_class.expects(:find_conf_value).with('reposdir', '/etc/yum.conf').returns "/etc/yum/extra.repos.d\n/etc/yum/misc.repos.d"
|
265
|
+
expect(described_class.reposdir('/etc/yum.conf')).to include("/etc/yum/extra.repos.d", "/etc/yum/misc.repos.d")
|
266
|
+
end
|
267
|
+
|
252
268
|
it "doesn't include the directory specified by the yum.conf 'reposdir' entry when the directory is absent" do
|
253
269
|
Puppet::FileSystem.expects(:exist?).with("/etc/yum/extra.repos.d").returns(false)
|
254
270
|
|
data/spec/unit/resource_spec.rb
CHANGED
@@ -360,9 +360,8 @@ describe Puppet::Resource do
|
|
360
360
|
Puppet::DataBinding.indirection.expects(:find).with('apache::port', any_parameters).raises(Puppet::DataBinding::LookupError, 'Forgettabotit')
|
361
361
|
expect {
|
362
362
|
resource.set_default_parameters(scope)
|
363
|
-
}.to raise_error(Puppet::Error, /
|
363
|
+
}.to raise_error(Puppet::Error, /Lookup of key 'apache::port' failed: Forgettabotit/)
|
364
364
|
end
|
365
|
-
|
366
365
|
end
|
367
366
|
|
368
367
|
context "when a value is provided" do
|
@@ -392,6 +391,17 @@ describe Puppet::Resource do
|
|
392
391
|
expect(resource.set_default_parameters(scope)).to eq([])
|
393
392
|
expect(resource[:port]).to eq('8080')
|
394
393
|
end
|
394
|
+
|
395
|
+
it "should use the value from the data_binding terminus when provided value is undef" do
|
396
|
+
Puppet::DataBinding.indirection.expects(:find).with('lookup_options', any_parameters).throws(:no_such_key)
|
397
|
+
Puppet::DataBinding.indirection.expects(:find).with('apache::port', any_parameters).returns('443')
|
398
|
+
|
399
|
+
rs = Puppet::Parser::Resource.new("class", "apache", :scope => scope,
|
400
|
+
:parameters => [Puppet::Parser::Resource::Param.new({ :name => 'port', :value => nil })])
|
401
|
+
|
402
|
+
rs.resource_type.set_resource_parameters(rs, scope)
|
403
|
+
expect(rs[:port]).to eq('443')
|
404
|
+
end
|
395
405
|
end
|
396
406
|
end
|
397
407
|
end
|
@@ -40,16 +40,16 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
40
40
|
end
|
41
41
|
|
42
42
|
describe ".sid_uri" do
|
43
|
-
it "should raise an error when the input is not a SID
|
43
|
+
it "should raise an error when the input is not a SID Principal" do
|
44
44
|
[Object.new, {}, 1, :symbol, '', nil].each do |input|
|
45
45
|
expect {
|
46
46
|
Puppet::Util::Windows::ADSI.sid_uri(input)
|
47
|
-
}.to raise_error(Puppet::Error, /Must use a valid SID
|
47
|
+
}.to raise_error(Puppet::Error, /Must use a valid SID::Principal/)
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
51
|
it "should return a SID uri for a well-known SID (SYSTEM)" do
|
52
|
-
sid =
|
52
|
+
sid = Puppet::Util::Windows::SID::Principal.lookup_account_name('SYSTEM')
|
53
53
|
expect(Puppet::Util::Windows::ADSI.sid_uri(sid)).to eq('WinNT://S-1-5-18')
|
54
54
|
end
|
55
55
|
end
|
@@ -60,12 +60,10 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
60
60
|
let(:domain_username) { "#{domain}\\#{username}"}
|
61
61
|
|
62
62
|
it "should generate the correct URI" do
|
63
|
-
Puppet::Util::Windows::ADSI.stubs(:sid_uri_safe).returns(nil)
|
64
63
|
expect(Puppet::Util::Windows::ADSI::User.uri(username)).to eq("WinNT://./#{username},user")
|
65
64
|
end
|
66
65
|
|
67
66
|
it "should generate the correct URI for a user with a domain" do
|
68
|
-
Puppet::Util::Windows::ADSI.stubs(:sid_uri_safe).returns(nil)
|
69
67
|
expect(Puppet::Util::Windows::ADSI::User.uri(username, domain)).to eq("WinNT://#{domain}/#{username},user")
|
70
68
|
end
|
71
69
|
|
@@ -96,25 +94,33 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
96
94
|
end
|
97
95
|
|
98
96
|
it "should be able to check the existence of a user" do
|
99
|
-
Puppet::Util::Windows::
|
97
|
+
Puppet::Util::Windows::SID.expects(:name_to_sid_object).with(username).returns nil
|
100
98
|
Puppet::Util::Windows::ADSI.expects(:connect).with("WinNT://./#{username},user").returns connection
|
99
|
+
connection.expects(:Class).returns('User')
|
101
100
|
expect(Puppet::Util::Windows::ADSI::User.exists?(username)).to be_truthy
|
102
101
|
end
|
103
102
|
|
104
103
|
it "should be able to check the existence of a domain user" do
|
105
|
-
Puppet::Util::Windows::
|
104
|
+
Puppet::Util::Windows::SID.expects(:name_to_sid_object).with("#{domain}\\#{username}").returns nil
|
106
105
|
Puppet::Util::Windows::ADSI.expects(:connect).with("WinNT://#{domain}/#{username},user").returns connection
|
106
|
+
connection.expects(:Class).returns('User')
|
107
107
|
expect(Puppet::Util::Windows::ADSI::User.exists?(domain_username)).to be_truthy
|
108
108
|
end
|
109
109
|
|
110
110
|
it "should be able to confirm the existence of a user with a well-known SID" do
|
111
|
-
|
112
111
|
system_user = Win32::Security::SID::LocalSystem
|
113
112
|
# ensure that the underlying OS is queried here
|
114
113
|
Puppet::Util::Windows::ADSI.unstub(:connect)
|
115
114
|
expect(Puppet::Util::Windows::ADSI::User.exists?(system_user)).to be_truthy
|
116
115
|
end
|
117
116
|
|
117
|
+
it "should return false with a well-known Group SID" do
|
118
|
+
group = Win32::Security::SID::BuiltinAdministrators
|
119
|
+
# ensure that the underlying OS is queried here
|
120
|
+
Puppet::Util::Windows::ADSI.unstub(:connect)
|
121
|
+
expect(Puppet::Util::Windows::ADSI::User.exists?(group)).to be_falsey
|
122
|
+
end
|
123
|
+
|
118
124
|
it "should return nil with an unknown SID" do
|
119
125
|
|
120
126
|
bogus_sid = 'S-1-2-3-4'
|
@@ -130,8 +136,6 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
130
136
|
end
|
131
137
|
|
132
138
|
it "should return an enumeration of IADsUser wrapped objects" do
|
133
|
-
Puppet::Util::Windows::ADSI.stubs(:sid_uri_safe).returns(nil)
|
134
|
-
|
135
139
|
name = 'Administrator'
|
136
140
|
wmi_users = [stub('WMI', :name => name)]
|
137
141
|
Puppet::Util::Windows::ADSI.expects(:execquery).with('select name from win32_useraccount where localaccount = "TRUE"').returns(wmi_users)
|
@@ -203,20 +207,20 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
203
207
|
|
204
208
|
describe "when given a set of groups to which to add the user" do
|
205
209
|
let(:existing_groups) { ['group2','group3'] }
|
206
|
-
let(:group_sids) { existing_groups.each_with_index.map{|n,i| stub(:Name => n, :objectSID =>
|
210
|
+
let(:group_sids) { existing_groups.each_with_index.map{|n,i| stub(:Name => n, :objectSID => stub(:sid => i))} }
|
207
211
|
|
208
212
|
let(:groups_to_set) { 'group1,group2' }
|
209
|
-
let(:desired_sids) { groups_to_set.split(',').each_with_index.map{|n,i| stub(:Name => n, :objectSID =>
|
213
|
+
let(:desired_sids) { groups_to_set.split(',').each_with_index.map{|n,i| stub(:Name => n, :objectSID => stub(:sid => i-1))} }
|
210
214
|
|
211
215
|
before(:each) do
|
212
|
-
user.expects(:group_sids).returns(group_sids.map {|s| s.objectSID})
|
216
|
+
user.expects(:group_sids).returns(group_sids.map {|s| s.objectSID })
|
213
217
|
end
|
214
218
|
|
215
219
|
describe "if membership is specified as inclusive" do
|
216
220
|
it "should add the user to those groups, and remove it from groups not in the list" do
|
217
|
-
Puppet::Util::Windows::ADSI::User.expects(:name_sid_hash).returns(Hash[ desired_sids.map { |s| [s.objectSID.
|
218
|
-
user.expects(:add_group_sids).with
|
219
|
-
user.expects(:remove_group_sids).with
|
221
|
+
Puppet::Util::Windows::ADSI::User.expects(:name_sid_hash).returns(Hash[ desired_sids.map { |s| [s.objectSID.sid, s.objectSID] }])
|
222
|
+
user.expects(:add_group_sids).with { |value| value.sid == -1 }
|
223
|
+
user.expects(:remove_group_sids).with { |value| value.sid == 1 }
|
220
224
|
|
221
225
|
user.set_groups(groups_to_set, false)
|
222
226
|
end
|
@@ -224,7 +228,7 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
224
228
|
it "should remove all users from a group if desired is empty" do
|
225
229
|
Puppet::Util::Windows::ADSI::User.expects(:name_sid_hash).returns({})
|
226
230
|
user.expects(:add_group_sids).never
|
227
|
-
user.expects(:remove_group_sids).with
|
231
|
+
user.expects(:remove_group_sids).with { |user1, user2| user1.sid == 0 && user2.sid == 1 }
|
228
232
|
|
229
233
|
user.set_groups('', false)
|
230
234
|
end
|
@@ -232,8 +236,8 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
232
236
|
|
233
237
|
describe "if membership is specified as minimum" do
|
234
238
|
it "should add the user to the specified groups without affecting its other memberships" do
|
235
|
-
Puppet::Util::Windows::ADSI::User.expects(:name_sid_hash).returns(Hash[ desired_sids.map { |s| [s.objectSID.
|
236
|
-
user.expects(:add_group_sids).with
|
239
|
+
Puppet::Util::Windows::ADSI::User.expects(:name_sid_hash).returns(Hash[ desired_sids.map { |s| [s.objectSID.sid, s.objectSID] }])
|
240
|
+
user.expects(:add_group_sids).with { |value| value.sid == -1 }
|
237
241
|
user.expects(:remove_group_sids).never
|
238
242
|
|
239
243
|
user.set_groups(groups_to_set, true)
|
@@ -270,7 +274,7 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
270
274
|
end
|
271
275
|
|
272
276
|
it "and raise when passed a non-SID object to add" do
|
273
|
-
expect{ group.add_member_sids(invalid)}.to raise_error(Puppet::Error, /Must use a valid SID
|
277
|
+
expect{ group.add_member_sids(invalid)}.to raise_error(Puppet::Error, /Must use a valid SID::Principal/)
|
274
278
|
end
|
275
279
|
|
276
280
|
it "to remove a member" do
|
@@ -280,7 +284,7 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
280
284
|
end
|
281
285
|
|
282
286
|
it "and raise when passed a non-SID object to remove" do
|
283
|
-
expect{ group.remove_member_sids(invalid)}.to raise_error(Puppet::Error, /Must use a valid SID
|
287
|
+
expect{ group.remove_member_sids(invalid)}.to raise_error(Puppet::Error, /Must use a valid SID::Principal/)
|
284
288
|
end
|
285
289
|
end
|
286
290
|
|
@@ -298,9 +302,9 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
298
302
|
it "should set the members of a group to only desired_members when inclusive" do
|
299
303
|
names = ['DOMAIN\user1', 'user2']
|
300
304
|
sids = [
|
301
|
-
stub(:account => 'user1', :domain => 'DOMAIN'),
|
302
|
-
stub(:account => 'user2', :domain => 'testcomputername'),
|
303
|
-
stub(:account => 'user3', :domain => 'DOMAIN2'),
|
305
|
+
stub(:account => 'user1', :domain => 'DOMAIN', :sid => 1),
|
306
|
+
stub(:account => 'user2', :domain => 'testcomputername', :sid => 2),
|
307
|
+
stub(:account => 'user3', :domain => 'DOMAIN2', :sid => 3),
|
304
308
|
]
|
305
309
|
|
306
310
|
# use stubbed objectSid on member to return stubbed SID
|
@@ -325,9 +329,9 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
325
329
|
it "should add the desired_members to an existing group when not inclusive" do
|
326
330
|
names = ['DOMAIN\user1', 'user2']
|
327
331
|
sids = [
|
328
|
-
stub(:account => 'user1', :domain => 'DOMAIN'),
|
329
|
-
stub(:account => 'user2', :domain => 'testcomputername'),
|
330
|
-
stub(:account => 'user3', :domain => 'DOMAIN2'),
|
332
|
+
stub(:account => 'user1', :domain => 'DOMAIN', :sid => 1),
|
333
|
+
stub(:account => 'user2', :domain => 'testcomputername', :sid => 2),
|
334
|
+
stub(:account => 'user3', :domain => 'DOMAIN2', :sid => 3),
|
331
335
|
]
|
332
336
|
|
333
337
|
# use stubbed objectSid on member to return stubbed SID
|
@@ -361,8 +365,8 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
361
365
|
it "should remove all members when desired_members is empty and inclusive" do
|
362
366
|
names = ['DOMAIN\user1', 'user2']
|
363
367
|
sids = [
|
364
|
-
stub(:account => 'user1', :domain => 'DOMAIN'),
|
365
|
-
stub(:account => 'user2', :domain => 'testcomputername')
|
368
|
+
stub(:account => 'user1', :domain => 'DOMAIN', :sid => 1 ),
|
369
|
+
stub(:account => 'user2', :domain => 'testcomputername', :sid => 2 ),
|
366
370
|
]
|
367
371
|
|
368
372
|
# use stubbed objectSid on member to return stubbed SID
|
@@ -384,8 +388,8 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
384
388
|
it "should do nothing when desired_members is empty and not inclusive" do
|
385
389
|
names = ['DOMAIN\user1', 'user2']
|
386
390
|
sids = [
|
387
|
-
stub(:account => 'user1', :domain => 'DOMAIN'),
|
388
|
-
stub(:account => 'user2', :domain => 'testcomputername')
|
391
|
+
stub(:account => 'user1', :domain => 'DOMAIN', :sid => 1 ),
|
392
|
+
stub(:account => 'user2', :domain => 'testcomputername', :sid => 2 ),
|
389
393
|
]
|
390
394
|
# use stubbed objectSid on member to return stubbed SID
|
391
395
|
Puppet::Util::Windows::SID.expects(:octet_string_to_sid_object).with([0]).returns(sids[0])
|
@@ -409,7 +413,6 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
409
413
|
end
|
410
414
|
|
411
415
|
it "should generate the correct URI" do
|
412
|
-
Puppet::Util::Windows::ADSI.stubs(:sid_uri_safe).returns(nil)
|
413
416
|
adsi_group.expects(:objectSID).returns([0])
|
414
417
|
Socket.expects(:gethostname).returns('testcomputername')
|
415
418
|
Puppet::Util::Windows::SID.expects(:octet_string_to_sid_object).with([0]).returns(stub(:account => groupname,:domain => 'testcomputername'))
|
@@ -418,7 +421,6 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
418
421
|
end
|
419
422
|
|
420
423
|
it "should generate the correct URI" do
|
421
|
-
Puppet::Util::Windows::ADSI.stubs(:sid_uri_safe).returns(nil)
|
422
424
|
expect(Puppet::Util::Windows::ADSI::Group.uri("people")).to eq("WinNT://./people,group")
|
423
425
|
end
|
424
426
|
|
@@ -435,8 +437,9 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
435
437
|
end
|
436
438
|
|
437
439
|
it "should be able to confirm the existence of a group" do
|
438
|
-
Puppet::Util::Windows::
|
440
|
+
Puppet::Util::Windows::SID.expects(:name_to_sid_object).with(groupname).returns nil
|
439
441
|
Puppet::Util::Windows::ADSI.expects(:connect).with("WinNT://./#{groupname},group").returns connection
|
442
|
+
connection.expects(:Class).returns('Group')
|
440
443
|
|
441
444
|
expect(Puppet::Util::Windows::ADSI::Group.exists?(groupname)).to be_truthy
|
442
445
|
end
|
@@ -449,6 +452,13 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
449
452
|
expect(Puppet::Util::Windows::ADSI::Group.exists?(service_group)).to be_truthy
|
450
453
|
end
|
451
454
|
|
455
|
+
it "will return true with a well-known User SID, as there is no way to resolve it with a WinNT:// style moniker" do
|
456
|
+
user = Win32::Security::SID::NtLocal
|
457
|
+
# ensure that the underlying OS is queried here
|
458
|
+
Puppet::Util::Windows::ADSI.unstub(:connect)
|
459
|
+
expect(Puppet::Util::Windows::ADSI::Group.exists?(user)).to be_truthy
|
460
|
+
end
|
461
|
+
|
452
462
|
it "should return nil with an unknown SID" do
|
453
463
|
|
454
464
|
bogus_sid = 'S-1-2-3-4'
|
@@ -464,8 +474,6 @@ describe Puppet::Util::Windows::ADSI, :if => Puppet.features.microsoft_windows?
|
|
464
474
|
end
|
465
475
|
|
466
476
|
it "should return an enumeration of IADsGroup wrapped objects" do
|
467
|
-
Puppet::Util::Windows::ADSI.stubs(:sid_uri_safe).returns(nil)
|
468
|
-
|
469
477
|
name = 'Administrators'
|
470
478
|
wmi_groups = [stub('WMI', :name => name)]
|
471
479
|
Puppet::Util::Windows::ADSI.expects(:execquery).with('select name from win32_group where localaccount = "TRUE"').returns(wmi_groups)
|
@@ -17,8 +17,10 @@ describe "Puppet::Util::Windows::SID", :if => Puppet.features.microsoft_windows?
|
|
17
17
|
bytes = [1, 1, 0, 0, 0, 0, 0, 5, 18, 0, 0, 0]
|
18
18
|
converted = subject.octet_string_to_sid_object(bytes)
|
19
19
|
|
20
|
-
expect(converted).to
|
21
|
-
expect(converted).to
|
20
|
+
expect(converted).to be_an_instance_of Puppet::Util::Windows::SID::Principal
|
21
|
+
expect(converted.sid_bytes).to eq(bytes)
|
22
|
+
expect(converted.sid).to eq(sid)
|
23
|
+
expect(converted.account).to eq('SYSTEM')
|
22
24
|
end
|
23
25
|
|
24
26
|
it "should raise an error for non-array input" do
|
@@ -33,11 +35,19 @@ describe "Puppet::Util::Windows::SID", :if => Puppet.features.microsoft_windows?
|
|
33
35
|
}.to raise_error(Puppet::Error, /Octet string must be an array of bytes/)
|
34
36
|
end
|
35
37
|
|
38
|
+
it "should raise an error for a valid byte array with no mapping to a user" do
|
39
|
+
expect {
|
40
|
+
# S-1-1-1 which is not a valid account
|
41
|
+
valid_octet_invalid_user =[1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0]
|
42
|
+
subject.octet_string_to_sid_object(valid_octet_invalid_user)
|
43
|
+
}.to raise_error(Puppet::Util::Windows::Error, /Failed to call LookupAccountSidW: No mapping between account names and security IDs was done./)
|
44
|
+
end
|
45
|
+
|
36
46
|
it "should raise an error for a malformed byte array" do
|
37
47
|
expect {
|
38
|
-
invalid_octet = [
|
48
|
+
invalid_octet = [2]
|
39
49
|
subject.octet_string_to_sid_object(invalid_octet)
|
40
|
-
}.to raise_error(
|
50
|
+
}.to raise_error(Puppet::Util::Windows::Error, /Failed to call LookupAccountSidW: The parameter is incorrect./)
|
41
51
|
end
|
42
52
|
end
|
43
53
|
|
@@ -51,12 +61,12 @@ describe "Puppet::Util::Windows::SID", :if => Puppet.features.microsoft_windows?
|
|
51
61
|
end
|
52
62
|
|
53
63
|
it "should return a SID for a passed user or group name" do
|
54
|
-
subject.expects(:name_to_sid_object).with('testers').returns 'S-1-5-32-547'
|
64
|
+
subject.expects(:name_to_sid_object).with('testers').returns stub(:sid => 'S-1-5-32-547')
|
55
65
|
expect(subject.name_to_sid('testers')).to eq('S-1-5-32-547')
|
56
66
|
end
|
57
67
|
|
58
68
|
it "should return a SID for a passed fully-qualified user or group name" do
|
59
|
-
subject.expects(:name_to_sid_object).with('MACHINE\testers').returns 'S-1-5-32-547'
|
69
|
+
subject.expects(:name_to_sid_object).with('MACHINE\testers').returns stub(:sid => 'S-1-5-32-547')
|
60
70
|
expect(subject.name_to_sid('MACHINE\testers')).to eq('S-1-5-32-547')
|
61
71
|
end
|
62
72
|
|
@@ -75,6 +85,33 @@ describe "Puppet::Util::Windows::SID", :if => Puppet.features.microsoft_windows?
|
|
75
85
|
it "should be the identity function for any sid" do
|
76
86
|
expect(subject.name_to_sid(sid)).to eq(sid)
|
77
87
|
end
|
88
|
+
|
89
|
+
describe "with non-US languages" do
|
90
|
+
|
91
|
+
UMLAUT = [195, 164].pack('c*').force_encoding(Encoding::UTF_8)
|
92
|
+
let(:username) { SecureRandom.uuid.to_s.gsub(/\-/, '')[0..13] + UMLAUT }
|
93
|
+
|
94
|
+
after(:each) {
|
95
|
+
Puppet::Util::Windows::ADSI::User.delete(username)
|
96
|
+
}
|
97
|
+
|
98
|
+
it "should properly resolve a username with an umlaut" do
|
99
|
+
# Ruby seems to use the local codepage when making COM calls
|
100
|
+
# if this fails, might want to use Windows API directly instead to ensure bytes
|
101
|
+
user = Puppet::Util::Windows::ADSI.create(username, 'user')
|
102
|
+
user.SetInfo()
|
103
|
+
|
104
|
+
# compare the new SID to the name_to_sid result
|
105
|
+
sid_bytes = user.objectSID.to_a
|
106
|
+
sid_string = ''
|
107
|
+
FFI::MemoryPointer.new(:byte, sid_bytes.length) do |sid_byte_ptr|
|
108
|
+
sid_byte_ptr.write_array_of_uchar(sid_bytes)
|
109
|
+
sid_string = Puppet::Util::Windows::SID.sid_ptr_to_string(sid_byte_ptr)
|
110
|
+
end
|
111
|
+
|
112
|
+
expect(subject.name_to_sid(username)).to eq(sid_string)
|
113
|
+
end
|
114
|
+
end
|
78
115
|
end
|
79
116
|
|
80
117
|
context "#name_to_sid_object" do
|
@@ -82,12 +119,12 @@ describe "Puppet::Util::Windows::SID", :if => Puppet.features.microsoft_windows?
|
|
82
119
|
expect(subject.name_to_sid_object(unknown_name)).to be_nil
|
83
120
|
end
|
84
121
|
|
85
|
-
it "should return a
|
86
|
-
expect(subject.name_to_sid_object(sid)).to be_an_instance_of(
|
122
|
+
it "should return a Puppet::Util::Windows::SID::Principal instance for any valid sid" do
|
123
|
+
expect(subject.name_to_sid_object(sid)).to be_an_instance_of(Puppet::Util::Windows::SID::Principal)
|
87
124
|
end
|
88
125
|
|
89
126
|
it "should accept unqualified account name" do
|
90
|
-
expect(subject.name_to_sid_object('SYSTEM').
|
127
|
+
expect(subject.name_to_sid_object('SYSTEM').sid).to eq(sid)
|
91
128
|
end
|
92
129
|
|
93
130
|
it "should be case-insensitive" do
|
@@ -99,7 +136,7 @@ describe "Puppet::Util::Windows::SID", :if => Puppet.features.microsoft_windows?
|
|
99
136
|
end
|
100
137
|
|
101
138
|
it "should accept domain qualified account names" do
|
102
|
-
expect(subject.name_to_sid_object('NT AUTHORITY\SYSTEM').
|
139
|
+
expect(subject.name_to_sid_object('NT AUTHORITY\SYSTEM').sid).to eq(sid)
|
103
140
|
end
|
104
141
|
end
|
105
142
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.3.
|
4
|
+
version: 4.3.2
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facter
|
@@ -1108,6 +1108,7 @@ files:
|
|
1108
1108
|
- lib/puppet/util/windows/com.rb
|
1109
1109
|
- lib/puppet/util/windows/error.rb
|
1110
1110
|
- lib/puppet/util/windows/file.rb
|
1111
|
+
- lib/puppet/util/windows/principal.rb
|
1111
1112
|
- lib/puppet/util/windows/process.rb
|
1112
1113
|
- lib/puppet/util/windows/registry.rb
|
1113
1114
|
- lib/puppet/util/windows/root_certs.rb
|
@@ -1581,6 +1582,10 @@ files:
|
|
1581
1582
|
- spec/fixtures/stdlib.tgz
|
1582
1583
|
- spec/fixtures/unit/application/environments/production/data/common.yaml
|
1583
1584
|
- spec/fixtures/unit/application/environments/production/environment.conf
|
1585
|
+
- spec/fixtures/unit/application/environments/production/manifests/site.pp
|
1586
|
+
- spec/fixtures/unit/application/environments/puppet_func_provider/environment.conf
|
1587
|
+
- spec/fixtures/unit/application/environments/puppet_func_provider/functions/data.pp
|
1588
|
+
- spec/fixtures/unit/application/environments/puppet_func_provider/manifests/site.pp
|
1584
1589
|
- spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_json/data/bad.json
|
1585
1590
|
- spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_json/environment.conf
|
1586
1591
|
- spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_json/hiera.yaml
|
@@ -1609,7 +1614,10 @@ files:
|
|
1609
1614
|
- spec/fixtures/unit/data_providers/environments/hiera_misc/modules/one/data/common.yaml
|
1610
1615
|
- spec/fixtures/unit/data_providers/environments/hiera_misc/modules/one/manifests/init.pp
|
1611
1616
|
- spec/fixtures/unit/data_providers/environments/hiera_misc/modules/one/metadata.json
|
1617
|
+
- spec/fixtures/unit/data_providers/environments/hiera_module_config/data/common.yaml
|
1618
|
+
- spec/fixtures/unit/data_providers/environments/hiera_module_config/data/specific.yaml
|
1612
1619
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/environment.conf
|
1620
|
+
- spec/fixtures/unit/data_providers/environments/hiera_module_config/hiera.yaml
|
1613
1621
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/manifests/site.pp
|
1614
1622
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/data1/first.json
|
1615
1623
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/data1/name.yaml
|
@@ -1619,6 +1627,19 @@ files:
|
|
1619
1627
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/hiera.yaml
|
1620
1628
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/manifests/init.pp
|
1621
1629
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/metadata.json
|
1630
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/data/common.yaml
|
1631
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/data/specific.yaml
|
1632
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/environment.conf
|
1633
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/hiera.yaml
|
1634
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/manifests/site.pp
|
1635
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/data/common.yaml
|
1636
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/hiera.yaml
|
1637
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/manifests/init.pp
|
1638
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/metadata.json
|
1639
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/data/common.yaml
|
1640
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/hiera.yaml
|
1641
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/manifests/init.pp
|
1642
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/metadata.json
|
1622
1643
|
- spec/fixtures/unit/data_providers/environments/production/environment.conf
|
1623
1644
|
- spec/fixtures/unit/data_providers/environments/production/lib/puppet/functions/environment/data.rb
|
1624
1645
|
- spec/fixtures/unit/data_providers/environments/production/modules/abc/lib/puppet/bindings/abc/default.rb
|
@@ -1714,9 +1735,21 @@ files:
|
|
1714
1735
|
- spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/good/lib/puppet/bindings/good/default.rb
|
1715
1736
|
- spec/fixtures/unit/pops/binder/config/binder_config/nolayer/binder_config.yaml
|
1716
1737
|
- spec/fixtures/unit/pops/binder/config/binder_config/ok/binder_config.yaml
|
1717
|
-
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/usee/
|
1718
|
-
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/
|
1719
|
-
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/
|
1738
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/functions/usee_puppet.pp
|
1739
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/lib/puppet/functions/usee/callee.rb
|
1740
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/lib/puppet/functions/usee/usee_ruby.rb
|
1741
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/manifests/init.pp
|
1742
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee2/lib/puppet/functions/usee2/callee.rb
|
1743
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/functions/puppet_calling_puppet.pp
|
1744
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/functions/puppet_calling_puppet_init.pp
|
1745
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/functions/puppet_calling_ruby.pp
|
1746
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/caller.rb
|
1747
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/caller2.rb
|
1748
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/ruby_calling_puppet.rb
|
1749
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/ruby_calling_puppet_init.rb
|
1750
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/ruby_calling_ruby.rb
|
1751
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/manifests/init.pp
|
1752
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/metadata.json
|
1720
1753
|
- spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/lib/puppet/parser/functions/callee.rb
|
1721
1754
|
- spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/lib/puppet/parser/functions/callee_ws.rb
|
1722
1755
|
- spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/metadata.json
|
@@ -1937,7 +1970,9 @@ files:
|
|
1937
1970
|
- spec/integration/util/execution_spec.rb
|
1938
1971
|
- spec/integration/util/rdoc/parser_spec.rb
|
1939
1972
|
- spec/integration/util/settings_spec.rb
|
1973
|
+
- spec/integration/util/windows/principal_spec.rb
|
1940
1974
|
- spec/integration/util/windows/process_spec.rb
|
1975
|
+
- spec/integration/util/windows/registry_spec.rb
|
1941
1976
|
- spec/integration/util/windows/security_spec.rb
|
1942
1977
|
- spec/integration/util/windows/user_spec.rb
|
1943
1978
|
- spec/integration/util_spec.rb
|
@@ -2628,7 +2663,6 @@ files:
|
|
2628
2663
|
- spec/unit/util/windows/access_control_list_spec.rb
|
2629
2664
|
- spec/unit/util/windows/adsi_spec.rb
|
2630
2665
|
- spec/unit/util/windows/api_types_spec.rb
|
2631
|
-
- spec/unit/util/windows/registry_spec.rb
|
2632
2666
|
- spec/unit/util/windows/root_certs_spec.rb
|
2633
2667
|
- spec/unit/util/windows/security_descriptor_spec.rb
|
2634
2668
|
- spec/unit/util/windows/sid_spec.rb
|
@@ -2713,6 +2747,10 @@ test_files:
|
|
2713
2747
|
- spec/fixtures/stdlib.tgz
|
2714
2748
|
- spec/fixtures/unit/application/environments/production/data/common.yaml
|
2715
2749
|
- spec/fixtures/unit/application/environments/production/environment.conf
|
2750
|
+
- spec/fixtures/unit/application/environments/production/manifests/site.pp
|
2751
|
+
- spec/fixtures/unit/application/environments/puppet_func_provider/environment.conf
|
2752
|
+
- spec/fixtures/unit/application/environments/puppet_func_provider/functions/data.pp
|
2753
|
+
- spec/fixtures/unit/application/environments/puppet_func_provider/manifests/site.pp
|
2716
2754
|
- spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_json/data/bad.json
|
2717
2755
|
- spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_json/environment.conf
|
2718
2756
|
- spec/fixtures/unit/data_providers/environments/hiera_bad_syntax_json/hiera.yaml
|
@@ -2741,7 +2779,10 @@ test_files:
|
|
2741
2779
|
- spec/fixtures/unit/data_providers/environments/hiera_misc/modules/one/data/common.yaml
|
2742
2780
|
- spec/fixtures/unit/data_providers/environments/hiera_misc/modules/one/manifests/init.pp
|
2743
2781
|
- spec/fixtures/unit/data_providers/environments/hiera_misc/modules/one/metadata.json
|
2782
|
+
- spec/fixtures/unit/data_providers/environments/hiera_module_config/data/common.yaml
|
2783
|
+
- spec/fixtures/unit/data_providers/environments/hiera_module_config/data/specific.yaml
|
2744
2784
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/environment.conf
|
2785
|
+
- spec/fixtures/unit/data_providers/environments/hiera_module_config/hiera.yaml
|
2745
2786
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/manifests/site.pp
|
2746
2787
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/data1/first.json
|
2747
2788
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/data1/name.yaml
|
@@ -2751,6 +2792,19 @@ test_files:
|
|
2751
2792
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/hiera.yaml
|
2752
2793
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/manifests/init.pp
|
2753
2794
|
- spec/fixtures/unit/data_providers/environments/hiera_module_config/modules/one/metadata.json
|
2795
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/data/common.yaml
|
2796
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/data/specific.yaml
|
2797
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/environment.conf
|
2798
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/hiera.yaml
|
2799
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/manifests/site.pp
|
2800
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/data/common.yaml
|
2801
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/hiera.yaml
|
2802
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/manifests/init.pp
|
2803
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/one/metadata.json
|
2804
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/data/common.yaml
|
2805
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/hiera.yaml
|
2806
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/manifests/init.pp
|
2807
|
+
- spec/fixtures/unit/data_providers/environments/hiera_modules/modules/two/metadata.json
|
2754
2808
|
- spec/fixtures/unit/data_providers/environments/production/environment.conf
|
2755
2809
|
- spec/fixtures/unit/data_providers/environments/production/lib/puppet/functions/environment/data.rb
|
2756
2810
|
- spec/fixtures/unit/data_providers/environments/production/modules/abc/lib/puppet/bindings/abc/default.rb
|
@@ -2846,9 +2900,21 @@ test_files:
|
|
2846
2900
|
- spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/good/lib/puppet/bindings/good/default.rb
|
2847
2901
|
- spec/fixtures/unit/pops/binder/config/binder_config/nolayer/binder_config.yaml
|
2848
2902
|
- spec/fixtures/unit/pops/binder/config/binder_config/ok/binder_config.yaml
|
2849
|
-
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/usee/
|
2850
|
-
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/
|
2851
|
-
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/
|
2903
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/functions/usee_puppet.pp
|
2904
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/lib/puppet/functions/usee/callee.rb
|
2905
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/lib/puppet/functions/usee/usee_ruby.rb
|
2906
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee/manifests/init.pp
|
2907
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/usee2/lib/puppet/functions/usee2/callee.rb
|
2908
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/functions/puppet_calling_puppet.pp
|
2909
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/functions/puppet_calling_puppet_init.pp
|
2910
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/functions/puppet_calling_ruby.pp
|
2911
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/caller.rb
|
2912
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/caller2.rb
|
2913
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/ruby_calling_puppet.rb
|
2914
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/ruby_calling_puppet_init.rb
|
2915
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/lib/puppet/functions/user/ruby_calling_ruby.rb
|
2916
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/manifests/init.pp
|
2917
|
+
- spec/fixtures/unit/pops/loaders/loaders/dependent_modules_with_metadata/modules/user/metadata.json
|
2852
2918
|
- spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/lib/puppet/parser/functions/callee.rb
|
2853
2919
|
- spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/lib/puppet/parser/functions/callee_ws.rb
|
2854
2920
|
- spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/metadata.json
|
@@ -3069,7 +3135,9 @@ test_files:
|
|
3069
3135
|
- spec/integration/util/execution_spec.rb
|
3070
3136
|
- spec/integration/util/rdoc/parser_spec.rb
|
3071
3137
|
- spec/integration/util/settings_spec.rb
|
3138
|
+
- spec/integration/util/windows/principal_spec.rb
|
3072
3139
|
- spec/integration/util/windows/process_spec.rb
|
3140
|
+
- spec/integration/util/windows/registry_spec.rb
|
3073
3141
|
- spec/integration/util/windows/security_spec.rb
|
3074
3142
|
- spec/integration/util/windows/user_spec.rb
|
3075
3143
|
- spec/integration/util_spec.rb
|
@@ -3760,7 +3828,6 @@ test_files:
|
|
3760
3828
|
- spec/unit/util/windows/access_control_list_spec.rb
|
3761
3829
|
- spec/unit/util/windows/adsi_spec.rb
|
3762
3830
|
- spec/unit/util/windows/api_types_spec.rb
|
3763
|
-
- spec/unit/util/windows/registry_spec.rb
|
3764
3831
|
- spec/unit/util/windows/root_certs_spec.rb
|
3765
3832
|
- spec/unit/util/windows/security_descriptor_spec.rb
|
3766
3833
|
- spec/unit/util/windows/sid_spec.rb
|