puppet 6.4.5-x86-mingw32 → 6.5.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 (329) hide show
  1. checksums.yaml +4 -4
  2. data/CODEOWNERS +10 -10
  3. data/Gemfile +6 -6
  4. data/Gemfile.lock +46 -52
  5. data/ext/build_defaults.yaml +0 -1
  6. data/ext/project_data.yaml +3 -3
  7. data/ext/regexp_nodes/regexp_nodes.rb +4 -4
  8. data/ext/solaris/smf/puppet.xml +0 -2
  9. data/ext/windows/eventlog/Rakefile +32 -0
  10. data/ext/windows/eventlog/puppetres.dll +0 -0
  11. data/ext/windows/eventlog/puppetres.mc +18 -0
  12. data/ext/windows/service/daemon.rb +8 -38
  13. data/install.rb +24 -6
  14. data/lib/puppet.rb +3 -1
  15. data/lib/puppet/application.rb +1 -1
  16. data/lib/puppet/application/agent.rb +11 -34
  17. data/lib/puppet/application/apply.rb +6 -6
  18. data/lib/puppet/application/describe.rb +9 -3
  19. data/lib/puppet/application/device.rb +4 -14
  20. data/lib/puppet/application/doc.rb +1 -1
  21. data/lib/puppet/application/lookup.rb +2 -2
  22. data/lib/puppet/application/resource.rb +4 -4
  23. data/lib/puppet/application/script.rb +2 -2
  24. data/lib/puppet/application/ssl.rb +10 -9
  25. data/lib/puppet/configurer.rb +30 -86
  26. data/lib/puppet/configurer/downloader.rb +6 -2
  27. data/lib/puppet/defaults.rb +50 -44
  28. data/lib/puppet/error.rb +14 -9
  29. data/lib/puppet/face/catalog.rb +20 -1
  30. data/lib/puppet/face/config.rb +48 -10
  31. data/lib/puppet/face/facts.rb +1 -1
  32. data/lib/puppet/face/help.rb +1 -1
  33. data/lib/puppet/face/module/list.rb +5 -5
  34. data/lib/puppet/face/module/search.rb +1 -1
  35. data/lib/puppet/face/module/uninstall.rb +1 -1
  36. data/lib/puppet/face/module/upgrade.rb +1 -1
  37. data/lib/puppet/face/parser.rb +48 -9
  38. data/lib/puppet/face/plugin.rb +2 -9
  39. data/lib/puppet/file_serving/http_metadata.rb +1 -1
  40. data/lib/puppet/file_system.rb +12 -2
  41. data/lib/puppet/file_system/file_impl.rb +6 -3
  42. data/lib/puppet/file_system/memory_file.rb +1 -1
  43. data/lib/puppet/file_system/posix.rb +2 -3
  44. data/lib/puppet/forge.rb +3 -3
  45. data/lib/puppet/functions.rb +2 -1
  46. data/lib/puppet/functions/camelcase.rb +2 -2
  47. data/lib/puppet/functions/epp.rb +4 -4
  48. data/lib/puppet/functions/find_file.rb +9 -9
  49. data/lib/puppet/functions/inline_epp.rb +5 -5
  50. data/lib/puppet/functions/regsubst.rb +6 -8
  51. data/lib/puppet/gettext/module_translations.rb +1 -1
  52. data/lib/puppet/graph/rb_tree_map.rb +2 -2
  53. data/lib/puppet/graph/simple_graph.rb +3 -4
  54. data/lib/puppet/indirector/catalog/compiler.rb +5 -11
  55. data/lib/puppet/indirector/file_bucket_file/file.rb +1 -1
  56. data/lib/puppet/indirector/hiera.rb +0 -2
  57. data/lib/puppet/indirector/resource/ral.rb +3 -1
  58. data/lib/puppet/indirector/resource/validator.rb +1 -1
  59. data/lib/puppet/interface.rb +1 -2
  60. data/lib/puppet/loaders.rb +1 -0
  61. data/lib/puppet/metatype/manager.rb +1 -1
  62. data/lib/puppet/module.rb +1 -1
  63. data/lib/puppet/module/task.rb +4 -20
  64. data/lib/puppet/module_tool/applications/installer.rb +1 -1
  65. data/lib/puppet/module_tool/applications/uninstaller.rb +3 -3
  66. data/lib/puppet/module_tool/metadata.rb +1 -1
  67. data/lib/puppet/module_tool/shared_behaviors.rb +4 -4
  68. data/lib/puppet/module_tool/tar/mini.rb +2 -12
  69. data/lib/puppet/network/http/api/indirected_routes.rb +11 -12
  70. data/lib/puppet/network/http/connection.rb +12 -10
  71. data/lib/puppet/network/http/factory.rb +11 -1
  72. data/lib/puppet/network/http/pool.rb +0 -2
  73. data/lib/puppet/network/http/site.rb +1 -1
  74. data/lib/puppet/network/resolver.rb +2 -2
  75. data/lib/puppet/node/environment.rb +2 -4
  76. data/lib/puppet/pal/pal_impl.rb +2 -2
  77. data/lib/puppet/parser/ast.rb +1 -1
  78. data/lib/puppet/parser/ast/resourceparam.rb +1 -1
  79. data/lib/puppet/parser/functions.rb +1 -1
  80. data/lib/puppet/parser/functions/epp.rb +3 -3
  81. data/lib/puppet/parser/functions/fail.rb +8 -1
  82. data/lib/puppet/parser/functions/inline_epp.rb +5 -5
  83. data/lib/puppet/parser/scope.rb +7 -8
  84. data/lib/puppet/pops/evaluator/collectors/catalog_collector.rb +1 -1
  85. data/lib/puppet/pops/evaluator/collectors/exported_collector.rb +1 -1
  86. data/lib/puppet/pops/evaluator/external_syntax_support.rb +2 -3
  87. data/lib/puppet/pops/evaluator/runtime3_support.rb +4 -4
  88. data/lib/puppet/pops/loader/null_loader.rb +60 -0
  89. data/lib/puppet/pops/loader/ruby_legacy_function_instantiator.rb +6 -4
  90. data/lib/puppet/pops/loader/task_instantiator.rb +0 -4
  91. data/lib/puppet/pops/loaders.rb +1 -1
  92. data/lib/puppet/pops/lookup/hiera_config.rb +0 -1
  93. data/lib/puppet/pops/lookup/sub_lookup.rb +1 -1
  94. data/lib/puppet/pops/merge_strategy.rb +18 -22
  95. data/lib/puppet/pops/parser/heredoc_support.rb +1 -1
  96. data/lib/puppet/pops/parser/interpolation_support.rb +4 -4
  97. data/lib/puppet/pops/parser/locator.rb +1 -1
  98. data/lib/puppet/pops/parser/pn_parser.rb +16 -17
  99. data/lib/puppet/pops/puppet_stack.rb +49 -51
  100. data/lib/puppet/pops/types/p_sensitive_type.rb +1 -1
  101. data/lib/puppet/pops/types/string_converter.rb +10 -10
  102. data/lib/puppet/pops/types/types.rb +6 -5
  103. data/lib/puppet/property.rb +1 -1
  104. data/lib/puppet/property/ensure.rb +1 -1
  105. data/lib/puppet/provider/exec.rb +2 -6
  106. data/lib/puppet/provider/file/posix.rb +0 -5
  107. data/lib/puppet/provider/nameservice.rb +3 -10
  108. data/lib/puppet/provider/nameservice/directoryservice.rb +1 -1
  109. data/lib/puppet/provider/nameservice/pw.rb +2 -2
  110. data/lib/puppet/provider/package.rb +0 -2
  111. data/lib/puppet/provider/package/apt.rb +1 -5
  112. data/lib/puppet/provider/package/dnf.rb +1 -1
  113. data/lib/puppet/provider/package/dpkg.rb +18 -34
  114. data/lib/puppet/provider/package/openbsd.rb +1 -1
  115. data/lib/puppet/provider/package/pip.rb +13 -37
  116. data/lib/puppet/provider/package/portage.rb +4 -4
  117. data/lib/puppet/provider/package/puppet_gem.rb +1 -1
  118. data/lib/puppet/provider/package/rpm.rb +18 -56
  119. data/lib/puppet/provider/package/windows/package.rb +1 -1
  120. data/lib/puppet/provider/package/yum.rb +5 -9
  121. data/lib/puppet/provider/package_targetable.rb +4 -7
  122. data/lib/puppet/provider/parsedfile.rb +1 -1
  123. data/lib/puppet/provider/service/daemontools.rb +9 -9
  124. data/lib/puppet/provider/service/launchd.rb +5 -20
  125. data/lib/puppet/provider/service/openbsd.rb +1 -1
  126. data/lib/puppet/provider/service/rcng.rb +2 -2
  127. data/lib/puppet/provider/service/runit.rb +8 -2
  128. data/lib/puppet/provider/service/systemd.rb +19 -14
  129. data/lib/puppet/provider/service/windows.rb +0 -8
  130. data/lib/puppet/provider/user/directoryservice.rb +1 -1
  131. data/lib/puppet/provider/user/hpux.rb +1 -1
  132. data/lib/puppet/provider/user/pw.rb +3 -12
  133. data/lib/puppet/provider/user/user_role_add.rb +1 -5
  134. data/lib/puppet/provider/user/useradd.rb +20 -45
  135. data/lib/puppet/provider/user/windows_adsi.rb +5 -4
  136. data/lib/puppet/reference/configuration.rb +3 -3
  137. data/lib/puppet/reference/indirection.rb +2 -2
  138. data/lib/puppet/reference/metaparameter.rb +3 -1
  139. data/lib/puppet/reference/providers.rb +3 -1
  140. data/lib/puppet/reference/type.rb +9 -3
  141. data/lib/puppet/reports.rb +1 -1
  142. data/lib/puppet/resource.rb +1 -18
  143. data/lib/puppet/resource/catalog.rb +1 -1
  144. data/lib/puppet/rest/routes.rb +30 -17
  145. data/lib/puppet/settings.rb +3 -43
  146. data/lib/puppet/settings/environment_conf.rb +0 -1
  147. data/lib/puppet/ssl/certificate_request.rb +12 -2
  148. data/lib/puppet/ssl/host.rb +2 -2
  149. data/lib/puppet/ssl/oids.rb +1 -1
  150. data/lib/puppet/ssl/ssl_provider.rb +11 -5
  151. data/lib/puppet/ssl/state_machine.rb +102 -98
  152. data/lib/puppet/test/test_helper.rb +1 -0
  153. data/lib/puppet/transaction.rb +11 -33
  154. data/lib/puppet/transaction/report.rb +1 -1
  155. data/lib/puppet/type.rb +4 -2
  156. data/lib/puppet/type/exec.rb +17 -23
  157. data/lib/puppet/type/file.rb +39 -11
  158. data/lib/puppet/type/file/data_sync.rb +1 -5
  159. data/lib/puppet/type/group.rb +2 -4
  160. data/lib/puppet/type/notify.rb +3 -4
  161. data/lib/puppet/type/package.rb +3 -20
  162. data/lib/puppet/type/schedule.rb +1 -1
  163. data/lib/puppet/type/service.rb +3 -8
  164. data/lib/puppet/type/user.rb +2 -4
  165. data/lib/puppet/util.rb +29 -39
  166. data/lib/puppet/util/command_line/trollop.rb +1 -1
  167. data/lib/puppet/util/execution.rb +3 -4
  168. data/lib/puppet/util/http_proxy.rb +19 -27
  169. data/lib/puppet/util/log.rb +2 -2
  170. data/lib/puppet/util/log/destinations.rb +2 -2
  171. data/lib/puppet/util/logging.rb +20 -32
  172. data/lib/puppet/util/metric.rb +2 -2
  173. data/lib/puppet/util/monkey_patches.rb +33 -0
  174. data/lib/puppet/util/pidlock.rb +2 -3
  175. data/lib/puppet/util/provider_features.rb +4 -2
  176. data/lib/puppet/util/rdoc.rb +1 -1
  177. data/lib/puppet/util/reference.rb +1 -1
  178. data/lib/puppet/util/resource_template.rb +1 -1
  179. data/lib/puppet/util/selinux.rb +2 -8
  180. data/lib/puppet/util/skip_tags.rb +4 -0
  181. data/lib/puppet/util/windows/adsi.rb +18 -48
  182. data/lib/puppet/util/windows/process.rb +8 -8
  183. data/lib/puppet/util/windows/registry.rb +5 -7
  184. data/lib/puppet/util/windows/security.rb +0 -2
  185. data/lib/puppet/util/windows/service.rb +4 -149
  186. data/lib/puppet/util/windows/sid.rb +0 -1
  187. data/lib/puppet/vendor.rb +1 -1
  188. data/lib/puppet/version.rb +1 -1
  189. data/lib/puppet/x509/cert_provider.rb +81 -24
  190. data/locales/puppet.pot +462 -482
  191. data/man/man5/puppet.conf.5 +43 -44
  192. data/man/man8/puppet-agent.8 +1 -1
  193. data/man/man8/puppet-apply.8 +3 -3
  194. data/man/man8/puppet-catalog.8 +31 -3
  195. data/man/man8/puppet-config.8 +1 -1
  196. data/man/man8/puppet-describe.8 +1 -1
  197. data/man/man8/puppet-device.8 +1 -1
  198. data/man/man8/puppet-doc.8 +1 -1
  199. data/man/man8/puppet-epp.8 +1 -1
  200. data/man/man8/puppet-facts.8 +1 -1
  201. data/man/man8/puppet-filebucket.8 +1 -1
  202. data/man/man8/puppet-generate.8 +1 -1
  203. data/man/man8/puppet-help.8 +1 -1
  204. data/man/man8/puppet-key.8 +1 -1
  205. data/man/man8/puppet-lookup.8 +1 -1
  206. data/man/man8/puppet-man.8 +1 -1
  207. data/man/man8/puppet-module.8 +1 -1
  208. data/man/man8/puppet-node.8 +1 -1
  209. data/man/man8/puppet-parser.8 +1 -1
  210. data/man/man8/puppet-plugin.8 +1 -1
  211. data/man/man8/puppet-report.8 +1 -1
  212. data/man/man8/puppet-resource.8 +1 -1
  213. data/man/man8/puppet-script.8 +1 -1
  214. data/man/man8/puppet-ssl.8 +1 -1
  215. data/man/man8/puppet-status.8 +1 -1
  216. data/man/man8/puppet.8 +3 -3
  217. data/spec/fixtures/ssl/127.0.0.1-key.pem +56 -56
  218. data/spec/fixtures/ssl/127.0.0.1.pem +27 -27
  219. data/spec/fixtures/ssl/bad-basic-constraints.pem +32 -32
  220. data/spec/fixtures/ssl/bad-int-basic-constraints.pem +30 -30
  221. data/spec/fixtures/ssl/ca.pem +30 -30
  222. data/spec/fixtures/ssl/crl.pem +15 -15
  223. data/spec/fixtures/ssl/ec-key.pem +18 -0
  224. data/spec/fixtures/ssl/ec.pem +40 -0
  225. data/spec/fixtures/ssl/encrypted-ec-key.pem +21 -0
  226. data/spec/fixtures/ssl/encrypted-key.pem +57 -57
  227. data/spec/fixtures/ssl/intermediate-agent-crl.pem +16 -16
  228. data/spec/fixtures/ssl/intermediate-agent.pem +33 -33
  229. data/spec/fixtures/ssl/intermediate-crl.pem +17 -17
  230. data/spec/fixtures/ssl/intermediate.pem +31 -31
  231. data/spec/fixtures/ssl/pluto-key.pem +56 -56
  232. data/spec/fixtures/ssl/pluto.pem +28 -28
  233. data/spec/fixtures/ssl/request-key.pem +56 -56
  234. data/spec/fixtures/ssl/request.pem +24 -24
  235. data/spec/fixtures/ssl/revoked-key.pem +56 -56
  236. data/spec/fixtures/ssl/revoked.pem +25 -25
  237. data/spec/fixtures/ssl/signed-key.pem +56 -56
  238. data/spec/fixtures/ssl/signed.pem +25 -25
  239. data/spec/fixtures/ssl/tampered-cert.pem +27 -27
  240. data/spec/fixtures/ssl/tampered-csr.pem +24 -24
  241. data/spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/lib/puppet/parser/functions/func_with_syntax_error.rb +9 -0
  242. data/spec/fixtures/vcr/cassettes/Puppet_Network_HTTP_Connection/when_handling_requests/_request_get/should_yield_to_the_block.yml +24 -0
  243. data/spec/fixtures/vcr/cassettes/Puppet_Network_HTTP_Connection/when_handling_requests/_request_head/should_yield_to_the_block.yml +24 -0
  244. data/spec/fixtures/vcr/cassettes/Puppet_Network_HTTP_Connection/when_handling_requests/_request_post/should_yield_to_the_block.yml +24 -0
  245. data/spec/integration/configurer_spec.rb +0 -52
  246. data/spec/integration/provider/service/init_spec.rb +1 -0
  247. data/spec/integration/provider/service/systemd_spec.rb +5 -8
  248. data/spec/integration/type/file_spec.rb +38 -28
  249. data/spec/integration/util/execution_spec.rb +0 -27
  250. data/spec/lib/puppet/certificate_factory.rb +2 -2
  251. data/spec/lib/puppet/test_ca.rb +17 -4
  252. data/spec/lib/puppet_spec/fixtures.rb +4 -0
  253. data/spec/spec_helper.rb +0 -28
  254. data/spec/unit/application/agent_spec.rb +34 -67
  255. data/spec/unit/application/device_spec.rb +1 -27
  256. data/spec/unit/application/ssl_spec.rb +60 -35
  257. data/spec/unit/configurer_spec.rb +399 -395
  258. data/spec/unit/defaults_spec.rb +4 -4
  259. data/spec/unit/face/facts_spec.rb +0 -9
  260. data/spec/unit/face/parser_spec.rb +69 -22
  261. data/spec/unit/face/plugin_spec.rb +0 -8
  262. data/spec/unit/file_system_spec.rb +30 -1
  263. data/spec/unit/forge/forge_spec.rb +3 -1
  264. data/spec/unit/forge/repository_spec.rb +3 -1
  265. data/spec/unit/indirector/catalog/compiler_spec.rb +5 -62
  266. data/spec/unit/indirector/resource/ral_spec.rb +4 -4
  267. data/spec/unit/module_tool/tar/mini_spec.rb +1 -1
  268. data/spec/unit/network/http/api/indirected_routes_spec.rb +10 -25
  269. data/spec/unit/network/http/connection_spec.rb +145 -119
  270. data/spec/unit/network/http/factory_spec.rb +5 -27
  271. data/spec/unit/parser/scope_spec.rb +0 -10
  272. data/spec/unit/pops/evaluator/evaluating_parser_spec.rb +3 -8
  273. data/spec/unit/pops/loaders/loaders_spec.rb +4 -0
  274. data/spec/unit/pops/loaders/module_loaders_spec.rb +0 -37
  275. data/spec/unit/pops/types/types_spec.rb +27 -0
  276. data/spec/unit/provider/exec_spec.rb +0 -209
  277. data/spec/unit/provider/package/aptrpm_spec.rb +1 -1
  278. data/spec/unit/provider/package/dnf_spec.rb +0 -7
  279. data/spec/unit/provider/package/dpkg_spec.rb +80 -240
  280. data/spec/unit/provider/package/pip_spec.rb +8 -61
  281. data/spec/unit/provider/package/portage_spec.rb +4 -4
  282. data/spec/unit/provider/package/rpm_spec.rb +16 -150
  283. data/spec/unit/provider/package/yum_spec.rb +0 -7
  284. data/spec/unit/provider/service/daemontools_spec.rb +0 -24
  285. data/spec/unit/provider/service/launchd_spec.rb +0 -28
  286. data/spec/unit/provider/service/runit_spec.rb +0 -24
  287. data/spec/unit/provider/service/systemd_spec.rb +25 -39
  288. data/spec/unit/provider/service/windows_spec.rb +0 -20
  289. data/spec/unit/provider/user/hpux_spec.rb +2 -2
  290. data/spec/unit/provider/user/pw_spec.rb +0 -37
  291. data/spec/unit/provider/user/useradd_spec.rb +0 -88
  292. data/spec/unit/resource_spec.rb +1 -26
  293. data/spec/unit/ssl/host_spec.rb +5 -0
  294. data/spec/unit/ssl/ssl_provider_spec.rb +36 -11
  295. data/spec/unit/ssl/state_machine_spec.rb +233 -158
  296. data/spec/unit/transaction_spec.rb +0 -64
  297. data/spec/unit/type/exec_spec.rb +12 -15
  298. data/spec/unit/type/file/content_spec.rb +3 -9
  299. data/spec/unit/type/file/source_spec.rb +4 -4
  300. data/spec/unit/type/file_spec.rb +15 -11
  301. data/spec/unit/type/package_spec.rb +0 -5
  302. data/spec/unit/type/schedule_spec.rb +1 -3
  303. data/spec/unit/type/service_spec.rb +0 -16
  304. data/spec/unit/util/execution_spec.rb +0 -16
  305. data/spec/unit/util/http_proxy_spec.rb +21 -151
  306. data/spec/unit/util/ldap/manager_spec.rb +0 -15
  307. data/spec/unit/util/log/destinations_spec.rb +3 -7
  308. data/spec/unit/util/log_spec.rb +138 -0
  309. data/spec/unit/util/logging_spec.rb +0 -200
  310. data/spec/unit/util/pidlock_spec.rb +0 -26
  311. data/spec/unit/util/skip_tags_spec.rb +14 -0
  312. data/spec/unit/util/windows/adsi_spec.rb +0 -51
  313. data/spec/unit/util/windows/service_spec.rb +0 -9
  314. data/spec/unit/util_spec.rb +10 -0
  315. data/spec/unit/x509/cert_provider_spec.rb +82 -43
  316. data/tasks/generate_cert_fixtures.rake +13 -1
  317. data/tasks/manpages.rake +0 -1
  318. metadata +28 -22
  319. data/ext/cert_inspector +0 -140
  320. data/ext/envpuppet +0 -139
  321. data/ext/envpuppet.bat +0 -14
  322. data/ext/puppet-test +0 -476
  323. data/ext/pure_ruby_dsl/dsl_test.rb +0 -7
  324. data/ext/upload_facts.rb +0 -119
  325. data/lib/puppet/provider/package/dnfmodule.rb +0 -87
  326. data/spec/fixtures/unit/provider/package/dnfmodule/dnf-module-list-installed.txt +0 -11
  327. data/spec/integration/type/notify_spec.rb +0 -46
  328. data/spec/unit/provider/package/dnfmodule_spec.rb +0 -186
  329. data/spec/unit/provider/package_targetable_spec.rb +0 -60
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- osfamilies = { 'windows' => ['pip.exe'], 'other' => ['pip', 'pip-python', 'pip2', 'pip-2'] }
3
+ osfamilies = { 'windows' => ['pip.exe'], 'other' => ['pip', 'pip-python'] }
4
4
 
5
5
  describe Puppet::Type.type(:package).provider(:pip) do
6
6
 
@@ -29,14 +29,6 @@ describe Puppet::Type.type(:package).provider(:pip) do
29
29
  })
30
30
  end
31
31
 
32
- it "should correctly parse arbitrary equality" do
33
- expect(described_class.parse("real_package===1.2.5")).to eq({
34
- :ensure => "1.2.5",
35
- :name => "real_package",
36
- :provider => :pip,
37
- })
38
- end
39
-
40
32
  it "should return nil on invalid input" do
41
33
  expect(described_class.parse("foo")).to eq(nil)
42
34
  end
@@ -153,7 +145,7 @@ describe Puppet::Type.type(:package).provider(:pip) do
153
145
  context "latest" do
154
146
  context "with pip version < 1.5.4" do
155
147
  before :each do
156
- allow(described_class).to receive(:pip_version).with("/fake/bin/pip").and_return('1.0.1')
148
+ allow(@provider).to receive(:pip_version).with("/fake/bin/pip").and_return('1.0.1')
157
149
  allow(described_class).to receive(:which).with('pip').and_return("/fake/bin/pip")
158
150
  allow(described_class).to receive(:which).with('pip-python').and_return("/fake/bin/pip")
159
151
  allow(described_class).to receive(:which).with('pip.exe').and_return("/fake/bin/pip")
@@ -205,25 +197,18 @@ describe Puppet::Type.type(:package).provider(:pip) do
205
197
  @resource[:name] = "fake_package"
206
198
  expect(@provider.latest).to eq(nil)
207
199
  end
208
-
209
- it "should use 'install_options' when specified" do
210
- expect(Puppet::Util::Execution).to receive(:execpipe).with(array_including([["--index=https://fake.example.com"]])).once
211
- @resource[:name] = "fake_package"
212
- @resource[:install_options] = ['--index' => 'https://fake.example.com']
213
- expect(@provider.latest).to eq(nil)
214
- end
215
200
  end
216
201
 
217
202
  context "with pip version >= 1.5.4" do
218
203
  # For Pip 1.5.4 and above, you can get a version list from CLI - which allows for native pip behavior
219
204
  # with regards to custom repositories, proxies and the like
220
205
  before :each do
221
- allow(described_class).to receive(:pip_version).with("/fake/bin/pip").and_return('1.5.4')
222
206
  allow(described_class).to receive(:which).with('pip').and_return("/fake/bin/pip")
223
207
  allow(described_class).to receive(:which).with('pip-python').and_return("/fake/bin/pip")
224
208
  allow(described_class).to receive(:which).with('pip.exe').and_return("/fake/bin/pip")
225
209
  allow(described_class).to receive(:provider_command).and_return('/fake/bin/pip')
226
210
  allow(described_class).to receive(:validate_command).with('/fake/bin/pip')
211
+ allow(@provider).to receive(:pip_version).with("/fake/bin/pip").and_return('1.5.4')
227
212
  end
228
213
 
229
214
  it "should find a version number for real_package" do
@@ -266,13 +251,6 @@ describe Puppet::Type.type(:package).provider(:pip) do
266
251
  latest = @provider.latest
267
252
  expect(latest).to eq('15.0.2')
268
253
  end
269
-
270
- it "should use 'install_options' when specified" do
271
- expect(Puppet::Util::Execution).to receive(:execpipe).with(array_including([["--index=https://fake.example.com"]])).once
272
- @resource[:name] = "fake_package"
273
- @resource[:install_options] = ['--index' => 'https://fake.example.com']
274
- expect(@provider.latest).to eq(nil)
275
- end
276
254
  end
277
255
  end
278
256
 
@@ -363,43 +341,12 @@ describe Puppet::Type.type(:package).provider(:pip) do
363
341
  end
364
342
 
365
343
  context "pip_version" do
366
- let(:pip) { '/fake/bin/pip' }
367
-
368
344
  it "should look up version if pip is present" do
369
- allow(described_class).to receive(:pip_cmd).and_return(pip)
370
- process = ['pip 8.0.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)']
371
- allow(described_class).to receive(:execpipe).with([pip, '--version']).and_yield(process)
372
-
373
- expect(described_class.pip_version(pip)).to eq('8.0.2')
374
- end
375
-
376
- it "parses multiple lines of output" do
377
- allow(described_class).to receive(:pip_cmd).and_return(pip)
378
- process = [
379
- "/usr/local/lib/python2.7/dist-packages/urllib3/contrib/socks.py:37: DependencyWarning: SOCKS support in urllib3 requires the installation of optional dependencies: specifically, PySocks. For more information, see https://urllib3.readthedocs.io/en/latest/contrib.html#socks-proxies",
380
- " DependencyWarning",
381
- "pip 1.5.6 from /usr/lib/python2.7/dist-packages (python 2.7)"
382
- ]
383
- allow(described_class).to receive(:execpipe).with([pip, '--version']).and_yield(process)
384
-
385
- expect(described_class.pip_version(pip)).to eq('1.5.6')
386
- end
387
-
388
- it "raises if there isn't a version string" do
389
- allow(described_class).to receive(:pip_cmd).and_return(pip)
390
- allow(described_class).to receive(:execpipe).with([pip, '--version']).and_yield([""])
391
- expect {
392
- described_class.pip_version(pip)
393
- }.to raise_error(Puppet::Error, 'Cannot resolve pip version')
394
- end
395
-
396
- it "quotes commands with spaces" do
397
- pip = 'C:\Program Files\Python27\Scripts\pip.exe'
398
- allow(described_class).to receive(:pip_cmd).and_return(pip)
399
- process = ["pip 18.1 from c:\program files\python27\lib\site-packages\pip (python 2.7)\r\n"]
400
- allow(described_class).to receive(:execpipe).with(["\"#{pip}\"", '--version']).and_yield(process)
401
-
402
- expect(described_class.pip_version(pip)).to eq('18.1')
345
+ allow(described_class).to receive(:pip_cmd).and_return('/fake/bin/pip')
346
+ p = double("process")
347
+ expect(p).to receive(:collect).and_yield('pip 8.0.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)')
348
+ expect(described_class).to receive(:execpipe).with(['/fake/bin/pip', '--version']).and_yield(p)
349
+ expect(described_class.pip_version('/fake/bin/pip')).to eq('8.0.2')
403
350
  end
404
351
  end
405
352
 
@@ -44,13 +44,13 @@ describe Puppet::Type.type(:package).provider(:portage) do
44
44
  allow(@unslotted_provider).to receive(:qatom).and_return({:category=>"dev-lang", :pn=>"ruby", :pv=>nil, :pr=>nil, :slot=>nil, :pfx=>nil, :sfx=>nil})
45
45
  allow(@unslotted_provider.class).to receive(:emerge).with('--list-sets').and_return(package_sets)
46
46
  @slotted_provider = described_class.new(@slotted_resource)
47
- allow(@slotted_provider).to receive(:qatom).and_return({:category=>"dev-lang", :pn=>"ruby", :pv=>nil, :pr=>nil, :slot=>"2.1", :pfx=>nil, :sfx=>nil})
47
+ allow(@slotted_provider).to receive(:qatom).and_return({:category=>"dev-lang", :pn=>"ruby", :pv=>nil, :pr=>nil, :slot=>":2.1", :pfx=>nil, :sfx=>nil})
48
48
  allow(@slotted_provider.class).to receive(:emerge).with('--list-sets').and_return(package_sets)
49
49
  @versioned_provider = described_class.new(@versioned_resource)
50
50
  allow(@versioned_provider).to receive(:qatom).and_return({:category=>"dev-lang", :pn=>"ruby", :pv=>"1.9.3", :pr=>nil, :slot=>nil, :pfx=>"=", :sfx=>nil})
51
51
  allow(@versioned_provider.class).to receive(:emerge).with('--list-sets').and_return(package_sets)
52
52
  @versioned_slotted_provider = described_class.new(@versioned_slotted_resource)
53
- allow(@versioned_slotted_provider).to receive(:qatom).and_return({:category=>"dev-lang", :pn=>"ruby", :pv=>"1.9.3", :pr=>nil, :slot=>"1.9", :pfx=>"=", :sfx=>nil})
53
+ allow(@versioned_slotted_provider).to receive(:qatom).and_return({:category=>"dev-lang", :pn=>"ruby", :pv=>"1.9.3", :pr=>nil, :slot=>":1.9", :pfx=>"=", :sfx=>nil})
54
54
  allow(@versioned_slotted_provider.class).to receive(:emerge).with('--list-sets').and_return(package_sets)
55
55
  @set_provider = described_class.new(@set_resource)
56
56
  allow(@set_provider).to receive(:qatom).and_return({:category=>nil, :pn=>"@system", :pv=>nil, :pr=>nil, :slot=>nil, :pfx=>nil, :sfx=>nil})
@@ -180,7 +180,7 @@ describe Puppet::Type.type(:package).provider(:portage) do
180
180
  end
181
181
 
182
182
  it "can extract the slot from the package name" do
183
- expect(@slotted_provider.qatom[:slot]).to eq('2.1')
183
+ expect(@slotted_provider.qatom[:slot]).to eq(':2.1')
184
184
  end
185
185
 
186
186
  it "returns nil for as the slot when no slot is specified" do
@@ -196,7 +196,7 @@ describe Puppet::Type.type(:package).provider(:portage) do
196
196
  expect(@versioned_slotted_provider.qatom[:category]).to eq('dev-lang')
197
197
  expect(@versioned_slotted_provider.qatom[:pn]).to eq('ruby')
198
198
  expect(@versioned_slotted_provider.qatom[:pv]).to eq('1.9.3')
199
- expect(@versioned_slotted_provider.qatom[:slot]).to eq('1.9')
199
+ expect(@versioned_slotted_provider.qatom[:slot]).to eq(':1.9')
200
200
  end
201
201
 
202
202
  it "can handle search output with slots for unslotted packages" do
@@ -9,8 +9,6 @@ describe Puppet::Type.type(:package).provider(:rpm) do
9
9
  myresource 0 1.2.3.4 5.el4 noarch
10
10
  mysummaryless 0 1.2.3.4 5.el4 noarch
11
11
  tomcat 1 1.2.3.4 5.el4 x86_64
12
- kernel 1 1.2.3.4 5.el4 x86_64
13
- kernel 1 1.2.3.6 5.el4 x86_64
14
12
  '
15
13
  RPM_OUTPUT
16
14
  end
@@ -59,7 +57,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
59
57
  describe "with a modern version of RPM" do
60
58
  it "includes all the modern flags" do
61
59
  expect(Puppet::Util::Execution).to receive(:execpipe)
62
- .with("/bin/rpm -qa --nosignature --nodigest --qf '#{nevra_format}' | sort")
60
+ .with("/bin/rpm -qa --nosignature --nodigest --qf '#{nevra_format}'")
63
61
  .and_yield(packages)
64
62
 
65
63
  described_class.instances
@@ -71,7 +69,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
71
69
 
72
70
  it "excludes the --nosignature flag" do
73
71
  expect(Puppet::Util::Execution).to receive(:execpipe)
74
- .with("/bin/rpm -qa --nodigest --qf '#{nevra_format}' | sort")
72
+ .with("/bin/rpm -qa --nodigest --qf '#{nevra_format}'")
75
73
  .and_yield(packages)
76
74
 
77
75
  described_class.instances
@@ -83,7 +81,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
83
81
 
84
82
  it "excludes the --nodigest flag" do
85
83
  expect(Puppet::Util::Execution).to receive(:execpipe)
86
- .with("/bin/rpm -qa --qf '#{nevra_format}' | sort")
84
+ .with("/bin/rpm -qa --qf '#{nevra_format}'")
87
85
  .and_yield(packages)
88
86
 
89
87
  described_class.instances
@@ -92,7 +90,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
92
90
 
93
91
  it "returns an array of packages" do
94
92
  expect(Puppet::Util::Execution).to receive(:execpipe)
95
- .with("/bin/rpm -qa --nosignature --nodigest --qf '#{nevra_format}' | sort")
93
+ .with("/bin/rpm -qa --nosignature --nodigest --qf '#{nevra_format}'")
96
94
  .and_yield(packages)
97
95
 
98
96
  installed_packages = described_class.instances
@@ -163,17 +161,6 @@ describe Puppet::Type.type(:package).provider(:rpm) do
163
161
  :ensure => "1:1.2.3.4-5.el4",
164
162
  }
165
163
  )
166
- expect(installed_packages[6].properties).to eq(
167
- {
168
- :provider => :rpm,
169
- :name => "kernel",
170
- :epoch => "1",
171
- :version => "1.2.3.4",
172
- :release => "5.el4",
173
- :arch => "x86_64",
174
- :ensure => "1:1.2.3.4-5.el4; 1:1.2.3.6-5.el4",
175
- }
176
- )
177
164
  end
178
165
  end
179
166
 
@@ -231,7 +218,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
231
218
  it "retrieves version string after querying rpm for version from source file" do
232
219
  expect(resource).to receive(:[]).with(:source).and_return('source-string')
233
220
  expect(Puppet::Util::Execution).to receive(:execute)
234
- .with(["/bin/rpm", "-q", "--qf", "#{nevra_format}", "-p", "source-string"])
221
+ .with(["/bin/rpm", "-q", "--qf", "'#{nevra_format}'", "-p", "source-string"])
235
222
  .and_return(Puppet::Util::Execution::ProcessOutput.new("myresource 0 1.2.3.4 5.el4 noarch\n", 0))
236
223
  expect(provider.latest).to eq("1.2.3.4-5.el4")
237
224
  end
@@ -239,7 +226,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
239
226
  it "raises an error if the rpm command fails" do
240
227
  expect(resource).to receive(:[]).with(:source).and_return('source-string')
241
228
  expect(Puppet::Util::Execution).to receive(:execute)
242
- .with(["/bin/rpm", "-q", "--qf", "#{nevra_format}", "-p", "source-string"])
229
+ .with(["/bin/rpm", "-q", "--qf", "'#{nevra_format}'", "-p", "source-string"])
243
230
  .and_raise(Puppet::ExecutionFailure, 'rpm command failed')
244
231
 
245
232
  expect {
@@ -261,7 +248,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
261
248
 
262
249
  before(:each) do
263
250
  expect(Puppet::Util::Execution).to receive(:execute)
264
- .with(["/bin/rpm", "-q", resource_name, '', '', '--qf', "#{nevra_format}"], execute_options)
251
+ .with(["/bin/rpm", "-q", resource_name, '', '', '--qf', "'#{nevra_format}'"], execute_options)
265
252
  .and_return(Puppet::Util::Execution::ProcessOutput.new("#{resource_name} 0 1.2.3.4 5.el4 noarch\n", 0))
266
253
  end
267
254
 
@@ -279,7 +266,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
279
266
 
280
267
  before(:each) do
281
268
  expect(Puppet::Util::Execution).to receive(:execute)
282
- .with(["/bin/rpm", "-q", resource_name, '--nosignature', '--nodigest', "--qf", "#{nevra_format}"], execute_options)
269
+ .with(["/bin/rpm", "-q", resource_name, '--nosignature', '--nodigest', "--qf", "'#{nevra_format}'"], execute_options)
283
270
  .and_return(Puppet::Util::Execution::ProcessOutput.new("#{resource_name} 0 1.2.3.4 5.el4 noarch\n", 0))
284
271
  end
285
272
 
@@ -303,7 +290,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
303
290
 
304
291
  before(:each) do
305
292
  expect(Puppet::Util::Execution).to receive(:execute)
306
- .with(["/bin/rpm", "-q", "#{resource_name}.noarch", '--nosignature', '--nodigest', "--qf", "#{nevra_format}"], execute_options)
293
+ .with(["/bin/rpm", "-q", "#{resource_name}.noarch", '--nosignature', '--nodigest', "--qf", "'#{nevra_format}'"], execute_options)
307
294
  .and_return(Puppet::Util::Execution::ProcessOutput.new("#{resource_name} 0 1.2.3.4 5.el4 noarch\n", 0))
308
295
  end
309
296
 
@@ -325,7 +312,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
325
312
 
326
313
  before(:each) do
327
314
  expect(Puppet::Util::Execution).to receive(:execute)
328
- .with(["/bin/rpm", "-q", "#{resource_name}-1.2.3.4-5.el4", '--nosignature', '--nodigest', "--qf", "#{nevra_format}"], execute_options)
315
+ .with(["/bin/rpm", "-q", "#{resource_name}-1.2.3.4-5.el4", '--nosignature', '--nodigest', "--qf", "'#{nevra_format}'"], execute_options)
329
316
  .and_return(Puppet::Util::Execution::ProcessOutput.new("#{resource_name} 0 1.2.3.4 5.el4 noarch\n", 0))
330
317
  end
331
318
 
@@ -347,7 +334,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
347
334
 
348
335
  before(:each) do
349
336
  expect(Puppet::Util::Execution).to receive(:execute)
350
- .with(["/bin/rpm", "-q", "#{resource_name}-1.2.3.4", '--nosignature', '--nodigest', "--qf", "#{nevra_format}"], execute_options)
337
+ .with(["/bin/rpm", "-q", "#{resource_name}-1.2.3.4", '--nosignature', '--nodigest', "--qf", "'#{nevra_format}'"], execute_options)
351
338
  .and_return(Puppet::Util::Execution::ProcessOutput.new("#{resource_name} 0 1.2.3.4 5.el4 noarch\n", 0))
352
339
  end
353
340
 
@@ -371,7 +358,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
371
358
 
372
359
  before(:each) do
373
360
  expect(Puppet::Util::Execution).to receive(:execute)
374
- .with(["/bin/rpm", "-q", resource_name, '--nosignature', '--nodigest', "--qf", "#{nevra_format}"], execute_options)
361
+ .with(["/bin/rpm", "-q", resource_name, '--nosignature', '--nodigest', "--qf", "'#{nevra_format}'"], execute_options)
375
362
  .and_return(Puppet::Util::Execution::ProcessOutput.new("#{resource_name} 0 1.2.3.4 5.el4 noarch\n", 0))
376
363
  end
377
364
 
@@ -387,7 +374,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
387
374
  def parser_test(rpm_output_string, gold_hash, number_of_debug_logs = 0)
388
375
  expect(Puppet).to receive(:debug).exactly(number_of_debug_logs).times()
389
376
  expect(Puppet::Util::Execution).to receive(:execute)
390
- .with(["/bin/rpm", "-q", resource_name, "--nosignature", "--nodigest", "--qf", "#{nevra_format}"], execute_options)
377
+ .with(["/bin/rpm", "-q", resource_name, "--nosignature", "--nodigest", "--qf", "'#{nevra_format}'"], execute_options)
391
378
  .and_return(Puppet::Util::Execution::ProcessOutput.new(rpm_output_string, 0))
392
379
  expect(provider.query).to eq(gold_hash)
393
380
  end
@@ -426,7 +413,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
426
413
  describe "when the package is not found" do
427
414
  before do
428
415
  expect(Puppet).not_to receive(:debug)
429
- expected_args = ["/bin/rpm", "-q", resource_name, "--nosignature", "--nodigest", "--qf", "#{nevra_format}"]
416
+ expected_args = ["/bin/rpm", "-q", resource_name, "--nosignature", "--nodigest", "--qf", "'#{nevra_format}'"]
430
417
  expect(Puppet::Util::Execution).to receive(:execute)
431
418
  .with(expected_args, execute_options)
432
419
  .and_raise(Puppet::ExecutionFailure.new("package #{resource_name} is not installed"))
@@ -439,7 +426,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
439
426
 
440
427
  it "does not log or fail if allow_virtual is true" do
441
428
  resource[:allow_virtual] = true
442
- expected_args = ['/bin/rpm', '-q', resource_name, '--nosignature', '--nodigest', '--qf', "#{nevra_format}", '--whatprovides']
429
+ expected_args = ['/bin/rpm', '-q', resource_name, '--nosignature', '--nodigest', '--qf', "'#{nevra_format}'", '--whatprovides']
443
430
  expect(Puppet::Util::Execution).to receive(:execute)
444
431
  .with(expected_args, execute_options)
445
432
  .and_raise(Puppet::ExecutionFailure.new("package #{resource_name} is not provided"))
@@ -449,7 +436,7 @@ describe Puppet::Type.type(:package).provider(:rpm) do
449
436
 
450
437
  it "parses virtual package" do
451
438
  provider.resource[:allow_virtual] = true
452
- expected_args = ["/bin/rpm", "-q", resource_name, "--nosignature", "--nodigest", "--qf", "#{nevra_format}"]
439
+ expected_args = ["/bin/rpm", "-q", resource_name, "--nosignature", "--nodigest", "--qf", "'#{nevra_format}'"]
453
440
  expect(Puppet::Util::Execution).to receive(:execute)
454
441
  .with(expected_args, execute_options)
455
442
  .and_raise(Puppet::ExecutionFailure.new("package #{resource_name} is not installed"))
@@ -762,125 +749,4 @@ describe Puppet::Type.type(:package).provider(:rpm) do
762
749
  provider.compare_values('s1', 's2')
763
750
  end
764
751
  end
765
-
766
-
767
- describe 'insync?' do
768
- context 'for multiple versions' do
769
- let(:is) { '1:1.2.3.4-5.el4; 1:5.6.7.8-5.el4' }
770
- it 'returns true if there is match and feature is enabled' do
771
- resource[:install_only] = true
772
- resource[:ensure] = '1:1.2.3.4-5.el4'
773
- expect(provider).to be_insync(is)
774
- end
775
- it 'returns false if there is match and feature is not enabled' do
776
- resource[:ensure] = '1:1.2.3.4-5.el4'
777
- expect(provider).to_not be_insync(is)
778
- end
779
- it 'returns false if no match and feature is enabled' do
780
- resource[:install_only] = true
781
- resource[:ensure] = '1:1.2.3.6-5.el4'
782
- expect(provider).to_not be_insync(is)
783
- end
784
- it 'returns false if no match and feature is not enabled' do
785
- resource[:ensure] = '1:1.2.3.6-5.el4'
786
- expect(provider).to_not be_insync(is)
787
- end
788
- end
789
- context 'for simple versions' do
790
- let(:is) { '1:1.2.3.4-5.el4' }
791
- it 'returns true if there is match and feature is enabled' do
792
- resource[:install_only] = true
793
- resource[:ensure] = '1:1.2.3.4-5.el4'
794
- expect(provider).to be_insync(is)
795
- end
796
- it 'returns true if there is match and feature is not enabled' do
797
- resource[:ensure] = '1:1.2.3.4-5.el4'
798
- expect(provider).to be_insync(is)
799
- end
800
- it 'returns false if no match and feature is enabled' do
801
- resource[:install_only] = true
802
- resource[:ensure] = '1:1.2.3.6-5.el4'
803
- expect(provider).to_not be_insync(is)
804
- end
805
- it 'returns false if no match and feature is not enabled' do
806
- resource[:ensure] = '1:1.2.3.6-5.el4'
807
- expect(provider).to_not be_insync(is)
808
- end
809
- end
810
- end
811
-
812
- describe 'rpm multiversion to hash' do
813
- it 'should return empty hash for empty imput' do
814
- package_hash = described_class.nevra_to_multiversion_hash('')
815
- expect(package_hash).to eq({})
816
- end
817
-
818
- it 'should return package hash for one package input' do
819
- package_list = <<-RPM_OUTPUT
820
- kernel-devel 1 1.2.3.4 5.el4 x86_64
821
- RPM_OUTPUT
822
- package_hash = described_class.nevra_to_multiversion_hash(package_list)
823
- expect(package_hash).to eq(
824
- {
825
- :arch => "x86_64",
826
- :ensure => "1:1.2.3.4-5.el4",
827
- :epoch => "1",
828
- :name => "kernel-devel",
829
- :provider => :rpm,
830
- :release => "5.el4",
831
- :version => "1.2.3.4",
832
- }
833
- )
834
- end
835
-
836
- it 'should return package hash with versions concatenated in ensure for two package input' do
837
- package_list = <<-RPM_OUTPUT
838
- kernel-devel 1 1.2.3.4 5.el4 x86_64
839
- kernel-devel 1 5.6.7.8 5.el4 x86_64
840
- RPM_OUTPUT
841
- package_hash = described_class.nevra_to_multiversion_hash(package_list)
842
- expect(package_hash).to eq(
843
- {
844
- :arch => "x86_64",
845
- :ensure => "1:1.2.3.4-5.el4; 1:5.6.7.8-5.el4",
846
- :epoch => "1",
847
- :name => "kernel-devel",
848
- :provider => :rpm,
849
- :release => "5.el4",
850
- :version => "1.2.3.4",
851
- }
852
- )
853
- end
854
-
855
- it 'should return list of packages for one multiversion and one package input' do
856
- package_list = <<-RPM_OUTPUT
857
- kernel-devel 1 1.2.3.4 5.el4 x86_64
858
- kernel-devel 1 5.6.7.8 5.el4 x86_64
859
- basesystem 0 8.0 5.1.1.el5.centos noarch
860
- RPM_OUTPUT
861
- package_hash = described_class.nevra_to_multiversion_hash(package_list)
862
- expect(package_hash).to eq(
863
- [
864
- {
865
- :arch => "x86_64",
866
- :ensure => "1:1.2.3.4-5.el4; 1:5.6.7.8-5.el4",
867
- :epoch => "1",
868
- :name => "kernel-devel",
869
- :provider => :rpm,
870
- :release => "5.el4",
871
- :version => "1.2.3.4",
872
- },
873
- {
874
- :provider => :rpm,
875
- :name => "basesystem",
876
- :epoch => "0",
877
- :version => "8.0",
878
- :release => "5.1.1.el5.centos",
879
- :arch => "noarch",
880
- :ensure => "8.0-5.1.1.el5.centos",
881
- }
882
- ]
883
- )
884
- end
885
- end
886
752
  end
@@ -64,13 +64,6 @@ describe Puppet::Type.type(:package).provider(:yum) do
64
64
 
65
65
  before { allow(described_class).to receive(:command).with(:cmd).and_return("/usr/bin/yum") }
66
66
 
67
- describe 'provider features' do
68
- it { is_expected.to be_versionable }
69
- it { is_expected.to be_install_options }
70
- it { is_expected.to be_virtual_packages }
71
- it { is_expected.to be_install_only }
72
- end
73
-
74
67
  context "when installing" do
75
68
  it "should use the supplied source as the explicit path to a package to install" do
76
69
  resource[:ensure] = :present