puppet 7.7.0 → 7.8.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.

Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +2 -2
  3. data/Gemfile +2 -1
  4. data/Gemfile.lock +9 -9
  5. data/ext/osx/puppet.plist +2 -0
  6. data/lib/puppet/defaults.rb +3 -1
  7. data/lib/puppet/pops/types/p_sem_ver_type.rb +8 -2
  8. data/lib/puppet/pops/types/p_sensitive_type.rb +10 -0
  9. data/lib/puppet/provider/package/apt.rb +3 -3
  10. data/lib/puppet/provider/package/nim.rb +11 -6
  11. data/lib/puppet/provider/package/yum.rb +3 -3
  12. data/lib/puppet/provider/package/zypper.rb +3 -3
  13. data/lib/puppet/provider/service/freebsd.rb +1 -1
  14. data/lib/puppet/provider/service/systemd.rb +6 -1
  15. data/lib/puppet/provider/user/directoryservice.rb +24 -11
  16. data/lib/puppet/transaction/additional_resource_generator.rb +1 -1
  17. data/lib/puppet/type/service.rb +8 -9
  18. data/lib/puppet/type/user.rb +38 -20
  19. data/lib/puppet/version.rb +1 -1
  20. data/locales/puppet.pot +36 -40
  21. data/man/man5/puppet.conf.5 +5 -2
  22. data/man/man8/puppet-agent.8 +1 -1
  23. data/man/man8/puppet-apply.8 +1 -1
  24. data/man/man8/puppet-catalog.8 +1 -1
  25. data/man/man8/puppet-config.8 +1 -1
  26. data/man/man8/puppet-describe.8 +1 -1
  27. data/man/man8/puppet-device.8 +1 -1
  28. data/man/man8/puppet-doc.8 +1 -1
  29. data/man/man8/puppet-epp.8 +1 -1
  30. data/man/man8/puppet-facts.8 +1 -1
  31. data/man/man8/puppet-filebucket.8 +1 -1
  32. data/man/man8/puppet-generate.8 +1 -1
  33. data/man/man8/puppet-help.8 +1 -1
  34. data/man/man8/puppet-lookup.8 +1 -1
  35. data/man/man8/puppet-module.8 +1 -1
  36. data/man/man8/puppet-node.8 +1 -1
  37. data/man/man8/puppet-parser.8 +1 -1
  38. data/man/man8/puppet-plugin.8 +1 -1
  39. data/man/man8/puppet-report.8 +1 -1
  40. data/man/man8/puppet-resource.8 +1 -1
  41. data/man/man8/puppet-script.8 +1 -1
  42. data/man/man8/puppet-ssl.8 +1 -1
  43. data/man/man8/puppet.8 +2 -2
  44. data/spec/integration/application/resource_spec.rb +30 -0
  45. data/spec/unit/functions4_spec.rb +17 -8
  46. data/spec/unit/pops/types/p_sem_ver_type_spec.rb +18 -0
  47. data/spec/unit/pops/types/p_sensitive_type_spec.rb +18 -0
  48. data/spec/unit/provider/package/nim_spec.rb +42 -0
  49. data/spec/unit/provider/service/freebsd_spec.rb +1 -1
  50. data/spec/unit/provider/service/systemd_spec.rb +12 -0
  51. data/spec/unit/provider/user/directoryservice_spec.rb +67 -35
  52. data/spec/unit/type/service_spec.rb +49 -34
  53. data/spec/unit/type/user_spec.rb +45 -0
  54. metadata +4 -2
@@ -174,6 +174,51 @@ describe Puppet::Type.type(:user) do
174
174
  end
175
175
  end
176
176
 
177
+ describe "when managing the purge_ssh_keys property" do
178
+ context "with valid input" do
179
+ it "should support a :true value" do
180
+ expect { described_class.new(:name => 'foo', :purge_ssh_keys => :true) }.to_not raise_error
181
+ end
182
+
183
+ it "should support a :false value" do
184
+ expect { described_class.new(:name => 'foo', :purge_ssh_keys => :false) }.to_not raise_error
185
+ end
186
+
187
+ it "should support a String value" do
188
+ expect { described_class.new(:name => 'foo', :purge_ssh_keys => File.expand_path('home/foo/.ssh/authorized_keys')) }.to_not raise_error
189
+ end
190
+
191
+ it "should support an Array value" do
192
+ expect { described_class.new(:name => 'foo', :purge_ssh_keys => [File.expand_path('home/foo/.ssh/authorized_keys'),
193
+ File.expand_path('custom/authorized_keys')]) }.to_not raise_error
194
+ end
195
+ end
196
+
197
+ context "with faulty input" do
198
+ it "should raise error for relative path" do
199
+ expect { described_class.new(:name => 'foo', :purge_ssh_keys => 'home/foo/.ssh/authorized_keys') }.to raise_error(Puppet::ResourceError,
200
+ /Paths to keyfiles must be absolute/ )
201
+ end
202
+
203
+ it "should raise error for invalid type" do
204
+ expect { described_class.new(:name => 'foo', :purge_ssh_keys => :invalid) }.to raise_error(Puppet::ResourceError,
205
+ /purge_ssh_keys must be true, false, or an array of file names/ )
206
+ end
207
+
208
+ it "should raise error for array with relative path" do
209
+ expect { described_class.new(:name => 'foo', :purge_ssh_keys => ['home/foo/.ssh/authorized_keys',
210
+ File.expand_path('custom/authorized_keys')]) }.to raise_error(Puppet::ResourceError,
211
+ /Paths to keyfiles must be absolute/ )
212
+ end
213
+
214
+ it "should raise error for array with invalid type" do
215
+ expect { described_class.new(:name => 'foo', :purge_ssh_keys => [:invalid,
216
+ File.expand_path('custom/authorized_keys')]) }.to raise_error(Puppet::ResourceError,
217
+ /Each entry for purge_ssh_keys must be a string/ )
218
+ end
219
+ end
220
+ end
221
+
177
222
  describe "when managing the uid property" do
178
223
  it "should convert number-looking strings into actual numbers" do
179
224
  expect(described_class.new(:name => 'foo', :uid => '50')[:uid]).to eq(50)
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: 7.7.0
4
+ version: 7.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-25 00:00:00.000000000 Z
11
+ date: 2021-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter
@@ -1765,6 +1765,7 @@ files:
1765
1765
  - spec/integration/application/lookup_spec.rb
1766
1766
  - spec/integration/application/module_spec.rb
1767
1767
  - spec/integration/application/plugin_spec.rb
1768
+ - spec/integration/application/resource_spec.rb
1768
1769
  - spec/integration/configurer_spec.rb
1769
1770
  - spec/integration/data_binding_spec.rb
1770
1771
  - spec/integration/defaults_spec.rb
@@ -3003,6 +3004,7 @@ test_files:
3003
3004
  - spec/integration/application/lookup_spec.rb
3004
3005
  - spec/integration/application/module_spec.rb
3005
3006
  - spec/integration/application/plugin_spec.rb
3007
+ - spec/integration/application/resource_spec.rb
3006
3008
  - spec/integration/configurer_spec.rb
3007
3009
  - spec/integration/data_binding_spec.rb
3008
3010
  - spec/integration/defaults_spec.rb