puppet 6.19.1-x64-mingw32 → 6.20.0-x64-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 (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: x64-mingw32
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
@@ -512,6 +512,9 @@ files:
512
512
  - lib/puppet/feature/ssh.rb
513
513
  - lib/puppet/feature/telnet.rb
514
514
  - lib/puppet/feature/zlib.rb
515
+ - lib/puppet/ffi/posix.rb
516
+ - lib/puppet/ffi/posix/constants.rb
517
+ - lib/puppet/ffi/posix/functions.rb
515
518
  - lib/puppet/file_bucket.rb
516
519
  - lib/puppet/file_bucket/dipper.rb
517
520
  - lib/puppet/file_bucket/file.rb
@@ -686,7 +689,9 @@ files:
686
689
  - lib/puppet/indirector/errors.rb
687
690
  - lib/puppet/indirector/exec.rb
688
691
  - lib/puppet/indirector/face.rb
692
+ - lib/puppet/indirector/fact_search.rb
689
693
  - lib/puppet/indirector/facts/facter.rb
694
+ - lib/puppet/indirector/facts/json.rb
690
695
  - lib/puppet/indirector/facts/memory.rb
691
696
  - lib/puppet/indirector/facts/network_device.rb
692
697
  - lib/puppet/indirector/facts/rest.rb
@@ -717,6 +722,7 @@ files:
717
722
  - lib/puppet/indirector/memory.rb
718
723
  - lib/puppet/indirector/msgpack.rb
719
724
  - lib/puppet/indirector/node/exec.rb
725
+ - lib/puppet/indirector/node/json.rb
720
726
  - lib/puppet/indirector/node/memory.rb
721
727
  - lib/puppet/indirector/node/msgpack.rb
722
728
  - lib/puppet/indirector/node/plain.rb
@@ -725,6 +731,7 @@ files:
725
731
  - lib/puppet/indirector/node/yaml.rb
726
732
  - lib/puppet/indirector/none.rb
727
733
  - lib/puppet/indirector/plain.rb
734
+ - lib/puppet/indirector/report/json.rb
728
735
  - lib/puppet/indirector/report/msgpack.rb
729
736
  - lib/puppet/indirector/report/processor.rb
730
737
  - lib/puppet/indirector/report/rest.rb
@@ -1229,6 +1236,7 @@ files:
1229
1236
  - lib/puppet/scheduler/splay_job.rb
1230
1237
  - lib/puppet/scheduler/timer.rb
1231
1238
  - lib/puppet/settings.rb
1239
+ - lib/puppet/settings/alias_setting.rb
1232
1240
  - lib/puppet/settings/array_setting.rb
1233
1241
  - lib/puppet/settings/autosign_setting.rb
1234
1242
  - lib/puppet/settings/base_setting.rb
@@ -1337,6 +1345,7 @@ files:
1337
1345
  - lib/puppet/util/errors.rb
1338
1346
  - lib/puppet/util/execution.rb
1339
1347
  - lib/puppet/util/execution_stub.rb
1348
+ - lib/puppet/util/fact_dif.rb
1340
1349
  - lib/puppet/util/feature.rb
1341
1350
  - lib/puppet/util/file_watcher.rb
1342
1351
  - lib/puppet/util/fileparsing.rb
@@ -1491,6 +1500,7 @@ files:
1491
1500
  - man/man8/puppet.8
1492
1501
  - spec/fixtures/faulty_face/puppet/face/syntax.rb
1493
1502
  - spec/fixtures/hiera.yaml
1503
+ - spec/fixtures/integration/application/agent/cached_deferred_catalog.json
1494
1504
  - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/provider/applytest/applytest.rb
1495
1505
  - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/type/applytest.rb
1496
1506
  - spec/fixtures/integration/node/environment/sitedir/00_a.pp
@@ -1890,7 +1900,6 @@ files:
1890
1900
  - spec/integration/agent/logging_spec.rb
1891
1901
  - spec/integration/application/agent_spec.rb
1892
1902
  - spec/integration/application/apply_spec.rb
1893
- - spec/integration/application/config_spec.rb
1894
1903
  - spec/integration/application/doc_spec.rb
1895
1904
  - spec/integration/application/filebucket_spec.rb
1896
1905
  - spec/integration/application/help_spec.rb
@@ -1911,7 +1920,6 @@ files:
1911
1920
  - spec/integration/indirector/facts/facter_spec.rb
1912
1921
  - spec/integration/indirector/file_content/file_server_spec.rb
1913
1922
  - spec/integration/indirector/file_metadata/file_server_spec.rb
1914
- - spec/integration/indirector/report/yaml.rb
1915
1923
  - spec/integration/network/authconfig_spec.rb
1916
1924
  - spec/integration/network/formats_spec.rb
1917
1925
  - spec/integration/network/http/api/indirected_routes_spec.rb
@@ -2057,7 +2065,6 @@ files:
2057
2065
  - spec/unit/environments_spec.rb
2058
2066
  - spec/unit/etc_spec.rb
2059
2067
  - spec/unit/external/pson_spec.rb
2060
- - spec/unit/face/catalog_spec.rb
2061
2068
  - spec/unit/face/config_spec.rb
2062
2069
  - spec/unit/face/epp_face_spec.rb
2063
2070
  - spec/unit/face/facts_spec.rb
@@ -2069,7 +2076,6 @@ files:
2069
2076
  - spec/unit/face/module/search_spec.rb
2070
2077
  - spec/unit/face/module/uninstall_spec.rb
2071
2078
  - spec/unit/face/module/upgrade_spec.rb
2072
- - spec/unit/face/module_spec.rb
2073
2079
  - spec/unit/face/node_spec.rb
2074
2080
  - spec/unit/face/parser_spec.rb
2075
2081
  - spec/unit/face/plugin_spec.rb
@@ -2214,6 +2220,7 @@ files:
2214
2220
  - spec/unit/indirector/exec_spec.rb
2215
2221
  - spec/unit/indirector/face_spec.rb
2216
2222
  - spec/unit/indirector/facts/facter_spec.rb
2223
+ - spec/unit/indirector/facts/json_spec.rb
2217
2224
  - spec/unit/indirector/facts/network_device_spec.rb
2218
2225
  - spec/unit/indirector/facts/rest_spec.rb
2219
2226
  - spec/unit/indirector/facts/store_configs_spec.rb
@@ -2238,6 +2245,7 @@ files:
2238
2245
  - spec/unit/indirector/memory_spec.rb
2239
2246
  - spec/unit/indirector/msgpack_spec.rb
2240
2247
  - spec/unit/indirector/node/exec_spec.rb
2248
+ - spec/unit/indirector/node/json_spec.rb
2241
2249
  - spec/unit/indirector/node/memory_spec.rb
2242
2250
  - spec/unit/indirector/node/msgpack_spec.rb
2243
2251
  - spec/unit/indirector/node/plain_spec.rb
@@ -2246,6 +2254,7 @@ files:
2246
2254
  - spec/unit/indirector/node/yaml_spec.rb
2247
2255
  - spec/unit/indirector/none_spec.rb
2248
2256
  - spec/unit/indirector/plain_spec.rb
2257
+ - spec/unit/indirector/report/json_spec.rb
2249
2258
  - spec/unit/indirector/report/msgpack_spec.rb
2250
2259
  - spec/unit/indirector/report/processor_spec.rb
2251
2260
  - spec/unit/indirector/report/rest_spec.rb
@@ -2370,6 +2379,7 @@ files:
2370
2379
  - spec/unit/pops/evaluator/collections_ops_spec.rb
2371
2380
  - spec/unit/pops/evaluator/comparison_ops_spec.rb
2372
2381
  - spec/unit/pops/evaluator/conditionals_spec.rb
2382
+ - spec/unit/pops/evaluator/deferred_resolver_spec.rb
2373
2383
  - spec/unit/pops/evaluator/evaluating_parser_spec.rb
2374
2384
  - spec/unit/pops/evaluator/evaluator_rspec_helper.rb
2375
2385
  - spec/unit/pops/evaluator/json_strict_literal_evaluator_spec.rb
@@ -2760,6 +2770,7 @@ summary: Puppet, an automated configuration management tool
2760
2770
  test_files:
2761
2771
  - spec/fixtures/faulty_face/puppet/face/syntax.rb
2762
2772
  - spec/fixtures/hiera.yaml
2773
+ - spec/fixtures/integration/application/agent/cached_deferred_catalog.json
2763
2774
  - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/provider/applytest/applytest.rb
2764
2775
  - spec/fixtures/integration/application/apply/environments/spec/modules/amod/lib/puppet/type/applytest.rb
2765
2776
  - spec/fixtures/integration/node/environment/sitedir/00_a.pp
@@ -3159,7 +3170,6 @@ test_files:
3159
3170
  - spec/integration/agent/logging_spec.rb
3160
3171
  - spec/integration/application/agent_spec.rb
3161
3172
  - spec/integration/application/apply_spec.rb
3162
- - spec/integration/application/config_spec.rb
3163
3173
  - spec/integration/application/doc_spec.rb
3164
3174
  - spec/integration/application/filebucket_spec.rb
3165
3175
  - spec/integration/application/help_spec.rb
@@ -3180,7 +3190,6 @@ test_files:
3180
3190
  - spec/integration/indirector/facts/facter_spec.rb
3181
3191
  - spec/integration/indirector/file_content/file_server_spec.rb
3182
3192
  - spec/integration/indirector/file_metadata/file_server_spec.rb
3183
- - spec/integration/indirector/report/yaml.rb
3184
3193
  - spec/integration/network/authconfig_spec.rb
3185
3194
  - spec/integration/network/formats_spec.rb
3186
3195
  - spec/integration/network/http/api/indirected_routes_spec.rb
@@ -3326,7 +3335,6 @@ test_files:
3326
3335
  - spec/unit/environments_spec.rb
3327
3336
  - spec/unit/etc_spec.rb
3328
3337
  - spec/unit/external/pson_spec.rb
3329
- - spec/unit/face/catalog_spec.rb
3330
3338
  - spec/unit/face/config_spec.rb
3331
3339
  - spec/unit/face/epp_face_spec.rb
3332
3340
  - spec/unit/face/facts_spec.rb
@@ -3338,7 +3346,6 @@ test_files:
3338
3346
  - spec/unit/face/module/search_spec.rb
3339
3347
  - spec/unit/face/module/uninstall_spec.rb
3340
3348
  - spec/unit/face/module/upgrade_spec.rb
3341
- - spec/unit/face/module_spec.rb
3342
3349
  - spec/unit/face/node_spec.rb
3343
3350
  - spec/unit/face/parser_spec.rb
3344
3351
  - spec/unit/face/plugin_spec.rb
@@ -3483,6 +3490,7 @@ test_files:
3483
3490
  - spec/unit/indirector/exec_spec.rb
3484
3491
  - spec/unit/indirector/face_spec.rb
3485
3492
  - spec/unit/indirector/facts/facter_spec.rb
3493
+ - spec/unit/indirector/facts/json_spec.rb
3486
3494
  - spec/unit/indirector/facts/network_device_spec.rb
3487
3495
  - spec/unit/indirector/facts/rest_spec.rb
3488
3496
  - spec/unit/indirector/facts/store_configs_spec.rb
@@ -3507,6 +3515,7 @@ test_files:
3507
3515
  - spec/unit/indirector/memory_spec.rb
3508
3516
  - spec/unit/indirector/msgpack_spec.rb
3509
3517
  - spec/unit/indirector/node/exec_spec.rb
3518
+ - spec/unit/indirector/node/json_spec.rb
3510
3519
  - spec/unit/indirector/node/memory_spec.rb
3511
3520
  - spec/unit/indirector/node/msgpack_spec.rb
3512
3521
  - spec/unit/indirector/node/plain_spec.rb
@@ -3515,6 +3524,7 @@ test_files:
3515
3524
  - spec/unit/indirector/node/yaml_spec.rb
3516
3525
  - spec/unit/indirector/none_spec.rb
3517
3526
  - spec/unit/indirector/plain_spec.rb
3527
+ - spec/unit/indirector/report/json_spec.rb
3518
3528
  - spec/unit/indirector/report/msgpack_spec.rb
3519
3529
  - spec/unit/indirector/report/processor_spec.rb
3520
3530
  - spec/unit/indirector/report/rest_spec.rb
@@ -3639,6 +3649,7 @@ test_files:
3639
3649
  - spec/unit/pops/evaluator/collections_ops_spec.rb
3640
3650
  - spec/unit/pops/evaluator/comparison_ops_spec.rb
3641
3651
  - spec/unit/pops/evaluator/conditionals_spec.rb
3652
+ - spec/unit/pops/evaluator/deferred_resolver_spec.rb
3642
3653
  - spec/unit/pops/evaluator/evaluating_parser_spec.rb
3643
3654
  - spec/unit/pops/evaluator/evaluator_rspec_helper.rb
3644
3655
  - 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.