puppet 6.19.1 → 6.20.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 (171) hide show
  1. checksums.yaml +4 -4
  2. data/CODEOWNERS +2 -16
  3. data/Gemfile +2 -0
  4. data/Gemfile.lock +30 -25
  5. data/lib/puppet/application.rb +10 -6
  6. data/lib/puppet/application/agent.rb +1 -0
  7. data/lib/puppet/application/apply.rb +3 -2
  8. data/lib/puppet/application/device.rb +1 -0
  9. data/lib/puppet/application/filebucket.rb +2 -2
  10. data/lib/puppet/application/script.rb +1 -0
  11. data/lib/puppet/application_support.rb +7 -0
  12. data/lib/puppet/configurer.rb +28 -18
  13. data/lib/puppet/defaults.rb +24 -18
  14. data/lib/puppet/environments.rb +38 -54
  15. data/lib/puppet/face/config.rb +10 -0
  16. data/lib/puppet/face/epp.rb +12 -2
  17. data/lib/puppet/face/facts.rb +60 -0
  18. data/lib/puppet/ffi/posix.rb +10 -0
  19. data/lib/puppet/ffi/posix/constants.rb +14 -0
  20. data/lib/puppet/ffi/posix/functions.rb +24 -0
  21. data/lib/puppet/functions/epp.rb +1 -0
  22. data/lib/puppet/functions/inline_epp.rb +1 -0
  23. data/lib/puppet/indirector/fact_search.rb +60 -0
  24. data/lib/puppet/indirector/facts/json.rb +27 -0
  25. data/lib/puppet/indirector/facts/yaml.rb +3 -58
  26. data/lib/puppet/indirector/json.rb +5 -1
  27. data/lib/puppet/indirector/node/json.rb +8 -0
  28. data/lib/puppet/indirector/report/json.rb +34 -0
  29. data/lib/puppet/module_tool/applications/installer.rb +48 -2
  30. data/lib/puppet/module_tool/errors/shared.rb +17 -2
  31. data/lib/puppet/network/formats.rb +2 -1
  32. data/lib/puppet/pal/pal_impl.rb +70 -17
  33. data/lib/puppet/parser/ast/leaf.rb +3 -2
  34. data/lib/puppet/parser/templatewrapper.rb +1 -1
  35. data/lib/puppet/pops/evaluator/deferred_resolver.rb +5 -3
  36. data/lib/puppet/pops/evaluator/evaluator_impl.rb +22 -3
  37. data/lib/puppet/pops/model/ast_transformer.rb +1 -1
  38. data/lib/puppet/provider/package/apt.rb +4 -0
  39. data/lib/puppet/provider/user/aix.rb +2 -2
  40. data/lib/puppet/reference/configuration.rb +6 -5
  41. data/lib/puppet/settings.rb +33 -28
  42. data/lib/puppet/settings/alias_setting.rb +37 -0
  43. data/lib/puppet/settings/base_setting.rb +26 -2
  44. data/lib/puppet/util/autoload.rb +1 -8
  45. data/lib/puppet/util/fact_dif.rb +62 -0
  46. data/lib/puppet/util/posix.rb +54 -5
  47. data/lib/puppet/util/rubygems.rb +5 -1
  48. data/lib/puppet/version.rb +1 -1
  49. data/locales/puppet.pot +188 -164
  50. data/man/man5/puppet.conf.5 +6 -6
  51. data/man/man8/puppet-agent.8 +2 -2
  52. data/man/man8/puppet-apply.8 +2 -2
  53. data/man/man8/puppet-catalog.8 +1 -1
  54. data/man/man8/puppet-config.8 +1 -1
  55. data/man/man8/puppet-describe.8 +1 -1
  56. data/man/man8/puppet-device.8 +2 -2
  57. data/man/man8/puppet-doc.8 +1 -1
  58. data/man/man8/puppet-epp.8 +1 -1
  59. data/man/man8/puppet-facts.8 +32 -1
  60. data/man/man8/puppet-filebucket.8 +3 -3
  61. data/man/man8/puppet-generate.8 +1 -1
  62. data/man/man8/puppet-help.8 +1 -1
  63. data/man/man8/puppet-key.8 +1 -1
  64. data/man/man8/puppet-lookup.8 +1 -1
  65. data/man/man8/puppet-man.8 +1 -1
  66. data/man/man8/puppet-module.8 +1 -1
  67. data/man/man8/puppet-node.8 +4 -1
  68. data/man/man8/puppet-parser.8 +1 -1
  69. data/man/man8/puppet-plugin.8 +1 -1
  70. data/man/man8/puppet-report.8 +4 -1
  71. data/man/man8/puppet-resource.8 +1 -1
  72. data/man/man8/puppet-script.8 +2 -2
  73. data/man/man8/puppet-ssl.8 +1 -1
  74. data/man/man8/puppet-status.8 +1 -1
  75. data/man/man8/puppet.8 +2 -2
  76. data/spec/fixtures/integration/application/agent/cached_deferred_catalog.json +91 -0
  77. data/spec/fixtures/unit/provider/user/aix/aix_passwd_file.out +4 -0
  78. data/spec/integration/application/agent_spec.rb +127 -3
  79. data/spec/integration/application/apply_spec.rb +19 -0
  80. data/spec/integration/defaults_spec.rb +0 -7
  81. data/spec/integration/environments/setting_hooks_spec.rb +1 -1
  82. data/spec/integration/resource/type_collection_spec.rb +2 -6
  83. data/spec/integration/transaction_spec.rb +4 -9
  84. data/spec/integration/util/windows/adsi_spec.rb +3 -1
  85. data/spec/integration/util/windows/registry_spec.rb +0 -10
  86. data/spec/lib/puppet_spec/settings.rb +6 -1
  87. data/spec/spec_helper.rb +1 -4
  88. data/spec/unit/agent_spec.rb +8 -6
  89. data/spec/unit/application/agent_spec.rb +0 -1
  90. data/spec/unit/application/config_spec.rb +224 -4
  91. data/spec/unit/application/filebucket_spec.rb +0 -2
  92. data/spec/unit/application_spec.rb +51 -9
  93. data/spec/unit/confine/feature_spec.rb +1 -1
  94. data/spec/unit/confine_spec.rb +8 -2
  95. data/spec/unit/defaults_spec.rb +20 -1
  96. data/spec/unit/environments_spec.rb +96 -19
  97. data/spec/unit/face/config_spec.rb +27 -32
  98. data/spec/unit/face/node_spec.rb +0 -11
  99. data/spec/unit/file_serving/configuration/parser_spec.rb +0 -1
  100. data/spec/unit/file_serving/metadata_spec.rb +3 -3
  101. data/spec/unit/file_serving/terminus_helper_spec.rb +11 -4
  102. data/spec/unit/forge/module_release_spec.rb +2 -7
  103. data/spec/unit/functions/inline_epp_spec.rb +26 -1
  104. data/spec/unit/http/service/compiler_spec.rb +49 -0
  105. data/spec/unit/http/service_spec.rb +1 -1
  106. data/spec/unit/indirector/face_spec.rb +0 -1
  107. data/spec/unit/indirector/facts/facter_spec.rb +0 -1
  108. data/spec/unit/indirector/facts/json_spec.rb +255 -0
  109. data/spec/unit/indirector/file_bucket_file/selector_spec.rb +26 -8
  110. data/spec/unit/indirector/indirection_spec.rb +8 -12
  111. data/spec/unit/indirector/key/file_spec.rb +0 -1
  112. data/spec/unit/indirector/node/json_spec.rb +33 -0
  113. data/spec/{integration/indirector/report/yaml.rb → unit/indirector/report/json_spec.rb} +13 -24
  114. data/spec/unit/indirector/report/yaml_spec.rb +72 -8
  115. data/spec/unit/indirector_spec.rb +2 -2
  116. data/spec/unit/module_tool/applications/installer_spec.rb +66 -0
  117. data/spec/unit/network/authconfig_spec.rb +0 -3
  118. data/spec/unit/network/http/api/indirected_routes_spec.rb +0 -9
  119. data/spec/unit/network/http/handler_spec.rb +0 -5
  120. data/spec/unit/parser/compiler_spec.rb +3 -19
  121. data/spec/unit/parser/resource_spec.rb +14 -8
  122. data/spec/unit/parser/templatewrapper_spec.rb +4 -3
  123. data/spec/unit/pops/evaluator/deferred_resolver_spec.rb +20 -0
  124. data/spec/unit/property_spec.rb +1 -0
  125. data/spec/unit/provider/nameservice_spec.rb +66 -65
  126. data/spec/unit/provider/package/apt_spec.rb +4 -8
  127. data/spec/unit/provider/package/base_spec.rb +6 -5
  128. data/spec/unit/provider/package/pacman_spec.rb +18 -12
  129. data/spec/unit/provider/package/pip_spec.rb +6 -11
  130. data/spec/unit/provider/package/pkgdmg_spec.rb +0 -4
  131. data/spec/unit/provider/user/aix_spec.rb +5 -0
  132. data/spec/unit/provider/user/hpux_spec.rb +1 -1
  133. data/spec/unit/provider/user/pw_spec.rb +2 -0
  134. data/spec/unit/provider/user/useradd_spec.rb +1 -0
  135. data/spec/unit/provider_spec.rb +8 -10
  136. data/spec/unit/puppet_pal_catalog_spec.rb +45 -0
  137. data/spec/unit/resource/capability_finder_spec.rb +6 -1
  138. data/spec/unit/resource/type_spec.rb +1 -1
  139. data/spec/unit/resource_spec.rb +11 -10
  140. data/spec/unit/settings_spec.rb +419 -242
  141. data/spec/unit/ssl/base_spec.rb +0 -1
  142. data/spec/unit/ssl/host_spec.rb +0 -5
  143. data/spec/unit/ssl/ssl_provider_spec.rb +14 -8
  144. data/spec/unit/transaction/additional_resource_generator_spec.rb +3 -7
  145. data/spec/unit/transaction/event_manager_spec.rb +14 -11
  146. data/spec/unit/transaction_spec.rb +13 -4
  147. data/spec/unit/type/file/content_spec.rb +0 -1
  148. data/spec/unit/type/file/selinux_spec.rb +0 -2
  149. data/spec/unit/type/file_spec.rb +0 -6
  150. data/spec/unit/type/group_spec.rb +13 -6
  151. data/spec/unit/type/resources_spec.rb +7 -7
  152. data/spec/unit/type/service_spec.rb +1 -1
  153. data/spec/unit/type/tidy_spec.rb +0 -1
  154. data/spec/unit/type_spec.rb +2 -2
  155. data/spec/unit/util/at_fork_spec.rb +2 -2
  156. data/spec/unit/util/autoload_spec.rb +5 -1
  157. data/spec/unit/util/backups_spec.rb +1 -2
  158. data/spec/unit/util/execution_spec.rb +15 -11
  159. data/spec/unit/util/inifile_spec.rb +6 -14
  160. data/spec/unit/util/log_spec.rb +8 -7
  161. data/spec/unit/util/logging_spec.rb +3 -3
  162. data/spec/unit/util/posix_spec.rb +363 -15
  163. data/spec/unit/util/rubygems_spec.rb +2 -2
  164. data/spec/unit/util/selinux_spec.rb +76 -52
  165. data/spec/unit/util/storage_spec.rb +3 -1
  166. data/spec/unit/util/suidmanager_spec.rb +44 -41
  167. data/spec/unit/util_spec.rb +13 -6
  168. metadata +21 -10
  169. data/spec/integration/application/config_spec.rb +0 -74
  170. data/spec/unit/face/catalog_spec.rb +0 -6
  171. data/spec/unit/face/module_spec.rb +0 -3
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.19.1
4
+ version: 6.20.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-10-22 00:00:00.000000000 Z
11
+ date: 2021-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter
@@ -422,6 +422,9 @@ files:
422
422
  - lib/puppet/feature/ssh.rb
423
423
  - lib/puppet/feature/telnet.rb
424
424
  - lib/puppet/feature/zlib.rb
425
+ - lib/puppet/ffi/posix.rb
426
+ - lib/puppet/ffi/posix/constants.rb
427
+ - lib/puppet/ffi/posix/functions.rb
425
428
  - lib/puppet/file_bucket.rb
426
429
  - lib/puppet/file_bucket/dipper.rb
427
430
  - lib/puppet/file_bucket/file.rb
@@ -596,7 +599,9 @@ files:
596
599
  - lib/puppet/indirector/errors.rb
597
600
  - lib/puppet/indirector/exec.rb
598
601
  - lib/puppet/indirector/face.rb
602
+ - lib/puppet/indirector/fact_search.rb
599
603
  - lib/puppet/indirector/facts/facter.rb
604
+ - lib/puppet/indirector/facts/json.rb
600
605
  - lib/puppet/indirector/facts/memory.rb
601
606
  - lib/puppet/indirector/facts/network_device.rb
602
607
  - lib/puppet/indirector/facts/rest.rb
@@ -627,6 +632,7 @@ files:
627
632
  - lib/puppet/indirector/memory.rb
628
633
  - lib/puppet/indirector/msgpack.rb
629
634
  - lib/puppet/indirector/node/exec.rb
635
+ - lib/puppet/indirector/node/json.rb
630
636
  - lib/puppet/indirector/node/memory.rb
631
637
  - lib/puppet/indirector/node/msgpack.rb
632
638
  - lib/puppet/indirector/node/plain.rb
@@ -635,6 +641,7 @@ files:
635
641
  - lib/puppet/indirector/node/yaml.rb
636
642
  - lib/puppet/indirector/none.rb
637
643
  - lib/puppet/indirector/plain.rb
644
+ - lib/puppet/indirector/report/json.rb
638
645
  - lib/puppet/indirector/report/msgpack.rb
639
646
  - lib/puppet/indirector/report/processor.rb
640
647
  - lib/puppet/indirector/report/rest.rb
@@ -1139,6 +1146,7 @@ files:
1139
1146
  - lib/puppet/scheduler/splay_job.rb
1140
1147
  - lib/puppet/scheduler/timer.rb
1141
1148
  - lib/puppet/settings.rb
1149
+ - lib/puppet/settings/alias_setting.rb
1142
1150
  - lib/puppet/settings/array_setting.rb
1143
1151
  - lib/puppet/settings/autosign_setting.rb
1144
1152
  - lib/puppet/settings/base_setting.rb
@@ -1247,6 +1255,7 @@ files:
1247
1255
  - lib/puppet/util/errors.rb
1248
1256
  - lib/puppet/util/execution.rb
1249
1257
  - lib/puppet/util/execution_stub.rb
1258
+ - lib/puppet/util/fact_dif.rb
1250
1259
  - lib/puppet/util/feature.rb
1251
1260
  - lib/puppet/util/file_watcher.rb
1252
1261
  - lib/puppet/util/fileparsing.rb
@@ -1401,6 +1410,7 @@ files:
1401
1410
  - man/man8/puppet.8
1402
1411
  - spec/fixtures/faulty_face/puppet/face/syntax.rb
1403
1412
  - spec/fixtures/hiera.yaml
1413
+ - spec/fixtures/integration/application/agent/cached_deferred_catalog.json
1404
1414
  - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/provider/applytest/applytest.rb
1405
1415
  - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/type/applytest.rb
1406
1416
  - spec/fixtures/integration/node/environment/sitedir/00_a.pp
@@ -1800,7 +1810,6 @@ files:
1800
1810
  - spec/integration/agent/logging_spec.rb
1801
1811
  - spec/integration/application/agent_spec.rb
1802
1812
  - spec/integration/application/apply_spec.rb
1803
- - spec/integration/application/config_spec.rb
1804
1813
  - spec/integration/application/doc_spec.rb
1805
1814
  - spec/integration/application/filebucket_spec.rb
1806
1815
  - spec/integration/application/help_spec.rb
@@ -1821,7 +1830,6 @@ files:
1821
1830
  - spec/integration/indirector/facts/facter_spec.rb
1822
1831
  - spec/integration/indirector/file_content/file_server_spec.rb
1823
1832
  - spec/integration/indirector/file_metadata/file_server_spec.rb
1824
- - spec/integration/indirector/report/yaml.rb
1825
1833
  - spec/integration/network/authconfig_spec.rb
1826
1834
  - spec/integration/network/formats_spec.rb
1827
1835
  - spec/integration/network/http/api/indirected_routes_spec.rb
@@ -1967,7 +1975,6 @@ files:
1967
1975
  - spec/unit/environments_spec.rb
1968
1976
  - spec/unit/etc_spec.rb
1969
1977
  - spec/unit/external/pson_spec.rb
1970
- - spec/unit/face/catalog_spec.rb
1971
1978
  - spec/unit/face/config_spec.rb
1972
1979
  - spec/unit/face/epp_face_spec.rb
1973
1980
  - spec/unit/face/facts_spec.rb
@@ -1979,7 +1986,6 @@ files:
1979
1986
  - spec/unit/face/module/search_spec.rb
1980
1987
  - spec/unit/face/module/uninstall_spec.rb
1981
1988
  - spec/unit/face/module/upgrade_spec.rb
1982
- - spec/unit/face/module_spec.rb
1983
1989
  - spec/unit/face/node_spec.rb
1984
1990
  - spec/unit/face/parser_spec.rb
1985
1991
  - spec/unit/face/plugin_spec.rb
@@ -2124,6 +2130,7 @@ files:
2124
2130
  - spec/unit/indirector/exec_spec.rb
2125
2131
  - spec/unit/indirector/face_spec.rb
2126
2132
  - spec/unit/indirector/facts/facter_spec.rb
2133
+ - spec/unit/indirector/facts/json_spec.rb
2127
2134
  - spec/unit/indirector/facts/network_device_spec.rb
2128
2135
  - spec/unit/indirector/facts/rest_spec.rb
2129
2136
  - spec/unit/indirector/facts/store_configs_spec.rb
@@ -2148,6 +2155,7 @@ files:
2148
2155
  - spec/unit/indirector/memory_spec.rb
2149
2156
  - spec/unit/indirector/msgpack_spec.rb
2150
2157
  - spec/unit/indirector/node/exec_spec.rb
2158
+ - spec/unit/indirector/node/json_spec.rb
2151
2159
  - spec/unit/indirector/node/memory_spec.rb
2152
2160
  - spec/unit/indirector/node/msgpack_spec.rb
2153
2161
  - spec/unit/indirector/node/plain_spec.rb
@@ -2156,6 +2164,7 @@ files:
2156
2164
  - spec/unit/indirector/node/yaml_spec.rb
2157
2165
  - spec/unit/indirector/none_spec.rb
2158
2166
  - spec/unit/indirector/plain_spec.rb
2167
+ - spec/unit/indirector/report/json_spec.rb
2159
2168
  - spec/unit/indirector/report/msgpack_spec.rb
2160
2169
  - spec/unit/indirector/report/processor_spec.rb
2161
2170
  - spec/unit/indirector/report/rest_spec.rb
@@ -2280,6 +2289,7 @@ files:
2280
2289
  - spec/unit/pops/evaluator/collections_ops_spec.rb
2281
2290
  - spec/unit/pops/evaluator/comparison_ops_spec.rb
2282
2291
  - spec/unit/pops/evaluator/conditionals_spec.rb
2292
+ - spec/unit/pops/evaluator/deferred_resolver_spec.rb
2283
2293
  - spec/unit/pops/evaluator/evaluating_parser_spec.rb
2284
2294
  - spec/unit/pops/evaluator/evaluator_rspec_helper.rb
2285
2295
  - spec/unit/pops/evaluator/json_strict_literal_evaluator_spec.rb
@@ -2670,6 +2680,7 @@ summary: Puppet, an automated configuration management tool
2670
2680
  test_files:
2671
2681
  - spec/fixtures/faulty_face/puppet/face/syntax.rb
2672
2682
  - spec/fixtures/hiera.yaml
2683
+ - spec/fixtures/integration/application/agent/cached_deferred_catalog.json
2673
2684
  - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/provider/applytest/applytest.rb
2674
2685
  - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/type/applytest.rb
2675
2686
  - spec/fixtures/integration/node/environment/sitedir/00_a.pp
@@ -3069,7 +3080,6 @@ test_files:
3069
3080
  - spec/integration/agent/logging_spec.rb
3070
3081
  - spec/integration/application/agent_spec.rb
3071
3082
  - spec/integration/application/apply_spec.rb
3072
- - spec/integration/application/config_spec.rb
3073
3083
  - spec/integration/application/doc_spec.rb
3074
3084
  - spec/integration/application/filebucket_spec.rb
3075
3085
  - spec/integration/application/help_spec.rb
@@ -3090,7 +3100,6 @@ test_files:
3090
3100
  - spec/integration/indirector/facts/facter_spec.rb
3091
3101
  - spec/integration/indirector/file_content/file_server_spec.rb
3092
3102
  - spec/integration/indirector/file_metadata/file_server_spec.rb
3093
- - spec/integration/indirector/report/yaml.rb
3094
3103
  - spec/integration/network/authconfig_spec.rb
3095
3104
  - spec/integration/network/formats_spec.rb
3096
3105
  - spec/integration/network/http/api/indirected_routes_spec.rb
@@ -3236,7 +3245,6 @@ test_files:
3236
3245
  - spec/unit/environments_spec.rb
3237
3246
  - spec/unit/etc_spec.rb
3238
3247
  - spec/unit/external/pson_spec.rb
3239
- - spec/unit/face/catalog_spec.rb
3240
3248
  - spec/unit/face/config_spec.rb
3241
3249
  - spec/unit/face/epp_face_spec.rb
3242
3250
  - spec/unit/face/facts_spec.rb
@@ -3248,7 +3256,6 @@ test_files:
3248
3256
  - spec/unit/face/module/search_spec.rb
3249
3257
  - spec/unit/face/module/uninstall_spec.rb
3250
3258
  - spec/unit/face/module/upgrade_spec.rb
3251
- - spec/unit/face/module_spec.rb
3252
3259
  - spec/unit/face/node_spec.rb
3253
3260
  - spec/unit/face/parser_spec.rb
3254
3261
  - spec/unit/face/plugin_spec.rb
@@ -3393,6 +3400,7 @@ test_files:
3393
3400
  - spec/unit/indirector/exec_spec.rb
3394
3401
  - spec/unit/indirector/face_spec.rb
3395
3402
  - spec/unit/indirector/facts/facter_spec.rb
3403
+ - spec/unit/indirector/facts/json_spec.rb
3396
3404
  - spec/unit/indirector/facts/network_device_spec.rb
3397
3405
  - spec/unit/indirector/facts/rest_spec.rb
3398
3406
  - spec/unit/indirector/facts/store_configs_spec.rb
@@ -3417,6 +3425,7 @@ test_files:
3417
3425
  - spec/unit/indirector/memory_spec.rb
3418
3426
  - spec/unit/indirector/msgpack_spec.rb
3419
3427
  - spec/unit/indirector/node/exec_spec.rb
3428
+ - spec/unit/indirector/node/json_spec.rb
3420
3429
  - spec/unit/indirector/node/memory_spec.rb
3421
3430
  - spec/unit/indirector/node/msgpack_spec.rb
3422
3431
  - spec/unit/indirector/node/plain_spec.rb
@@ -3425,6 +3434,7 @@ test_files:
3425
3434
  - spec/unit/indirector/node/yaml_spec.rb
3426
3435
  - spec/unit/indirector/none_spec.rb
3427
3436
  - spec/unit/indirector/plain_spec.rb
3437
+ - spec/unit/indirector/report/json_spec.rb
3428
3438
  - spec/unit/indirector/report/msgpack_spec.rb
3429
3439
  - spec/unit/indirector/report/processor_spec.rb
3430
3440
  - spec/unit/indirector/report/rest_spec.rb
@@ -3549,6 +3559,7 @@ test_files:
3549
3559
  - spec/unit/pops/evaluator/collections_ops_spec.rb
3550
3560
  - spec/unit/pops/evaluator/comparison_ops_spec.rb
3551
3561
  - spec/unit/pops/evaluator/conditionals_spec.rb
3562
+ - spec/unit/pops/evaluator/deferred_resolver_spec.rb
3552
3563
  - spec/unit/pops/evaluator/evaluating_parser_spec.rb
3553
3564
  - spec/unit/pops/evaluator/evaluator_rspec_helper.rb
3554
3565
  - spec/unit/pops/evaluator/json_strict_literal_evaluator_spec.rb
@@ -1,74 +0,0 @@
1
- # coding: utf-8
2
- require 'spec_helper'
3
- require 'puppet/application/config'
4
-
5
- #describe "puppet config" do
6
- describe Puppet::Face[:config, '0.0.1'] do
7
- include PuppetSpec::Files
8
-
9
- # different UTF-8 widths
10
- # 1-byte A
11
- # 2-byte ۿ - http://www.fileformat.info/info/unicode/char/06ff/index.htm - 0xDB 0xBF / 219 191
12
- # 3-byte ᚠ - http://www.fileformat.info/info/unicode/char/16A0/index.htm - 0xE1 0x9A 0xA0 / 225 154 160
13
- # 4-byte 𠜎 - http://www.fileformat.info/info/unicode/char/2070E/index.htm - 0xF0 0xA0 0x9C 0x8E / 240 160 156 142
14
- MIXED_UTF8 = "A\u06FF\u16A0\u{2070E}" # Aۿᚠ𠜎
15
-
16
- let(:tmp_config) { tmpfile('puppet.conf') }
17
- let(:config) { Puppet::Application[:config] }
18
-
19
- def read_utf8(path)
20
- File.read(tmp_config, :encoding => 'UTF-8')
21
- end
22
-
23
- def write_utf8(path, content)
24
- File.write(tmp_config, content, 0, :encoding => 'UTF-8')
25
- end
26
-
27
- it "reads a UTF-8 value" do
28
- write_utf8(tmp_config, <<~EOF)
29
- [main]
30
- tags=#{MIXED_UTF8}
31
- EOF
32
-
33
- Puppet.initialize_settings(['--config', tmp_config])
34
- config.command_line.args = ['print', 'tags' ]
35
-
36
- expect {
37
- config.run
38
- }.to exit_with(0)
39
- .and output("#{MIXED_UTF8}\n").to_stdout
40
- end
41
-
42
- it "sets a UTF-8 value" do
43
- Puppet.initialize_settings(['--config', tmp_config])
44
- config.command_line.args = ['set', 'tags', MIXED_UTF8 ]
45
-
46
- expect {
47
- config.run
48
- }.to exit_with(0)
49
-
50
- expect(read_utf8(tmp_config)).to eq(<<~EOF)
51
- [main]
52
- tags = #{MIXED_UTF8}
53
- EOF
54
- end
55
-
56
- it "deletes a key" do
57
- write_utf8(tmp_config, <<~EOF)
58
- [main]
59
- tags=#{MIXED_UTF8}
60
- EOF
61
-
62
- Puppet.initialize_settings(['--config', tmp_config])
63
- config.command_line.args = ['delete', 'tags']
64
-
65
- expect {
66
- config.run
67
- }.to exit_with(0)
68
- .and output(/Deleted setting from 'main': 'tags=#{MIXED_UTF8}'/).to_stdout
69
-
70
- expect(read_utf8(tmp_config)).to eq(<<~EOF)
71
- [main]
72
- EOF
73
- end
74
- end
@@ -1,6 +0,0 @@
1
- require 'spec_helper'
2
- require 'puppet/face'
3
-
4
- describe Puppet::Face[:catalog, '0.0.1'] do
5
- it "should actually have some testing..."
6
- end
@@ -1,3 +0,0 @@
1
- # For face related tests, look in the spec/unit/faces/module folder.
2
- # For integration tests, which test the behavior of module, look in the
3
- # spec/unit/integration folder.