puppet 6.17.0-x86-mingw32 → 6.18.0-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.

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: x86-mingw32
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
@@ -1428,6 +1428,7 @@ files:
1428
1428
  - lib/puppet/util/windows/error.rb
1429
1429
  - lib/puppet/util/windows/eventlog.rb
1430
1430
  - lib/puppet/util/windows/file.rb
1431
+ - lib/puppet/util/windows/monkey_patches/dir.rb
1431
1432
  - lib/puppet/util/windows/principal.rb
1432
1433
  - lib/puppet/util/windows/process.rb
1433
1434
  - lib/puppet/util/windows/registry.rb
@@ -1487,6 +1488,8 @@ files:
1487
1488
  - man/man8/puppet.8
1488
1489
  - spec/fixtures/faulty_face/puppet/face/syntax.rb
1489
1490
  - spec/fixtures/hiera.yaml
1491
+ - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/provider/applytest/applytest.rb
1492
+ - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/type/applytest.rb
1490
1493
  - spec/fixtures/integration/node/environment/sitedir/00_a.pp
1491
1494
  - spec/fixtures/integration/node/environment/sitedir/01_b.pp
1492
1495
  - spec/fixtures/integration/node/environment/sitedir/03_empty.pp
@@ -1619,7 +1622,9 @@ files:
1619
1622
  - spec/fixtures/unit/data_providers/environments/production/modules/xyz/functions/data.pp
1620
1623
  - spec/fixtures/unit/data_providers/environments/production/modules/xyz/manifests/init.pp
1621
1624
  - spec/fixtures/unit/data_providers/environments/production/modules/xyz/metadata.json
1625
+ - spec/fixtures/unit/forge/bacula-releases.json
1622
1626
  - spec/fixtures/unit/forge/bacula.json
1627
+ - spec/fixtures/unit/forge/bacula.tar.gz
1623
1628
  - spec/fixtures/unit/functions/hiera/hiera/backend/hieraspec_backend.rb
1624
1629
  - spec/fixtures/unit/functions/lookup/data/common.yaml
1625
1630
  - spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
@@ -1881,9 +1886,12 @@ files:
1881
1886
  - spec/integration/agent/logging_spec.rb
1882
1887
  - spec/integration/application/agent_spec.rb
1883
1888
  - spec/integration/application/apply_spec.rb
1889
+ - spec/integration/application/config_spec.rb
1884
1890
  - spec/integration/application/doc_spec.rb
1885
1891
  - spec/integration/application/filebucket_spec.rb
1892
+ - spec/integration/application/help_spec.rb
1886
1893
  - spec/integration/application/lookup_spec.rb
1894
+ - spec/integration/application/module_spec.rb
1887
1895
  - spec/integration/application/plugin_spec.rb
1888
1896
  - spec/integration/configurer_spec.rb
1889
1897
  - spec/integration/data_binding_spec.rb
@@ -1893,14 +1901,6 @@ files:
1893
1901
  - spec/integration/environments/setting_hooks_spec.rb
1894
1902
  - spec/integration/environments/settings_interpolation_spec.rb
1895
1903
  - spec/integration/environments/settings_spec.rb
1896
- - spec/integration/faces/config_spec.rb
1897
- - spec/integration/faces/documentation_spec.rb
1898
- - spec/integration/file_bucket/file_spec.rb
1899
- - spec/integration/file_serving/content_spec.rb
1900
- - spec/integration/file_serving/fileset_spec.rb
1901
- - spec/integration/file_serving/metadata_spec.rb
1902
- - spec/integration/file_serving/terminus_helper_spec.rb
1903
- - spec/integration/file_system/uniquefile_spec.rb
1904
1904
  - spec/integration/http/client_spec.rb
1905
1905
  - spec/integration/indirector/catalog/compiler_spec.rb
1906
1906
  - spec/integration/indirector/direct_file_server_spec.rb
@@ -1908,8 +1908,6 @@ files:
1908
1908
  - spec/integration/indirector/file_content/file_server_spec.rb
1909
1909
  - spec/integration/indirector/file_metadata/file_server_spec.rb
1910
1910
  - spec/integration/indirector/report/yaml.rb
1911
- - spec/integration/module_tool/forge_spec.rb
1912
- - spec/integration/module_tool/tar/mini_spec.rb
1913
1911
  - spec/integration/network/authconfig_spec.rb
1914
1912
  - spec/integration/network/formats_spec.rb
1915
1913
  - spec/integration/network/http/api/indirected_routes_spec.rb
@@ -1932,16 +1930,8 @@ files:
1932
1930
  - spec/integration/parser/script_compiler_spec.rb
1933
1931
  - spec/integration/parser/undef_param_spec.rb
1934
1932
  - spec/integration/provider/file/windows_spec.rb
1935
- - spec/integration/provider/service/init_spec.rb
1936
- - spec/integration/provider/service/systemd_spec.rb
1937
- - spec/integration/provider/service/windows_spec.rb
1938
- - spec/integration/reference/providers_spec.rb
1939
- - spec/integration/reports_spec.rb
1940
1933
  - spec/integration/resource/catalog_spec.rb
1941
1934
  - spec/integration/resource/type_collection_spec.rb
1942
- - spec/integration/ssl/certificate_request_spec.rb
1943
- - spec/integration/ssl/host_spec.rb
1944
- - spec/integration/ssl/key_spec.rb
1945
1935
  - spec/integration/transaction/report_spec.rb
1946
1936
  - spec/integration/transaction_spec.rb
1947
1937
  - spec/integration/type/exec_spec.rb
@@ -1955,6 +1945,7 @@ files:
1955
1945
  - spec/integration/util/rdoc/parser_spec.rb
1956
1946
  - spec/integration/util/settings_spec.rb
1957
1947
  - spec/integration/util/windows/adsi_spec.rb
1948
+ - spec/integration/util/windows/monkey_patches/dir_spec.rb
1958
1949
  - spec/integration/util/windows/principal_spec.rb
1959
1950
  - spec/integration/util/windows/process_spec.rb
1960
1951
  - spec/integration/util/windows/registry_spec.rb
@@ -2006,7 +1997,6 @@ files:
2006
1997
  - spec/shared_behaviours/documentation_on_faces.rb
2007
1998
  - spec/shared_behaviours/file_server_terminus.rb
2008
1999
  - spec/shared_behaviours/file_serving.rb
2009
- - spec/shared_behaviours/file_serving_model.rb
2010
2000
  - spec/shared_behaviours/hiera_indirections.rb
2011
2001
  - spec/shared_behaviours/iterative_functions.rb
2012
2002
  - spec/shared_behaviours/memory_terminus.rb
@@ -2033,6 +2023,7 @@ files:
2033
2023
  - spec/unit/application/filebucket_spec.rb
2034
2024
  - spec/unit/application/indirection_base_spec.rb
2035
2025
  - spec/unit/application/lookup_spec.rb
2026
+ - spec/unit/application/man_spec.rb
2036
2027
  - spec/unit/application/resource_spec.rb
2037
2028
  - spec/unit/application/ssl_spec.rb
2038
2029
  - spec/unit/application_spec.rb
@@ -2069,7 +2060,6 @@ files:
2069
2060
  - spec/unit/face/generate_spec.rb
2070
2061
  - spec/unit/face/help_spec.rb
2071
2062
  - spec/unit/face/key_spec.rb
2072
- - spec/unit/face/man_spec.rb
2073
2063
  - spec/unit/face/module/install_spec.rb
2074
2064
  - spec/unit/face/module/list_spec.rb
2075
2065
  - spec/unit/face/module/search_spec.rb
@@ -2275,7 +2265,6 @@ files:
2275
2265
  - spec/unit/interface/option_builder_spec.rb
2276
2266
  - spec/unit/interface/option_spec.rb
2277
2267
  - spec/unit/interface_spec.rb
2278
- - spec/unit/man_spec.rb
2279
2268
  - spec/unit/module_spec.rb
2280
2269
  - spec/unit/module_tool/application_spec.rb
2281
2270
  - spec/unit/module_tool/applications/checksummer_spec.rb
@@ -2764,6 +2753,8 @@ summary: Puppet, an automated configuration management tool
2764
2753
  test_files:
2765
2754
  - spec/fixtures/faulty_face/puppet/face/syntax.rb
2766
2755
  - spec/fixtures/hiera.yaml
2756
+ - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/provider/applytest/applytest.rb
2757
+ - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/type/applytest.rb
2767
2758
  - spec/fixtures/integration/node/environment/sitedir/00_a.pp
2768
2759
  - spec/fixtures/integration/node/environment/sitedir/01_b.pp
2769
2760
  - spec/fixtures/integration/node/environment/sitedir/03_empty.pp
@@ -2896,7 +2887,9 @@ test_files:
2896
2887
  - spec/fixtures/unit/data_providers/environments/production/modules/xyz/functions/data.pp
2897
2888
  - spec/fixtures/unit/data_providers/environments/production/modules/xyz/manifests/init.pp
2898
2889
  - spec/fixtures/unit/data_providers/environments/production/modules/xyz/metadata.json
2890
+ - spec/fixtures/unit/forge/bacula-releases.json
2899
2891
  - spec/fixtures/unit/forge/bacula.json
2892
+ - spec/fixtures/unit/forge/bacula.tar.gz
2900
2893
  - spec/fixtures/unit/functions/hiera/hiera/backend/hieraspec_backend.rb
2901
2894
  - spec/fixtures/unit/functions/lookup/data/common.yaml
2902
2895
  - spec/fixtures/unit/functions/lookup/hiera/backend/custom_backend.rb
@@ -3158,9 +3151,12 @@ test_files:
3158
3151
  - spec/integration/agent/logging_spec.rb
3159
3152
  - spec/integration/application/agent_spec.rb
3160
3153
  - spec/integration/application/apply_spec.rb
3154
+ - spec/integration/application/config_spec.rb
3161
3155
  - spec/integration/application/doc_spec.rb
3162
3156
  - spec/integration/application/filebucket_spec.rb
3157
+ - spec/integration/application/help_spec.rb
3163
3158
  - spec/integration/application/lookup_spec.rb
3159
+ - spec/integration/application/module_spec.rb
3164
3160
  - spec/integration/application/plugin_spec.rb
3165
3161
  - spec/integration/configurer_spec.rb
3166
3162
  - spec/integration/data_binding_spec.rb
@@ -3170,14 +3166,6 @@ test_files:
3170
3166
  - spec/integration/environments/setting_hooks_spec.rb
3171
3167
  - spec/integration/environments/settings_interpolation_spec.rb
3172
3168
  - spec/integration/environments/settings_spec.rb
3173
- - spec/integration/faces/config_spec.rb
3174
- - spec/integration/faces/documentation_spec.rb
3175
- - spec/integration/file_bucket/file_spec.rb
3176
- - spec/integration/file_serving/content_spec.rb
3177
- - spec/integration/file_serving/fileset_spec.rb
3178
- - spec/integration/file_serving/metadata_spec.rb
3179
- - spec/integration/file_serving/terminus_helper_spec.rb
3180
- - spec/integration/file_system/uniquefile_spec.rb
3181
3169
  - spec/integration/http/client_spec.rb
3182
3170
  - spec/integration/indirector/catalog/compiler_spec.rb
3183
3171
  - spec/integration/indirector/direct_file_server_spec.rb
@@ -3185,8 +3173,6 @@ test_files:
3185
3173
  - spec/integration/indirector/file_content/file_server_spec.rb
3186
3174
  - spec/integration/indirector/file_metadata/file_server_spec.rb
3187
3175
  - spec/integration/indirector/report/yaml.rb
3188
- - spec/integration/module_tool/forge_spec.rb
3189
- - spec/integration/module_tool/tar/mini_spec.rb
3190
3176
  - spec/integration/network/authconfig_spec.rb
3191
3177
  - spec/integration/network/formats_spec.rb
3192
3178
  - spec/integration/network/http/api/indirected_routes_spec.rb
@@ -3209,16 +3195,8 @@ test_files:
3209
3195
  - spec/integration/parser/script_compiler_spec.rb
3210
3196
  - spec/integration/parser/undef_param_spec.rb
3211
3197
  - spec/integration/provider/file/windows_spec.rb
3212
- - spec/integration/provider/service/init_spec.rb
3213
- - spec/integration/provider/service/systemd_spec.rb
3214
- - spec/integration/provider/service/windows_spec.rb
3215
- - spec/integration/reference/providers_spec.rb
3216
- - spec/integration/reports_spec.rb
3217
3198
  - spec/integration/resource/catalog_spec.rb
3218
3199
  - spec/integration/resource/type_collection_spec.rb
3219
- - spec/integration/ssl/certificate_request_spec.rb
3220
- - spec/integration/ssl/host_spec.rb
3221
- - spec/integration/ssl/key_spec.rb
3222
3200
  - spec/integration/transaction/report_spec.rb
3223
3201
  - spec/integration/transaction_spec.rb
3224
3202
  - spec/integration/type/exec_spec.rb
@@ -3232,6 +3210,7 @@ test_files:
3232
3210
  - spec/integration/util/rdoc/parser_spec.rb
3233
3211
  - spec/integration/util/settings_spec.rb
3234
3212
  - spec/integration/util/windows/adsi_spec.rb
3213
+ - spec/integration/util/windows/monkey_patches/dir_spec.rb
3235
3214
  - spec/integration/util/windows/principal_spec.rb
3236
3215
  - spec/integration/util/windows/process_spec.rb
3237
3216
  - spec/integration/util/windows/registry_spec.rb
@@ -3283,7 +3262,6 @@ test_files:
3283
3262
  - spec/shared_behaviours/documentation_on_faces.rb
3284
3263
  - spec/shared_behaviours/file_server_terminus.rb
3285
3264
  - spec/shared_behaviours/file_serving.rb
3286
- - spec/shared_behaviours/file_serving_model.rb
3287
3265
  - spec/shared_behaviours/hiera_indirections.rb
3288
3266
  - spec/shared_behaviours/iterative_functions.rb
3289
3267
  - spec/shared_behaviours/memory_terminus.rb
@@ -3310,6 +3288,7 @@ test_files:
3310
3288
  - spec/unit/application/filebucket_spec.rb
3311
3289
  - spec/unit/application/indirection_base_spec.rb
3312
3290
  - spec/unit/application/lookup_spec.rb
3291
+ - spec/unit/application/man_spec.rb
3313
3292
  - spec/unit/application/resource_spec.rb
3314
3293
  - spec/unit/application/ssl_spec.rb
3315
3294
  - spec/unit/application_spec.rb
@@ -3346,7 +3325,6 @@ test_files:
3346
3325
  - spec/unit/face/generate_spec.rb
3347
3326
  - spec/unit/face/help_spec.rb
3348
3327
  - spec/unit/face/key_spec.rb
3349
- - spec/unit/face/man_spec.rb
3350
3328
  - spec/unit/face/module/install_spec.rb
3351
3329
  - spec/unit/face/module/list_spec.rb
3352
3330
  - spec/unit/face/module/search_spec.rb
@@ -3552,7 +3530,6 @@ test_files:
3552
3530
  - spec/unit/interface/option_builder_spec.rb
3553
3531
  - spec/unit/interface/option_spec.rb
3554
3532
  - spec/unit/interface_spec.rb
3555
- - spec/unit/man_spec.rb
3556
3533
  - spec/unit/module_spec.rb
3557
3534
  - spec/unit/module_tool/application_spec.rb
3558
3535
  - 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