puppet 6.17.0 → 6.18.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 (189) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +6 -5
  3. data/lib/puppet/application/apply.rb +18 -20
  4. data/lib/puppet/application/lookup.rb +16 -4
  5. data/lib/puppet/configurer/downloader.rb +31 -10
  6. data/lib/puppet/confine.rb +1 -1
  7. data/lib/puppet/confine/any.rb +1 -1
  8. data/lib/puppet/defaults.rb +21 -3
  9. data/lib/puppet/feature/base.rb +1 -1
  10. data/lib/puppet/file_serving/mount/locales.rb +1 -2
  11. data/lib/puppet/file_serving/mount/pluginfacts.rb +1 -2
  12. data/lib/puppet/file_serving/mount/plugins.rb +1 -2
  13. data/lib/puppet/file_system/file_impl.rb +3 -3
  14. data/lib/puppet/functions/lstrip.rb +4 -4
  15. data/lib/puppet/functions/reverse_each.rb +1 -1
  16. data/lib/puppet/functions/rstrip.rb +4 -4
  17. data/lib/puppet/functions/step.rb +1 -1
  18. data/lib/puppet/functions/strip.rb +4 -4
  19. data/lib/puppet/gettext/config.rb +5 -5
  20. data/lib/puppet/gettext/module_translations.rb +4 -4
  21. data/lib/puppet/indirector/exec.rb +1 -1
  22. data/lib/puppet/indirector/facts/facter.rb +3 -3
  23. data/lib/puppet/indirector/file_metadata/http.rb +1 -0
  24. data/lib/puppet/indirector/hiera.rb +4 -0
  25. data/lib/puppet/indirector/indirection.rb +1 -1
  26. data/lib/puppet/indirector/report/processor.rb +2 -2
  27. data/lib/puppet/module.rb +1 -2
  28. data/lib/puppet/network/format_support.rb +2 -2
  29. data/lib/puppet/network/http/route.rb +2 -2
  30. data/lib/puppet/node/environment.rb +12 -5
  31. data/lib/puppet/pal/pal_impl.rb +27 -3
  32. data/lib/puppet/parameter.rb +1 -1
  33. data/lib/puppet/parser/functions.rb +21 -17
  34. data/lib/puppet/parser/functions/create_resources.rb +11 -7
  35. data/lib/puppet/parser/type_loader.rb +2 -2
  36. data/lib/puppet/pops/adaptable.rb +7 -13
  37. data/lib/puppet/pops/adapters.rb +8 -4
  38. data/lib/puppet/pops/loader/runtime3_type_loader.rb +4 -2
  39. data/lib/puppet/pops/loaders.rb +18 -11
  40. data/lib/puppet/pops/lookup/context.rb +1 -1
  41. data/lib/puppet/pops/lookup/hiera_config.rb +14 -1
  42. data/lib/puppet/pops/types/iterable.rb +34 -8
  43. data/lib/puppet/pops/validation/checker4_0.rb +19 -15
  44. data/lib/puppet/provider/file/windows.rb +1 -1
  45. data/lib/puppet/provider/package/apt.rb +34 -0
  46. data/lib/puppet/provider/package/gem.rb +4 -2
  47. data/lib/puppet/provider/package/puppet_gem.rb +5 -0
  48. data/lib/puppet/provider/package/zypper.rb +3 -0
  49. data/lib/puppet/provider/user/aix.rb +1 -1
  50. data/lib/puppet/provider/user/user_role_add.rb +1 -1
  51. data/lib/puppet/provider/user/windows_adsi.rb +18 -1
  52. data/lib/puppet/settings.rb +1 -1
  53. data/lib/puppet/ssl/validator/default_validator.rb +1 -1
  54. data/lib/puppet/test/test_helper.rb +10 -3
  55. data/lib/puppet/transaction.rb +2 -2
  56. data/lib/puppet/transaction/persistence.rb +1 -1
  57. data/lib/puppet/transaction/report.rb +1 -1
  58. data/lib/puppet/trusted_external.rb +2 -2
  59. data/lib/puppet/type.rb +4 -3
  60. data/lib/puppet/type/file.rb +2 -2
  61. data/lib/puppet/type/file/source.rb +27 -7
  62. data/lib/puppet/type/notify.rb +2 -2
  63. data/lib/puppet/type/service.rb +4 -0
  64. data/lib/puppet/type/user.rb +18 -3
  65. data/lib/puppet/util.rb +26 -12
  66. data/lib/puppet/util/autoload.rb +9 -7
  67. data/lib/puppet/util/character_encoding.rb +9 -5
  68. data/lib/puppet/util/execution.rb +2 -2
  69. data/lib/puppet/util/windows.rb +1 -0
  70. data/lib/puppet/util/windows/api_types.rb +15 -1
  71. data/lib/puppet/util/windows/monkey_patches/dir.rb +40 -0
  72. data/lib/puppet/util/windows/security.rb +4 -4
  73. data/lib/puppet/util/windows/user.rb +219 -0
  74. data/lib/puppet/version.rb +1 -1
  75. data/locales/puppet.pot +78 -69
  76. data/man/man5/puppet.conf.5 +22 -3
  77. data/man/man8/puppet-agent.8 +1 -1
  78. data/man/man8/puppet-apply.8 +1 -1
  79. data/man/man8/puppet-catalog.8 +1 -1
  80. data/man/man8/puppet-config.8 +1 -1
  81. data/man/man8/puppet-describe.8 +1 -1
  82. data/man/man8/puppet-device.8 +1 -1
  83. data/man/man8/puppet-doc.8 +1 -1
  84. data/man/man8/puppet-epp.8 +1 -1
  85. data/man/man8/puppet-facts.8 +1 -1
  86. data/man/man8/puppet-filebucket.8 +1 -1
  87. data/man/man8/puppet-generate.8 +1 -1
  88. data/man/man8/puppet-help.8 +1 -1
  89. data/man/man8/puppet-key.8 +1 -1
  90. data/man/man8/puppet-lookup.8 +2 -2
  91. data/man/man8/puppet-man.8 +1 -1
  92. data/man/man8/puppet-module.8 +1 -1
  93. data/man/man8/puppet-node.8 +1 -1
  94. data/man/man8/puppet-parser.8 +1 -1
  95. data/man/man8/puppet-plugin.8 +1 -1
  96. data/man/man8/puppet-report.8 +1 -1
  97. data/man/man8/puppet-resource.8 +1 -1
  98. data/man/man8/puppet-script.8 +1 -1
  99. data/man/man8/puppet-ssl.8 +1 -1
  100. data/man/man8/puppet-status.8 +1 -1
  101. data/man/man8/puppet.8 +2 -2
  102. data/spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/provider/applytest/applytest.rb +2 -0
  103. data/spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/type/applytest.rb +25 -0
  104. data/spec/fixtures/unit/forge/bacula-releases.json +128 -0
  105. data/spec/fixtures/unit/forge/bacula.tar.gz +0 -0
  106. data/spec/integration/application/agent_spec.rb +29 -37
  107. data/spec/integration/application/apply_spec.rb +149 -149
  108. data/spec/integration/application/config_spec.rb +74 -0
  109. data/spec/integration/application/doc_spec.rb +16 -6
  110. data/spec/integration/application/filebucket_spec.rb +65 -16
  111. data/spec/integration/application/help_spec.rb +42 -0
  112. data/spec/integration/application/lookup_spec.rb +13 -0
  113. data/spec/integration/application/module_spec.rb +68 -0
  114. data/spec/integration/application/plugin_spec.rb +50 -0
  115. data/spec/integration/data_binding_spec.rb +82 -0
  116. data/spec/integration/directory_environments_spec.rb +17 -17
  117. data/spec/integration/indirector/facts/facter_spec.rb +8 -6
  118. data/spec/integration/node/environment_spec.rb +1 -1
  119. data/spec/integration/util/execution_spec.rb +22 -0
  120. data/spec/integration/util/windows/monkey_patches/dir_spec.rb +11 -0
  121. data/spec/integration/util/windows/process_spec.rb +26 -32
  122. data/spec/integration/util/windows/user_spec.rb +7 -0
  123. data/spec/integration/util_spec.rb +7 -33
  124. data/spec/lib/puppet_spec/matchers.rb +0 -80
  125. data/spec/lib/puppet_spec/puppetserver.rb +8 -0
  126. data/spec/unit/application/agent_spec.rb +3 -4
  127. data/spec/unit/application/face_base_spec.rb +6 -4
  128. data/spec/unit/application/facts_spec.rb +39 -10
  129. data/spec/unit/application/man_spec.rb +52 -0
  130. data/spec/unit/application/resource_spec.rb +3 -1
  131. data/spec/unit/application/ssl_spec.rb +15 -2
  132. data/spec/unit/configurer/downloader_spec.rb +10 -0
  133. data/spec/unit/configurer_spec.rb +47 -31
  134. data/spec/unit/confine_spec.rb +2 -1
  135. data/spec/unit/face/config_spec.rb +3 -1
  136. data/spec/unit/file_serving/mount/locales_spec.rb +2 -2
  137. data/spec/unit/file_serving/mount/pluginfacts_spec.rb +2 -2
  138. data/spec/unit/file_serving/mount/plugins_spec.rb +2 -2
  139. data/spec/unit/file_system/uniquefile_spec.rb +18 -0
  140. data/spec/unit/http/client_spec.rb +0 -1
  141. data/spec/unit/http/resolver_spec.rb +0 -1
  142. data/spec/unit/http/service/ca_spec.rb +0 -1
  143. data/spec/unit/http/service/compiler_spec.rb +0 -1
  144. data/spec/unit/http/service/file_server_spec.rb +0 -1
  145. data/spec/unit/http/service/report_spec.rb +0 -1
  146. data/spec/unit/http/service_spec.rb +0 -1
  147. data/spec/unit/http/session_spec.rb +0 -1
  148. data/spec/unit/module_tool/tar/mini_spec.rb +20 -0
  149. data/spec/unit/network/format_support_spec.rb +3 -2
  150. data/spec/unit/node/environment_spec.rb +18 -1
  151. data/spec/unit/pops/loaders/loaders_spec.rb +70 -0
  152. data/spec/unit/pops/lookup/lookup_spec.rb +25 -0
  153. data/spec/unit/provider/package/apt_spec.rb +77 -0
  154. data/spec/unit/provider/package/aptitude_spec.rb +1 -0
  155. data/spec/unit/provider/package/puppet_gem_spec.rb +4 -1
  156. data/spec/unit/provider/package/zypper_spec.rb +14 -0
  157. data/spec/unit/provider/service/init_spec.rb +41 -0
  158. data/spec/unit/provider/service/systemd_spec.rb +1 -6
  159. data/spec/unit/provider/service/windows_spec.rb +28 -0
  160. data/spec/unit/provider/user/windows_adsi_spec.rb +82 -0
  161. data/spec/unit/puppet_pal_2pec.rb +40 -0
  162. data/spec/unit/reports/store_spec.rb +17 -13
  163. data/spec/unit/transaction/persistence_spec.rb +15 -0
  164. data/spec/unit/type/service_spec.rb +35 -2
  165. data/spec/unit/type/user_spec.rb +31 -2
  166. data/spec/unit/util/character_encoding_spec.rb +4 -4
  167. data/spec/unit/util/command_line_spec.rb +11 -6
  168. metadata +21 -44
  169. data/spec/integration/faces/config_spec.rb +0 -91
  170. data/spec/integration/faces/documentation_spec.rb +0 -57
  171. data/spec/integration/file_bucket/file_spec.rb +0 -50
  172. data/spec/integration/file_serving/content_spec.rb +0 -7
  173. data/spec/integration/file_serving/fileset_spec.rb +0 -12
  174. data/spec/integration/file_serving/metadata_spec.rb +0 -8
  175. data/spec/integration/file_serving/terminus_helper_spec.rb +0 -20
  176. data/spec/integration/file_system/uniquefile_spec.rb +0 -26
  177. data/spec/integration/module_tool/forge_spec.rb +0 -51
  178. data/spec/integration/module_tool/tar/mini_spec.rb +0 -28
  179. data/spec/integration/provider/service/init_spec.rb +0 -48
  180. data/spec/integration/provider/service/systemd_spec.rb +0 -25
  181. data/spec/integration/provider/service/windows_spec.rb +0 -50
  182. data/spec/integration/reference/providers_spec.rb +0 -21
  183. data/spec/integration/reports_spec.rb +0 -13
  184. data/spec/integration/ssl/certificate_request_spec.rb +0 -44
  185. data/spec/integration/ssl/host_spec.rb +0 -72
  186. data/spec/integration/ssl/key_spec.rb +0 -99
  187. data/spec/shared_behaviours/file_serving_model.rb +0 -51
  188. data/spec/unit/face/man_spec.rb +0 -25
  189. data/spec/unit/man_spec.rb +0 -31
@@ -62,7 +62,7 @@ describe Puppet::Util::CommandLine do
62
62
  it "should print the version and exit if #{arg} is given" do
63
63
  expect do
64
64
  described_class.new("puppet", [arg]).execute
65
- end.to have_printed(/^#{Regexp.escape(Puppet.version)}$/)
65
+ end.to output(/^#{Regexp.escape(Puppet.version)}$/).to_stdout
66
66
  end
67
67
  end
68
68
 
@@ -73,7 +73,8 @@ describe Puppet::Util::CommandLine do
73
73
 
74
74
  expect {
75
75
  commandline.execute
76
- }.to have_printed(/Usage: puppet <subcommand> \[options\] <action> \[options\]/).and_exit_with(0)
76
+ }.to exit_with(0)
77
+ .and output(/Usage: puppet <subcommand> \[options\] <action> \[options\]/).to_stdout
77
78
  end
78
79
  end
79
80
 
@@ -95,7 +96,8 @@ describe Puppet::Util::CommandLine do
95
96
 
96
97
  expect {
97
98
  commandline.execute
98
- }.to have_printed(/Usage: puppet <subcommand> \[options\] <action> \[options\]/).and_exit_with(0)
99
+ }.to exit_with(0)
100
+ .and output(/Usage: puppet <subcommand> \[options\] <action> \[options\]/).to_stdout
99
101
  end
100
102
  end
101
103
 
@@ -124,7 +126,8 @@ describe Puppet::Util::CommandLine do
124
126
 
125
127
  expect {
126
128
  commandline.execute
127
- }.to have_printed(/Unknown Puppet subcommand 'whatever'/).and_exit_with(1)
129
+ }.to exit_with(1)
130
+ .and output(/Unknown Puppet subcommand 'whatever'/).to_stdout
128
131
  end
129
132
 
130
133
  it "should abort and show the help message" do
@@ -134,7 +137,8 @@ describe Puppet::Util::CommandLine do
134
137
 
135
138
  expect {
136
139
  commandline.execute
137
- }.to have_printed(/See 'puppet help' for help on available puppet subcommands/).and_exit_with(1)
140
+ }.to exit_with(1)
141
+ .and output(/See 'puppet help' for help on available puppet subcommands/).to_stdout
138
142
  end
139
143
 
140
144
  %w{--version -V}.each do |arg|
@@ -145,7 +149,8 @@ describe Puppet::Util::CommandLine do
145
149
 
146
150
  expect {
147
151
  commandline.execute
148
- }.to have_printed(%r[^#{Regexp.escape(Puppet.version)}$]).and_exit_with(1)
152
+ }.to exit_with(1)
153
+ .and output(%r[^#{Regexp.escape(Puppet.version)}$]).to_stdout
149
154
  end
150
155
  end
151
156
  end
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: 6.17.0
4
+ version: 6.18.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: 2020-07-10 00:00:00.000000000 Z
11
+ date: 2020-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter
@@ -1338,6 +1338,7 @@ files:
1338
1338
  - lib/puppet/util/windows/error.rb
1339
1339
  - lib/puppet/util/windows/eventlog.rb
1340
1340
  - lib/puppet/util/windows/file.rb
1341
+ - lib/puppet/util/windows/monkey_patches/dir.rb
1341
1342
  - lib/puppet/util/windows/principal.rb
1342
1343
  - lib/puppet/util/windows/process.rb
1343
1344
  - lib/puppet/util/windows/registry.rb
@@ -1397,6 +1398,8 @@ files:
1397
1398
  - man/man8/puppet.8
1398
1399
  - spec/fixtures/faulty_face/puppet/face/syntax.rb
1399
1400
  - spec/fixtures/hiera.yaml
1401
+ - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/provider/applytest/applytest.rb
1402
+ - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/type/applytest.rb
1400
1403
  - spec/fixtures/integration/node/environment/sitedir/00_a.pp
1401
1404
  - spec/fixtures/integration/node/environment/sitedir/01_b.pp
1402
1405
  - spec/fixtures/integration/node/environment/sitedir/03_empty.pp
@@ -1529,7 +1532,9 @@ files:
1529
1532
  - spec/fixtures/unit/data_providers/environments/production/modules/xyz/functions/data.pp
1530
1533
  - spec/fixtures/unit/data_providers/environments/production/modules/xyz/manifests/init.pp
1531
1534
  - spec/fixtures/unit/data_providers/environments/production/modules/xyz/metadata.json
1535
+ - spec/fixtures/unit/forge/bacula-releases.json
1532
1536
  - spec/fixtures/unit/forge/bacula.json
1537
+ - spec/fixtures/unit/forge/bacula.tar.gz
1533
1538
  - spec/fixtures/unit/functions/hiera/hiera/backend/hieraspec_backend.rb
1534
1539
  - spec/fixtures/unit/functions/lookup/data/common.yaml
1535
1540
  - spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
@@ -1791,9 +1796,12 @@ files:
1791
1796
  - spec/integration/agent/logging_spec.rb
1792
1797
  - spec/integration/application/agent_spec.rb
1793
1798
  - spec/integration/application/apply_spec.rb
1799
+ - spec/integration/application/config_spec.rb
1794
1800
  - spec/integration/application/doc_spec.rb
1795
1801
  - spec/integration/application/filebucket_spec.rb
1802
+ - spec/integration/application/help_spec.rb
1796
1803
  - spec/integration/application/lookup_spec.rb
1804
+ - spec/integration/application/module_spec.rb
1797
1805
  - spec/integration/application/plugin_spec.rb
1798
1806
  - spec/integration/configurer_spec.rb
1799
1807
  - spec/integration/data_binding_spec.rb
@@ -1803,14 +1811,6 @@ files:
1803
1811
  - spec/integration/environments/setting_hooks_spec.rb
1804
1812
  - spec/integration/environments/settings_interpolation_spec.rb
1805
1813
  - spec/integration/environments/settings_spec.rb
1806
- - spec/integration/faces/config_spec.rb
1807
- - spec/integration/faces/documentation_spec.rb
1808
- - spec/integration/file_bucket/file_spec.rb
1809
- - spec/integration/file_serving/content_spec.rb
1810
- - spec/integration/file_serving/fileset_spec.rb
1811
- - spec/integration/file_serving/metadata_spec.rb
1812
- - spec/integration/file_serving/terminus_helper_spec.rb
1813
- - spec/integration/file_system/uniquefile_spec.rb
1814
1814
  - spec/integration/http/client_spec.rb
1815
1815
  - spec/integration/indirector/catalog/compiler_spec.rb
1816
1816
  - spec/integration/indirector/direct_file_server_spec.rb
@@ -1818,8 +1818,6 @@ files:
1818
1818
  - spec/integration/indirector/file_content/file_server_spec.rb
1819
1819
  - spec/integration/indirector/file_metadata/file_server_spec.rb
1820
1820
  - spec/integration/indirector/report/yaml.rb
1821
- - spec/integration/module_tool/forge_spec.rb
1822
- - spec/integration/module_tool/tar/mini_spec.rb
1823
1821
  - spec/integration/network/authconfig_spec.rb
1824
1822
  - spec/integration/network/formats_spec.rb
1825
1823
  - spec/integration/network/http/api/indirected_routes_spec.rb
@@ -1842,16 +1840,8 @@ files:
1842
1840
  - spec/integration/parser/script_compiler_spec.rb
1843
1841
  - spec/integration/parser/undef_param_spec.rb
1844
1842
  - spec/integration/provider/file/windows_spec.rb
1845
- - spec/integration/provider/service/init_spec.rb
1846
- - spec/integration/provider/service/systemd_spec.rb
1847
- - spec/integration/provider/service/windows_spec.rb
1848
- - spec/integration/reference/providers_spec.rb
1849
- - spec/integration/reports_spec.rb
1850
1843
  - spec/integration/resource/catalog_spec.rb
1851
1844
  - spec/integration/resource/type_collection_spec.rb
1852
- - spec/integration/ssl/certificate_request_spec.rb
1853
- - spec/integration/ssl/host_spec.rb
1854
- - spec/integration/ssl/key_spec.rb
1855
1845
  - spec/integration/transaction/report_spec.rb
1856
1846
  - spec/integration/transaction_spec.rb
1857
1847
  - spec/integration/type/exec_spec.rb
@@ -1865,6 +1855,7 @@ files:
1865
1855
  - spec/integration/util/rdoc/parser_spec.rb
1866
1856
  - spec/integration/util/settings_spec.rb
1867
1857
  - spec/integration/util/windows/adsi_spec.rb
1858
+ - spec/integration/util/windows/monkey_patches/dir_spec.rb
1868
1859
  - spec/integration/util/windows/principal_spec.rb
1869
1860
  - spec/integration/util/windows/process_spec.rb
1870
1861
  - spec/integration/util/windows/registry_spec.rb
@@ -1916,7 +1907,6 @@ files:
1916
1907
  - spec/shared_behaviours/documentation_on_faces.rb
1917
1908
  - spec/shared_behaviours/file_server_terminus.rb
1918
1909
  - spec/shared_behaviours/file_serving.rb
1919
- - spec/shared_behaviours/file_serving_model.rb
1920
1910
  - spec/shared_behaviours/hiera_indirections.rb
1921
1911
  - spec/shared_behaviours/iterative_functions.rb
1922
1912
  - spec/shared_behaviours/memory_terminus.rb
@@ -1943,6 +1933,7 @@ files:
1943
1933
  - spec/unit/application/filebucket_spec.rb
1944
1934
  - spec/unit/application/indirection_base_spec.rb
1945
1935
  - spec/unit/application/lookup_spec.rb
1936
+ - spec/unit/application/man_spec.rb
1946
1937
  - spec/unit/application/resource_spec.rb
1947
1938
  - spec/unit/application/ssl_spec.rb
1948
1939
  - spec/unit/application_spec.rb
@@ -1979,7 +1970,6 @@ files:
1979
1970
  - spec/unit/face/generate_spec.rb
1980
1971
  - spec/unit/face/help_spec.rb
1981
1972
  - spec/unit/face/key_spec.rb
1982
- - spec/unit/face/man_spec.rb
1983
1973
  - spec/unit/face/module/install_spec.rb
1984
1974
  - spec/unit/face/module/list_spec.rb
1985
1975
  - spec/unit/face/module/search_spec.rb
@@ -2185,7 +2175,6 @@ files:
2185
2175
  - spec/unit/interface/option_builder_spec.rb
2186
2176
  - spec/unit/interface/option_spec.rb
2187
2177
  - spec/unit/interface_spec.rb
2188
- - spec/unit/man_spec.rb
2189
2178
  - spec/unit/module_spec.rb
2190
2179
  - spec/unit/module_tool/application_spec.rb
2191
2180
  - spec/unit/module_tool/applications/checksummer_spec.rb
@@ -2674,6 +2663,8 @@ summary: Puppet, an automated configuration management tool
2674
2663
  test_files:
2675
2664
  - spec/fixtures/faulty_face/puppet/face/syntax.rb
2676
2665
  - spec/fixtures/hiera.yaml
2666
+ - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/provider/applytest/applytest.rb
2667
+ - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/type/applytest.rb
2677
2668
  - spec/fixtures/integration/node/environment/sitedir/00_a.pp
2678
2669
  - spec/fixtures/integration/node/environment/sitedir/01_b.pp
2679
2670
  - spec/fixtures/integration/node/environment/sitedir/03_empty.pp
@@ -2806,7 +2797,9 @@ test_files:
2806
2797
  - spec/fixtures/unit/data_providers/environments/production/modules/xyz/functions/data.pp
2807
2798
  - spec/fixtures/unit/data_providers/environments/production/modules/xyz/manifests/init.pp
2808
2799
  - spec/fixtures/unit/data_providers/environments/production/modules/xyz/metadata.json
2800
+ - spec/fixtures/unit/forge/bacula-releases.json
2809
2801
  - spec/fixtures/unit/forge/bacula.json
2802
+ - spec/fixtures/unit/forge/bacula.tar.gz
2810
2803
  - spec/fixtures/unit/functions/hiera/hiera/backend/hieraspec_backend.rb
2811
2804
  - spec/fixtures/unit/functions/lookup/data/common.yaml
2812
2805
  - spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
@@ -3068,9 +3061,12 @@ test_files:
3068
3061
  - spec/integration/agent/logging_spec.rb
3069
3062
  - spec/integration/application/agent_spec.rb
3070
3063
  - spec/integration/application/apply_spec.rb
3064
+ - spec/integration/application/config_spec.rb
3071
3065
  - spec/integration/application/doc_spec.rb
3072
3066
  - spec/integration/application/filebucket_spec.rb
3067
+ - spec/integration/application/help_spec.rb
3073
3068
  - spec/integration/application/lookup_spec.rb
3069
+ - spec/integration/application/module_spec.rb
3074
3070
  - spec/integration/application/plugin_spec.rb
3075
3071
  - spec/integration/configurer_spec.rb
3076
3072
  - spec/integration/data_binding_spec.rb
@@ -3080,14 +3076,6 @@ test_files:
3080
3076
  - spec/integration/environments/setting_hooks_spec.rb
3081
3077
  - spec/integration/environments/settings_interpolation_spec.rb
3082
3078
  - spec/integration/environments/settings_spec.rb
3083
- - spec/integration/faces/config_spec.rb
3084
- - spec/integration/faces/documentation_spec.rb
3085
- - spec/integration/file_bucket/file_spec.rb
3086
- - spec/integration/file_serving/content_spec.rb
3087
- - spec/integration/file_serving/fileset_spec.rb
3088
- - spec/integration/file_serving/metadata_spec.rb
3089
- - spec/integration/file_serving/terminus_helper_spec.rb
3090
- - spec/integration/file_system/uniquefile_spec.rb
3091
3079
  - spec/integration/http/client_spec.rb
3092
3080
  - spec/integration/indirector/catalog/compiler_spec.rb
3093
3081
  - spec/integration/indirector/direct_file_server_spec.rb
@@ -3095,8 +3083,6 @@ test_files:
3095
3083
  - spec/integration/indirector/file_content/file_server_spec.rb
3096
3084
  - spec/integration/indirector/file_metadata/file_server_spec.rb
3097
3085
  - spec/integration/indirector/report/yaml.rb
3098
- - spec/integration/module_tool/forge_spec.rb
3099
- - spec/integration/module_tool/tar/mini_spec.rb
3100
3086
  - spec/integration/network/authconfig_spec.rb
3101
3087
  - spec/integration/network/formats_spec.rb
3102
3088
  - spec/integration/network/http/api/indirected_routes_spec.rb
@@ -3119,16 +3105,8 @@ test_files:
3119
3105
  - spec/integration/parser/script_compiler_spec.rb
3120
3106
  - spec/integration/parser/undef_param_spec.rb
3121
3107
  - spec/integration/provider/file/windows_spec.rb
3122
- - spec/integration/provider/service/init_spec.rb
3123
- - spec/integration/provider/service/systemd_spec.rb
3124
- - spec/integration/provider/service/windows_spec.rb
3125
- - spec/integration/reference/providers_spec.rb
3126
- - spec/integration/reports_spec.rb
3127
3108
  - spec/integration/resource/catalog_spec.rb
3128
3109
  - spec/integration/resource/type_collection_spec.rb
3129
- - spec/integration/ssl/certificate_request_spec.rb
3130
- - spec/integration/ssl/host_spec.rb
3131
- - spec/integration/ssl/key_spec.rb
3132
3110
  - spec/integration/transaction/report_spec.rb
3133
3111
  - spec/integration/transaction_spec.rb
3134
3112
  - spec/integration/type/exec_spec.rb
@@ -3142,6 +3120,7 @@ test_files:
3142
3120
  - spec/integration/util/rdoc/parser_spec.rb
3143
3121
  - spec/integration/util/settings_spec.rb
3144
3122
  - spec/integration/util/windows/adsi_spec.rb
3123
+ - spec/integration/util/windows/monkey_patches/dir_spec.rb
3145
3124
  - spec/integration/util/windows/principal_spec.rb
3146
3125
  - spec/integration/util/windows/process_spec.rb
3147
3126
  - spec/integration/util/windows/registry_spec.rb
@@ -3193,7 +3172,6 @@ test_files:
3193
3172
  - spec/shared_behaviours/documentation_on_faces.rb
3194
3173
  - spec/shared_behaviours/file_server_terminus.rb
3195
3174
  - spec/shared_behaviours/file_serving.rb
3196
- - spec/shared_behaviours/file_serving_model.rb
3197
3175
  - spec/shared_behaviours/hiera_indirections.rb
3198
3176
  - spec/shared_behaviours/iterative_functions.rb
3199
3177
  - spec/shared_behaviours/memory_terminus.rb
@@ -3220,6 +3198,7 @@ test_files:
3220
3198
  - spec/unit/application/filebucket_spec.rb
3221
3199
  - spec/unit/application/indirection_base_spec.rb
3222
3200
  - spec/unit/application/lookup_spec.rb
3201
+ - spec/unit/application/man_spec.rb
3223
3202
  - spec/unit/application/resource_spec.rb
3224
3203
  - spec/unit/application/ssl_spec.rb
3225
3204
  - spec/unit/application_spec.rb
@@ -3256,7 +3235,6 @@ test_files:
3256
3235
  - spec/unit/face/generate_spec.rb
3257
3236
  - spec/unit/face/help_spec.rb
3258
3237
  - spec/unit/face/key_spec.rb
3259
- - spec/unit/face/man_spec.rb
3260
3238
  - spec/unit/face/module/install_spec.rb
3261
3239
  - spec/unit/face/module/list_spec.rb
3262
3240
  - spec/unit/face/module/search_spec.rb
@@ -3462,7 +3440,6 @@ test_files:
3462
3440
  - spec/unit/interface/option_builder_spec.rb
3463
3441
  - spec/unit/interface/option_spec.rb
3464
3442
  - spec/unit/interface_spec.rb
3465
- - spec/unit/man_spec.rb
3466
3443
  - spec/unit/module_spec.rb
3467
3444
  - spec/unit/module_tool/application_spec.rb
3468
3445
  - spec/unit/module_tool/applications/checksummer_spec.rb
@@ -1,91 +0,0 @@
1
- require 'spec_helper'
2
- require 'puppet/face'
3
-
4
- describe Puppet::Face[:config, '0.0.1'] do
5
- include PuppetSpec::Files
6
-
7
- # different UTF-8 widths
8
- # 1-byte A
9
- # 2-byte ۿ - http://www.fileformat.info/info/unicode/char/06ff/index.htm - 0xDB 0xBF / 219 191
10
- # 3-byte ᚠ - http://www.fileformat.info/info/unicode/char/16A0/index.htm - 0xE1 0x9A 0xA0 / 225 154 160
11
- # 4-byte 𠜎 - http://www.fileformat.info/info/unicode/char/2070E/index.htm - 0xF0 0xA0 0x9C 0x8E / 240 160 156 142
12
- MIXED_UTF8 = "A\u06FF\u16A0\u{2070E}" # Aۿᚠ𠜎
13
- let (:tmp_environment_path) { tmpdir('envpath') }
14
- let (:tmp_config) { tmpfile('puppet.conf') }
15
-
16
- def load_settings(path)
17
- test_settings = Puppet::Settings.new
18
-
19
- test_settings.define_settings(:main,
20
- :config => {
21
- :type => :file,
22
- :default => path,
23
- :desc => '',
24
- },
25
- :environmentpath => {
26
- :default => tmp_environment_path,
27
- :desc => '',
28
- },
29
- :basemodulepath => {
30
- :default => '',
31
- :desc => '',
32
- },
33
- # definition required to use the value
34
- :rando_key => {
35
- :default => '',
36
- :desc => ''
37
- },
38
- MIXED_UTF8.to_sym => {
39
- :default => '',
40
- :desc => ''
41
- },
42
- )
43
-
44
- test_settings.initialize_global_settings
45
- test_settings
46
- end
47
-
48
- before :each do
49
- File.open(tmp_config, 'w', :encoding => 'UTF-8') do |file|
50
- file.puts <<-EOF
51
- [main]
52
- rando_key=foobar
53
- #{MIXED_UTF8}=foobar
54
- EOF
55
- end
56
- end
57
-
58
- context 'when getting / setting UTF8 values' do
59
-
60
- let(:config) { described_class }
61
-
62
- def render(action, result)
63
- config.get_action(action).when_rendering(:console).call(result)
64
- end
65
-
66
- before :each do
67
- allow(subject).to receive(:report_section_and_environment)
68
- end
69
-
70
- # key must be a defined setting
71
- ['rando_key', MIXED_UTF8].each do |key|
72
- it "can change '#{key}' keyed ASCII value to a UTF-8 value and read it back" do
73
- value = "value#{key.reverse}value"
74
-
75
- # needed for the subject.set to write to correct file
76
- allow(Puppet.settings).to receive(:which_configuration_file).and_return(tmp_config)
77
- subject.set(key, value)
78
-
79
- # make sure subject.print looks at the newly modified settings
80
- test_settings = load_settings(tmp_config)
81
- # instead of the default Puppet.settings (implementation detail)
82
- allow(Puppet).to receive(:settings).and_return(test_settings)
83
-
84
- result = subject.print()
85
- expect(render(:print, result)).to match(/^#{key} = #{value}$/)
86
- result = subject.print(key, :section => 'main')
87
- expect(render(:print, result)).to eq("#{value}\n")
88
- end
89
- end
90
- end
91
- end
@@ -1,57 +0,0 @@
1
- require 'spec_helper'
2
- require 'puppet/face'
3
-
4
- describe "documentation of faces" do
5
- it "should generate global help" do
6
- help = nil
7
- expect { help = Puppet::Face[:help, :current].help }.not_to raise_error
8
- expect(help).to be_an_instance_of String
9
- expect(help.length).to be > 200
10
- end
11
-
12
- ########################################################################
13
- # Can we actually generate documentation for the face, and the actions it
14
- # has? This avoids situations where the ERB template turns out to have a
15
- # bug in it, triggered in something the user might do.
16
-
17
- context "face help messages" do
18
- Puppet::Face.faces.sort.each do |face_name|
19
- # REVISIT: We should walk all versions of the face here...
20
- let :help do Puppet::Face[:help, :current] end
21
-
22
- context "generating help" do
23
- it "for #{face_name}" do
24
- expect {
25
- text = help.help(face_name)
26
- expect(text).to be_an_instance_of String
27
- expect(text.length).to be > 100
28
- }.not_to raise_error
29
- end
30
-
31
- Puppet::Face[face_name, :current].actions.sort.each do |action_name|
32
- it "for #{face_name}.#{action_name}" do
33
- expect {
34
- text = help.help(face_name, action_name)
35
- expect(text).to be_an_instance_of String
36
- expect(text.length).to be > 100
37
- }.not_to raise_error
38
- end
39
- end
40
- end
41
-
42
- ########################################################################
43
- # Ensure that we have authorship and copyright information in *our* faces;
44
- # if you apply this to third party faces you might well be disappointed.
45
- context "licensing of Puppet Inc. face '#{face_name}'" do
46
- subject { Puppet::Face[face_name, :current] }
47
- its :license do should =~ /Apache\s*2/ end
48
- its :copyright do should =~ /Puppet Inc\./ end
49
-
50
- # REVISIT: This is less that ideal, I think, but right now I am more
51
- # comfortable watching us ship with some copyright than without any; we
52
- # can redress that when it becomes appropriate. --daniel 2011-04-27
53
- its :copyright do should =~ /20\d{2}/ end
54
- end
55
- end
56
- end
57
- end
@@ -1,50 +0,0 @@
1
- require 'spec_helper'
2
-
3
- require 'puppet/file_bucket/file'
4
-
5
- describe Puppet::FileBucket::File do
6
- describe "#indirection" do
7
- before :each do
8
- # Never connect to the network, no matter what
9
- allow_any_instance_of(described_class.indirection.terminus(:rest).class).to receive(:find)
10
- end
11
-
12
- describe "when running another application" do
13
- {
14
- "md5/d41d8cd98f00b204e9800998ecf8427e" => :file,
15
- "filebucket://puppetmaster:8140/md5/d41d8cd98f00b204e9800998ecf8427e" => :rest,
16
- }.each do |key, terminus|
17
- it "should use the #{terminus} terminus when requesting #{key.inspect}" do
18
- expect_any_instance_of(described_class.indirection.terminus(terminus).class).to receive(:find)
19
-
20
- described_class.indirection.find(key)
21
- end
22
- end
23
- end
24
- end
25
-
26
- describe "saving binary files" do
27
- context "given multiple backups of identical files" do
28
- it "does not error given content with binary external encoding" do
29
- binary = "\xD1\xF2\r\n\x81NuSc\x00".force_encoding(Encoding::ASCII_8BIT)
30
- bucket_file = Puppet::FileBucket::File.new(binary)
31
- Puppet::FileBucket::File.indirection.save(bucket_file, bucket_file.name)
32
- Puppet::FileBucket::File.indirection.save(bucket_file, bucket_file.name)
33
- end
34
-
35
- it "also does not error if the content is reported with UTF-8 external encoding" do
36
- # PUP-7951 - ensure accurate size comparison across encodings If binary
37
- # content arrives as a string with UTF-8 default external encoding, its
38
- # character count might be different than the same bytes with binary
39
- # external encoding. Ensure our equality comparison does not fail due to this.
40
- # As would be the case with our friend snowman:
41
- # Unicode snowman \u2603 - \xE2 \x98 \x83
42
- # character size 1, if interpreted as UTF-8, 3 "characters" if interpreted as binary
43
- utf8 = "\u2603".force_encoding(Encoding::UTF_8)
44
- bucket_file = Puppet::FileBucket::File.new(utf8)
45
- Puppet::FileBucket::File.indirection.save(bucket_file, bucket_file.name)
46
- Puppet::FileBucket::File.indirection.save(bucket_file, bucket_file.name)
47
- end
48
- end
49
- end
50
- end