chef 18.8.11 → 18.8.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1122) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -19
  3. data/chef.gemspec +4 -5
  4. data/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb +4 -0
  5. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +1 -5
  6. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +12 -0
  7. data/lib/chef/chef_fs/file_system.rb +18 -0
  8. data/lib/chef/pwsh.rb +2 -5
  9. data/lib/chef/resource/apt_repository.rb +14 -5
  10. data/lib/chef/resource/chocolatey_installer.rb +19 -4
  11. data/lib/chef/resource/ohai.rb +1 -0
  12. data/lib/chef/resource_reporter.rb +1 -1
  13. data/lib/chef/shell.rb +8 -3
  14. data/lib/chef/version.rb +1 -1
  15. metadata +14 -1121
  16. data/spec/data/apt/chef-integration-test-1.0/debian/changelog +0 -5
  17. data/spec/data/apt/chef-integration-test-1.0/debian/compat +0 -1
  18. data/spec/data/apt/chef-integration-test-1.0/debian/control +0 -13
  19. data/spec/data/apt/chef-integration-test-1.0/debian/copyright +0 -34
  20. data/spec/data/apt/chef-integration-test-1.0/debian/files +0 -1
  21. data/spec/data/apt/chef-integration-test-1.0/debian/rules +0 -13
  22. data/spec/data/apt/chef-integration-test-1.0/debian/source/format +0 -1
  23. data/spec/data/apt/chef-integration-test-1.1/debian/changelog +0 -11
  24. data/spec/data/apt/chef-integration-test-1.1/debian/compat +0 -1
  25. data/spec/data/apt/chef-integration-test-1.1/debian/control +0 -13
  26. data/spec/data/apt/chef-integration-test-1.1/debian/copyright +0 -34
  27. data/spec/data/apt/chef-integration-test-1.1/debian/files +0 -1
  28. data/spec/data/apt/chef-integration-test-1.1/debian/rules +0 -13
  29. data/spec/data/apt/chef-integration-test-1.1/debian/source/format +0 -1
  30. data/spec/data/apt/chef-integration-test2-1.0/debian/changelog +0 -5
  31. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2/DEBIAN/conffiles +0 -1
  32. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2/DEBIAN/control +0 -10
  33. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2/DEBIAN/md5sums +0 -1
  34. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2.debhelper.log +0 -45
  35. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2.substvars +0 -1
  36. data/spec/data/apt/chef-integration-test2-1.0/debian/compat +0 -1
  37. data/spec/data/apt/chef-integration-test2-1.0/debian/conffiles +0 -1
  38. data/spec/data/apt/chef-integration-test2-1.0/debian/control +0 -13
  39. data/spec/data/apt/chef-integration-test2-1.0/debian/copyright +0 -34
  40. data/spec/data/apt/chef-integration-test2-1.0/debian/files +0 -1
  41. data/spec/data/apt/chef-integration-test2-1.0/debian/rules +0 -13
  42. data/spec/data/apt/chef-integration-test2-1.0/debian/source/format +0 -1
  43. data/spec/data/apt/chef-integration-test2_1.0-1.debian.tar.gz +0 -0
  44. data/spec/data/apt/chef-integration-test2_1.0-1.dsc +0 -18
  45. data/spec/data/apt/chef-integration-test2_1.0-1_amd64.build +0 -91
  46. data/spec/data/apt/chef-integration-test2_1.0-1_amd64.changes +0 -31
  47. data/spec/data/apt/chef-integration-test2_1.0-1_amd64.deb +0 -0
  48. data/spec/data/apt/chef-integration-test2_1.0.orig.tar.gz +0 -0
  49. data/spec/data/apt/chef-integration-test_1.0-1_amd64.changes +0 -22
  50. data/spec/data/apt/chef-integration-test_1.0-1_amd64.deb +0 -0
  51. data/spec/data/apt/chef-integration-test_1.0.orig.tar.gz +0 -0
  52. data/spec/data/apt/chef-integration-test_1.1-1_amd64.changes +0 -22
  53. data/spec/data/apt/chef-integration-test_1.1-1_amd64.deb +0 -0
  54. data/spec/data/apt/chef-integration-test_1.1.orig.tar.gz +0 -0
  55. data/spec/data/apt/var/www/apt/conf/distributions +0 -7
  56. data/spec/data/apt/var/www/apt/conf/incoming +0 -4
  57. data/spec/data/apt/var/www/apt/conf/pulls +0 -3
  58. data/spec/data/apt/var/www/apt/db/checksums.db +0 -0
  59. data/spec/data/apt/var/www/apt/db/contents.cache.db +0 -0
  60. data/spec/data/apt/var/www/apt/db/packages.db +0 -0
  61. data/spec/data/apt/var/www/apt/db/references.db +0 -0
  62. data/spec/data/apt/var/www/apt/db/release.caches.db +0 -0
  63. data/spec/data/apt/var/www/apt/db/version +0 -4
  64. data/spec/data/apt/var/www/apt/dists/sid/Release +0 -19
  65. data/spec/data/apt/var/www/apt/dists/sid/main/binary-amd64/Packages +0 -16
  66. data/spec/data/apt/var/www/apt/dists/sid/main/binary-amd64/Packages.gz +0 -0
  67. data/spec/data/apt/var/www/apt/dists/sid/main/binary-amd64/Release +0 -5
  68. data/spec/data/apt/var/www/apt/dists/sid/main/binary-i386/Packages +0 -0
  69. data/spec/data/apt/var/www/apt/pool/main/c/chef-integration-test/chef-integration-test_1.0-1_amd64.deb +0 -0
  70. data/spec/data/apt/var/www/apt/pool/main/c/chef-integration-test/chef-integration-test_1.1-1_amd64.deb +0 -0
  71. data/spec/data/archive_file/test_archive.tar.gz +0 -0
  72. data/spec/data/bad-config.rb +0 -1
  73. data/spec/data/bootstrap/encrypted_data_bag_secret +0 -1
  74. data/spec/data/bootstrap/no_proxy.erb +0 -2
  75. data/spec/data/bootstrap/secret.erb +0 -9
  76. data/spec/data/bootstrap/test-hints.erb +0 -12
  77. data/spec/data/bootstrap/test.erb +0 -1
  78. data/spec/data/cb_version_cookbooks/cookbook2/files/test.txt +0 -0
  79. data/spec/data/cb_version_cookbooks/cookbook2/templates/test.erb +0 -0
  80. data/spec/data/cb_version_cookbooks/tatft/README.rdoc +0 -3
  81. data/spec/data/cb_version_cookbooks/tatft/attributes/default.rb +0 -1
  82. data/spec/data/cb_version_cookbooks/tatft/definitions/runit_service.rb +0 -1
  83. data/spec/data/cb_version_cookbooks/tatft/files/default/giant_blob.tgz +0 -1
  84. data/spec/data/cb_version_cookbooks/tatft/libraries/ownage.rb +0 -1
  85. data/spec/data/cb_version_cookbooks/tatft/providers/lwp.rb +0 -1
  86. data/spec/data/cb_version_cookbooks/tatft/recipes/default.rb +0 -1
  87. data/spec/data/cb_version_cookbooks/tatft/resources/lwr.rb +0 -1
  88. data/spec/data/cb_version_cookbooks/tatft/templates/default/configuration.erb +0 -0
  89. data/spec/data/checksum/random.txt +0 -1
  90. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-600hhz-0 +0 -1
  91. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-6m8zdk-0 +0 -0
  92. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ahd2gq-0 +0 -1
  93. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-api8ux-0 +0 -1
  94. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-b0r1m1-0 +0 -1
  95. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-bfygsi-0 +0 -1
  96. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-el14l6-0 +0 -1
  97. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ivrl3y-0 +0 -1
  98. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-kkbs85-0 +0 -1
  99. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ory1ux-0 +0 -1
  100. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-pgsq76-0 +0 -1
  101. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ra8uim-0 +0 -1
  102. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-t7k1g-0 +0 -1
  103. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-t8g0sv-0 +0 -1
  104. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ufy6g3-0 +0 -1
  105. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-x2d6j9-0 +0 -1
  106. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-xi0l6h-0 +0 -1
  107. data/spec/data/client.d_00/00-foo.rb +0 -2
  108. data/spec/data/client.d_00/01-bar.rb +0 -1
  109. data/spec/data/client.d_00/02-strings.rb +0 -2
  110. data/spec/data/client.d_00/bar +0 -1
  111. data/spec/data/client.d_01/foo/bar.rb +0 -1
  112. data/spec/data/client.d_02/foo.rb/foo.txt +0 -1
  113. data/spec/data/config.rb +0 -6
  114. data/spec/data/cookbooks/angrybash/metadata.rb +0 -2
  115. data/spec/data/cookbooks/angrybash/recipes/default.rb +0 -8
  116. data/spec/data/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +0 -2
  117. data/spec/data/cookbooks/apache2/metadata.json +0 -33
  118. data/spec/data/cookbooks/apache2/metadata.rb +0 -2
  119. data/spec/data/cookbooks/apache2/recipes/default.rb +0 -3
  120. data/spec/data/cookbooks/borken/metadata.rb +0 -2
  121. data/spec/data/cookbooks/borken/recipes/default.rb +0 -2
  122. data/spec/data/cookbooks/borken/templates/default/borken.erb +0 -2
  123. data/spec/data/cookbooks/chefignore +0 -8
  124. data/spec/data/cookbooks/ignorken/files/default/not_me.rb +0 -2
  125. data/spec/data/cookbooks/ignorken/metadata.rb +0 -2
  126. data/spec/data/cookbooks/ignorken/recipes/default.rb +0 -1
  127. data/spec/data/cookbooks/ignorken/recipes/ignoreme.rb +0 -2
  128. data/spec/data/cookbooks/ignorken/templates/ubuntu-12.10/not_me.rb +0 -2
  129. data/spec/data/cookbooks/irssi/files/default/irssi.response +0 -2
  130. data/spec/data/cookbooks/java/files/default/java.response +0 -2
  131. data/spec/data/cookbooks/java/metadata.json +0 -33
  132. data/spec/data/cookbooks/java/metadata.rb +0 -2
  133. data/spec/data/cookbooks/name-mismatch-versionnumber/README.md +0 -4
  134. data/spec/data/cookbooks/name-mismatch-versionnumber/metadata.rb +0 -8
  135. data/spec/data/cookbooks/name-mismatch-versionnumber/recipes/default.rb +0 -8
  136. data/spec/data/cookbooks/openldap/.root_dotfile +0 -0
  137. data/spec/data/cookbooks/openldap/attributes/default.rb +0 -16
  138. data/spec/data/cookbooks/openldap/attributes/smokey.rb +0 -1
  139. data/spec/data/cookbooks/openldap/definitions/client.rb +0 -5
  140. data/spec/data/cookbooks/openldap/definitions/server.rb +0 -5
  141. data/spec/data/cookbooks/openldap/files/default/.dotfile +0 -1
  142. data/spec/data/cookbooks/openldap/files/default/.ssh/id_rsa +0 -1
  143. data/spec/data/cookbooks/openldap/files/default/remotedir/.a_dotdir/.a_dotfile_in_a_dotdir +0 -1
  144. data/spec/data/cookbooks/openldap/files/default/remotedir/not_a_template.erb +0 -2
  145. data/spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file1.txt +0 -3
  146. data/spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file2.txt +0 -3
  147. data/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/.a_dotfile +0 -1
  148. data/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file1.txt +0 -3
  149. data/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file2.txt +0 -3
  150. data/spec/data/cookbooks/openldap/files/default/remotedir/subdir_with_no_file_just_a_subsubdir/the_subsubdir/some_file.txt +0 -3
  151. data/spec/data/cookbooks/openldap/libraries/openldap/version.rb +0 -3
  152. data/spec/data/cookbooks/openldap/libraries/openldap.rb +0 -4
  153. data/spec/data/cookbooks/openldap/metadata.rb +0 -8
  154. data/spec/data/cookbooks/openldap/recipes/default.rb +0 -4
  155. data/spec/data/cookbooks/openldap/recipes/gigantor.rb +0 -3
  156. data/spec/data/cookbooks/openldap/recipes/one.rb +0 -15
  157. data/spec/data/cookbooks/openldap/recipes/return.rb +0 -2
  158. data/spec/data/cookbooks/openldap/spec/spec_helper.rb +0 -0
  159. data/spec/data/cookbooks/openldap/templates/default/all_windows_line_endings.erb +0 -4
  160. data/spec/data/cookbooks/openldap/templates/default/helper_test.erb +0 -1
  161. data/spec/data/cookbooks/openldap/templates/default/helpers.erb +0 -14
  162. data/spec/data/cookbooks/openldap/templates/default/helpers_via_partial_test.erb +0 -1
  163. data/spec/data/cookbooks/openldap/templates/default/nested_openldap_partials.erb +0 -1
  164. data/spec/data/cookbooks/openldap/templates/default/nested_partial.erb +0 -1
  165. data/spec/data/cookbooks/openldap/templates/default/no_windows_line_endings.erb +0 -4
  166. data/spec/data/cookbooks/openldap/templates/default/openldap_nested_variable_stuff.erb +0 -1
  167. data/spec/data/cookbooks/openldap/templates/default/openldap_stuff.conf.erb +0 -1
  168. data/spec/data/cookbooks/openldap/templates/default/openldap_variable_stuff.conf.erb +0 -1
  169. data/spec/data/cookbooks/openldap/templates/default/some_windows_line_endings.erb +0 -4
  170. data/spec/data/cookbooks/openldap/templates/default/test.erb +0 -1
  171. data/spec/data/cookbooks/preseed/files/default/preseed-file.seed +0 -1
  172. data/spec/data/cookbooks/preseed/files/default/preseed-template.seed +0 -4
  173. data/spec/data/cookbooks/preseed/metadata.rb +0 -2
  174. data/spec/data/cookbooks/preseed/templates/default/preseed-template-variables.seed +0 -1
  175. data/spec/data/cookbooks/preseed/templates/default/preseed-template.seed +0 -1
  176. data/spec/data/cookbooks/starter/chefignore +0 -8
  177. data/spec/data/cookbooks/starter/files/sample.txt +0 -1
  178. data/spec/data/cookbooks/starter/metadata.rb +0 -2
  179. data/spec/data/cookbooks/starter/recipes/default.rb +0 -4
  180. data/spec/data/cookbooks/supports-platform-constraints/metadata.rb +0 -5
  181. data/spec/data/cookbooks/wget/files/default/wget.response +0 -2
  182. data/spec/data/definitions/test.rb +0 -5
  183. data/spec/data/dsc_lcm.pfx +0 -0
  184. data/spec/data/environment-config.rb +0 -5
  185. data/spec/data/file-providers-method-snapshot-chef-11-4.json +0 -127
  186. data/spec/data/fileedit/blank +0 -0
  187. data/spec/data/fileedit/hosts +0 -4
  188. data/spec/data/gems/chef-integration-test-0.1.0.gem +0 -0
  189. data/spec/data/git_bundles/example-repo.gitbundle +0 -0
  190. data/spec/data/git_bundles/sinatra-test-app-with-callback-files.gitbundle +0 -0
  191. data/spec/data/git_bundles/sinatra-test-app-with-symlinks.gitbundle +0 -0
  192. data/spec/data/git_bundles/sinatra-test-app.gitbundle +0 -0
  193. data/spec/data/incomplete-metadata-chef-repo/incomplete-metadata/README.md +0 -4
  194. data/spec/data/incomplete-metadata-chef-repo/incomplete-metadata/metadata.rb +0 -13
  195. data/spec/data/incomplete-metadata-chef-repo/incomplete-metadata/recipes/default.rb +0 -8
  196. data/spec/data/invalid-metadata-chef-repo/invalid-metadata/README.md +0 -4
  197. data/spec/data/invalid-metadata-chef-repo/invalid-metadata/metadata.rb +0 -9
  198. data/spec/data/invalid-metadata-chef-repo/invalid-metadata/recipes/default.rb +0 -8
  199. data/spec/data/kitchen/chefignore +0 -6
  200. data/spec/data/kitchen/openldap/attributes/default.rb +0 -3
  201. data/spec/data/kitchen/openldap/attributes/robinson.rb +0 -3
  202. data/spec/data/kitchen/openldap/definitions/client.rb +0 -3
  203. data/spec/data/kitchen/openldap/definitions/drewbarrymore.rb +0 -3
  204. data/spec/data/kitchen/openldap/recipes/gigantor.rb +0 -3
  205. data/spec/data/kitchen/openldap/recipes/ignoreme.rb +0 -3
  206. data/spec/data/kitchen/openldap/recipes/woot.rb +0 -3
  207. data/spec/data/knife-home/.chef/plugins/knife/example_home_subcommand.rb +0 -0
  208. data/spec/data/knife-site-subcommands/plugins/knife/example_subcommand.rb +0 -0
  209. data/spec/data/knife_subcommand/test_explicit_category.rb +0 -7
  210. data/spec/data/knife_subcommand/test_name_mapping.rb +0 -4
  211. data/spec/data/knife_subcommand/test_yourself.rb +0 -21
  212. data/spec/data/lwrp/providers/buck_passer.rb +0 -28
  213. data/spec/data/lwrp/providers/buck_passer_2.rb +0 -26
  214. data/spec/data/lwrp/providers/embedded_resource_accesses_providers_scope.rb +0 -28
  215. data/spec/data/lwrp/providers/inline_compiler.rb +0 -24
  216. data/spec/data/lwrp/providers/monkey_name_printer.rb +0 -5
  217. data/spec/data/lwrp/providers/paint_drying_watcher.rb +0 -7
  218. data/spec/data/lwrp/providers/thumb_twiddler.rb +0 -7
  219. data/spec/data/lwrp/resources/bar.rb +0 -4
  220. data/spec/data/lwrp/resources/buck_passer.rb +0 -6
  221. data/spec/data/lwrp/resources/buck_passer_2.rb +0 -4
  222. data/spec/data/lwrp/resources/embedded_resource_accesses_providers_scope.rb +0 -4
  223. data/spec/data/lwrp/resources/foo.rb +0 -6
  224. data/spec/data/lwrp/resources/inline_compiler.rb +0 -4
  225. data/spec/data/lwrp/resources/monkey_name_printer.rb +0 -6
  226. data/spec/data/lwrp/resources/paint_drying_watcher.rb +0 -4
  227. data/spec/data/lwrp/resources/thumb_twiddler.rb +0 -4
  228. data/spec/data/lwrp/resources_with_default_attributes/nodeattr.rb +0 -3
  229. data/spec/data/lwrp_const_scoping/resources/conflict.rb +0 -1
  230. data/spec/data/lwrp_override/providers/buck_passer.rb +0 -5
  231. data/spec/data/lwrp_override/resources/foo.rb +0 -11
  232. data/spec/data/mac_users/10.9.plist.xml +0 -560
  233. data/spec/data/mac_users/10.9.shadow.xml +0 -21
  234. data/spec/data/metadata/quick_start/metadata.rb +0 -14
  235. data/spec/data/mixin/invalid_data.rb +0 -3
  236. data/spec/data/mixin/real_data.rb +0 -2
  237. data/spec/data/nested.json +0 -2
  238. data/spec/data/nodes/default.rb +0 -15
  239. data/spec/data/nodes/test.example.com.rb +0 -17
  240. data/spec/data/nodes/test.rb +0 -15
  241. data/spec/data/null_config.rb +0 -1
  242. data/spec/data/object_loader/environments/test.json +0 -7
  243. data/spec/data/object_loader/environments/test.rb +0 -2
  244. data/spec/data/object_loader/environments/test_json_class.json +0 -8
  245. data/spec/data/object_loader/nodes/test.json +0 -7
  246. data/spec/data/object_loader/nodes/test.rb +0 -2
  247. data/spec/data/object_loader/nodes/test_json_class.json +0 -8
  248. data/spec/data/object_loader/roles/test.json +0 -7
  249. data/spec/data/object_loader/roles/test.rb +0 -2
  250. data/spec/data/object_loader/roles/test_json_class.json +0 -8
  251. data/spec/data/old_home_dir/my-dot-emacs +0 -0
  252. data/spec/data/old_home_dir/my-dot-vim +0 -0
  253. data/spec/data/partial_one.erb +0 -1
  254. data/spec/data/prefer_metadata_json/metadata.json +0 -51
  255. data/spec/data/prefer_metadata_json/metadata.rb +0 -6
  256. data/spec/data/prefer_metadata_json/recipes/default.rb +0 -0
  257. data/spec/data/recipes/test.rb +0 -7
  258. data/spec/data/recipes.tgz +0 -0
  259. data/spec/data/remote_directory_data/remote_dir_file.txt +0 -1
  260. data/spec/data/remote_directory_data/remote_subdirectory/remote_subdir_file.txt +0 -1
  261. data/spec/data/remote_file/nyan_cat.png +0 -0
  262. data/spec/data/remote_file/nyan_cat.png.gz +0 -0
  263. data/spec/data/root_alias_cookbooks/dup_attr/attributes/default.rb +0 -1
  264. data/spec/data/root_alias_cookbooks/dup_attr/attributes.rb +0 -1
  265. data/spec/data/root_alias_cookbooks/dup_attr/metadata.rb +0 -2
  266. data/spec/data/root_alias_cookbooks/dup_attr/recipe.rb +0 -3
  267. data/spec/data/root_alias_cookbooks/dup_recipe/attributes.rb +0 -1
  268. data/spec/data/root_alias_cookbooks/dup_recipe/metadata.rb +0 -2
  269. data/spec/data/root_alias_cookbooks/dup_recipe/recipe.rb +0 -3
  270. data/spec/data/root_alias_cookbooks/dup_recipe/recipes/default.rb +0 -3
  271. data/spec/data/root_alias_cookbooks/simple/attributes.rb +0 -1
  272. data/spec/data/root_alias_cookbooks/simple/metadata.rb +0 -2
  273. data/spec/data/root_alias_cookbooks/simple/recipe.rb +0 -3
  274. data/spec/data/rubygems.org/latest_specs.4.8.gz +0 -0
  275. data/spec/data/rubygems.org/nonexistent_gem +0 -0
  276. data/spec/data/rubygems.org/nonexistent_gem-info +0 -1
  277. data/spec/data/rubygems.org/sexp_processor +0 -0
  278. data/spec/data/rubygems.org/sexp_processor-4.15.1.gemspec.rz +0 -0
  279. data/spec/data/rubygems.org/sexp_processor-info +0 -50
  280. data/spec/data/run_context/cookbooks/circular-dep1/attributes/default.rb +0 -2
  281. data/spec/data/run_context/cookbooks/circular-dep1/definitions/circular_dep1_res.rb +0 -1
  282. data/spec/data/run_context/cookbooks/circular-dep1/libraries/lib.rb +0 -2
  283. data/spec/data/run_context/cookbooks/circular-dep1/metadata.rb +0 -2
  284. data/spec/data/run_context/cookbooks/circular-dep1/providers/provider.rb +0 -1
  285. data/spec/data/run_context/cookbooks/circular-dep1/recipes/default.rb +0 -0
  286. data/spec/data/run_context/cookbooks/circular-dep1/resources/resource.rb +0 -2
  287. data/spec/data/run_context/cookbooks/circular-dep2/attributes/default.rb +0 -2
  288. data/spec/data/run_context/cookbooks/circular-dep2/definitions/circular_dep2_res.rb +0 -1
  289. data/spec/data/run_context/cookbooks/circular-dep2/libraries/lib.rb +0 -2
  290. data/spec/data/run_context/cookbooks/circular-dep2/metadata.rb +0 -2
  291. data/spec/data/run_context/cookbooks/circular-dep2/providers/provider.rb +0 -1
  292. data/spec/data/run_context/cookbooks/circular-dep2/recipes/default.rb +0 -0
  293. data/spec/data/run_context/cookbooks/circular-dep2/resources/resource.rb +0 -2
  294. data/spec/data/run_context/cookbooks/dependency1/attributes/aa_first.rb +0 -2
  295. data/spec/data/run_context/cookbooks/dependency1/attributes/default.rb +0 -2
  296. data/spec/data/run_context/cookbooks/dependency1/attributes/unparsed_file +0 -1
  297. data/spec/data/run_context/cookbooks/dependency1/attributes/zz_last.rb +0 -2
  298. data/spec/data/run_context/cookbooks/dependency1/definitions/dependency1_res.rb +0 -1
  299. data/spec/data/run_context/cookbooks/dependency1/definitions/unparsed_file +0 -1
  300. data/spec/data/run_context/cookbooks/dependency1/libraries/lib.rb +0 -2
  301. data/spec/data/run_context/cookbooks/dependency1/libraries/unparsed_file +0 -1
  302. data/spec/data/run_context/cookbooks/dependency1/providers/provider.rb +0 -1
  303. data/spec/data/run_context/cookbooks/dependency1/providers/unparsed_file +0 -1
  304. data/spec/data/run_context/cookbooks/dependency1/recipes/default.rb +0 -0
  305. data/spec/data/run_context/cookbooks/dependency1/recipes/unparsed_file +0 -1
  306. data/spec/data/run_context/cookbooks/dependency1/resources/resource.rb +0 -2
  307. data/spec/data/run_context/cookbooks/dependency1/resources/unparsed_file +0 -1
  308. data/spec/data/run_context/cookbooks/dependency2/attributes/default.rb +0 -2
  309. data/spec/data/run_context/cookbooks/dependency2/definitions/dependency2_res.rb +0 -1
  310. data/spec/data/run_context/cookbooks/dependency2/libraries/lib.rb +0 -2
  311. data/spec/data/run_context/cookbooks/dependency2/providers/provider.rb +0 -1
  312. data/spec/data/run_context/cookbooks/dependency2/recipes/default.rb +0 -0
  313. data/spec/data/run_context/cookbooks/dependency2/resources/resource.rb +0 -2
  314. data/spec/data/run_context/cookbooks/include/recipes/default.rb +0 -24
  315. data/spec/data/run_context/cookbooks/include/recipes/includee.rb +0 -3
  316. data/spec/data/run_context/cookbooks/no-default-attr/attributes/server.rb +0 -2
  317. data/spec/data/run_context/cookbooks/no-default-attr/definitions/no_default-attr_res.rb +0 -1
  318. data/spec/data/run_context/cookbooks/no-default-attr/providers/provider.rb +0 -1
  319. data/spec/data/run_context/cookbooks/no-default-attr/recipes/default.rb +0 -0
  320. data/spec/data/run_context/cookbooks/no-default-attr/resources/resource.rb +0 -2
  321. data/spec/data/run_context/cookbooks/test/attributes/default.rb +0 -0
  322. data/spec/data/run_context/cookbooks/test/attributes/george.rb +0 -1
  323. data/spec/data/run_context/cookbooks/test/definitions/new_animals.rb +0 -9
  324. data/spec/data/run_context/cookbooks/test/definitions/new_cat.rb +0 -5
  325. data/spec/data/run_context/cookbooks/test/definitions/test_res.rb +0 -1
  326. data/spec/data/run_context/cookbooks/test/providers/provider.rb +0 -1
  327. data/spec/data/run_context/cookbooks/test/recipes/default.rb +0 -5
  328. data/spec/data/run_context/cookbooks/test/recipes/one.rb +0 -7
  329. data/spec/data/run_context/cookbooks/test/recipes/two.rb +0 -7
  330. data/spec/data/run_context/cookbooks/test/resources/resource.rb +0 -3
  331. data/spec/data/run_context/cookbooks/test-with-circular-deps/attributes/default.rb +0 -2
  332. data/spec/data/run_context/cookbooks/test-with-circular-deps/definitions/test_with-circular-deps_res.rb +0 -1
  333. data/spec/data/run_context/cookbooks/test-with-circular-deps/libraries/lib.rb +0 -2
  334. data/spec/data/run_context/cookbooks/test-with-circular-deps/metadata.rb +0 -2
  335. data/spec/data/run_context/cookbooks/test-with-circular-deps/providers/provider.rb +0 -1
  336. data/spec/data/run_context/cookbooks/test-with-circular-deps/recipes/default.rb +0 -0
  337. data/spec/data/run_context/cookbooks/test-with-circular-deps/resources/resource.rb +0 -3
  338. data/spec/data/run_context/cookbooks/test-with-deps/attributes/default.rb +0 -2
  339. data/spec/data/run_context/cookbooks/test-with-deps/definitions/test_with-deps_res.rb +0 -1
  340. data/spec/data/run_context/cookbooks/test-with-deps/libraries/lib.rb +0 -1
  341. data/spec/data/run_context/cookbooks/test-with-deps/metadata.rb +0 -3
  342. data/spec/data/run_context/cookbooks/test-with-deps/providers/provider.rb +0 -1
  343. data/spec/data/run_context/cookbooks/test-with-deps/recipes/default.rb +0 -0
  344. data/spec/data/run_context/cookbooks/test-with-deps/recipes/server.rb +0 -0
  345. data/spec/data/run_context/cookbooks/test-with-deps/resources/resource.rb +0 -2
  346. data/spec/data/run_context/nodes/run_context.rb +0 -5
  347. data/spec/data/sample_msu1.xml +0 -10
  348. data/spec/data/sample_msu2.xml +0 -14
  349. data/spec/data/sample_msu3.xml +0 -16
  350. data/spec/data/search_queries_to_transform.txt +0 -98
  351. data/spec/data/shef-config.rb +0 -11
  352. data/spec/data/snap_package/async_result_success.json +0 -6
  353. data/spec/data/snap_package/change_id_result.json +0 -175
  354. data/spec/data/snap_package/find_result_failure.json +0 -10
  355. data/spec/data/snap_package/find_result_success.json +0 -70
  356. data/spec/data/snap_package/get_by_name_result_failure.json +0 -10
  357. data/spec/data/snap_package/get_by_name_result_success.json +0 -38
  358. data/spec/data/snap_package/get_conf_success.json +0 -10
  359. data/spec/data/snap_package/result_failure.json +0 -9
  360. data/spec/data/ssl/5e707473.0 +0 -18
  361. data/spec/data/ssl/binary/chef-rspec-der.cert +0 -0
  362. data/spec/data/ssl/binary/chef-rspec-der.key +0 -0
  363. data/spec/data/ssl/chef-rspec.cert +0 -27
  364. data/spec/data/ssl/chef-rspec.key +0 -27
  365. data/spec/data/ssl/key.pem +0 -15
  366. data/spec/data/ssl/private_key.pem +0 -27
  367. data/spec/data/ssl/private_key_with_whitespace.pem +0 -32
  368. data/spec/data/standalone_cookbook/Gemfile +0 -1
  369. data/spec/data/standalone_cookbook/chefignore +0 -9
  370. data/spec/data/standalone_cookbook/recipes/default.rb +0 -3
  371. data/spec/data/standalone_cookbook/vendor/bundle/ruby/2.0.0/gems/multi_json-1.9.0/lib/multi_json.rb +0 -1
  372. data/spec/data/templates/chef-seattle20160930-4388-1crv7ef.txt +0 -1
  373. data/spec/data/templates/chef-seattle20160930-4388-jjfoae.txt +0 -1
  374. data/spec/data/templates/chef-seattle20160930-4388-umeq2c.txt +0 -1
  375. data/spec/data/templates/failed.erb +0 -5
  376. data/spec/data/templates/seattle.txt +0 -1
  377. data/spec/data/trusted_certs/example.crt +0 -31
  378. data/spec/data/trusted_certs/example_no_cn.crt +0 -32
  379. data/spec/data/trusted_certs/intermediate.pem +0 -38
  380. data/spec/data/trusted_certs/opscode.pem +0 -36
  381. data/spec/data/trusted_certs/root.pem +0 -22
  382. data/spec/data/windows_certificates/base64_test.cer +0 -20
  383. data/spec/data/windows_certificates/othertest.cer +0 -20
  384. data/spec/data/windows_certificates/test.cer +0 -20
  385. data/spec/data/windows_certificates/test.p7b +0 -0
  386. data/spec/data/windows_certificates/test.pem +0 -20
  387. data/spec/data/windows_certificates/test.pfx +0 -0
  388. data/spec/functional/application_spec.rb +0 -58
  389. data/spec/functional/assets/PkgA.1.0.0.0.bff +0 -0
  390. data/spec/functional/assets/PkgA.2.0.0.0.bff +0 -0
  391. data/spec/functional/assets/chefinittest +0 -36
  392. data/spec/functional/assets/chocolatey_feed/test-A.1.0.0.nupkg +0 -0
  393. data/spec/functional/assets/chocolatey_feed/test-A.1.5.0.nupkg +0 -0
  394. data/spec/functional/assets/chocolatey_feed/test-A.2.0.0.nupkg +0 -0
  395. data/spec/functional/assets/chocolatey_feed/test-B.1.0.0.nupkg +0 -0
  396. data/spec/functional/assets/dummy-1-0.aix6.1.noarch.rpm +0 -0
  397. data/spec/functional/assets/dummy-2-0.aix6.1.noarch.rpm +0 -0
  398. data/spec/functional/assets/inittest +0 -37
  399. data/spec/functional/assets/mytest-1.0-1.noarch.rpm +0 -0
  400. data/spec/functional/assets/mytest-2.0-1.noarch.rpm +0 -0
  401. data/spec/functional/assets/testchefsubsys +0 -10
  402. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.aarch64.rpm +0 -0
  403. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.i686.rpm +0 -0
  404. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.ppc64.rpm +0 -0
  405. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.ppc64le.rpm +0 -0
  406. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.s390x.rpm +0 -0
  407. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.src.rpm +0 -0
  408. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.x86_64.rpm +0 -0
  409. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.aarch64.rpm +0 -0
  410. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.i686.rpm +0 -0
  411. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.ppc64.rpm +0 -0
  412. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.ppc64le.rpm +0 -0
  413. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.s390x.rpm +0 -0
  414. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.src.rpm +0 -0
  415. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.x86_64.rpm +0 -0
  416. data/spec/functional/assets/yumrepo/repodata/4632d67cb92636e7575d911c24f0e04d3505a944e97c483abe0c3e73a7c62d33-filelists.sqlite.bz2 +0 -0
  417. data/spec/functional/assets/yumrepo/repodata/74599b793e54d877323837d2d81a1c3c594c44e4335f9528234bb490f7b9b439-other.xml.gz +0 -0
  418. data/spec/functional/assets/yumrepo/repodata/a845d418f919d2115ab95a56b2c76f6825ad0d0bede49181a55c04f58995d057-primary.sqlite.bz2 +0 -0
  419. data/spec/functional/assets/yumrepo/repodata/af9b7cf9ef23bd7b43068d74a460f3b5d06753d638e58e4a0c9edc35bfb9cdc4-other.sqlite.bz2 +0 -0
  420. data/spec/functional/assets/yumrepo/repodata/bdb4f5f1492a3b9532f22c43110a81500dd744f23da0aec5c33b2a41317c737d-filelists.xml.gz +0 -0
  421. data/spec/functional/assets/yumrepo/repodata/c10d1d34ce99e02f12ec96ef68360543ab1bb7c3cb81a4a2bf78df7d8597e9df-primary.xml.gz +0 -0
  422. data/spec/functional/assets/yumrepo/repodata/filelists.xml.gz +0 -0
  423. data/spec/functional/assets/yumrepo/repodata/other.xml.gz +0 -0
  424. data/spec/functional/assets/yumrepo/repodata/primary.xml.gz +0 -0
  425. data/spec/functional/assets/yumrepo/repodata/repomd.xml +0 -21
  426. data/spec/functional/assets/yumrepo-empty/repodata/01a3b-filelists.sqlite.bz2 +0 -0
  427. data/spec/functional/assets/yumrepo-empty/repodata/401dc-filelists.xml.gz +0 -0
  428. data/spec/functional/assets/yumrepo-empty/repodata/5dc1e-primary.sqlite.bz2 +0 -0
  429. data/spec/functional/assets/yumrepo-empty/repodata/6bf96-other.xml.gz +0 -0
  430. data/spec/functional/assets/yumrepo-empty/repodata/7c365-other.sqlite.bz2 +0 -0
  431. data/spec/functional/assets/yumrepo-empty/repodata/dabe2-primary.xml.gz +0 -0
  432. data/spec/functional/assets/yumrepo-empty/repodata/repomd.xml +0 -55
  433. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.aarch64.rpm +0 -0
  434. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.i686.rpm +0 -0
  435. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.ppc64.rpm +0 -0
  436. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.ppc64le.rpm +0 -0
  437. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.s390x.rpm +0 -0
  438. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.src.rpm +0 -0
  439. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.x86_64.rpm +0 -0
  440. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.aarch64.rpm +0 -0
  441. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.i686.rpm +0 -0
  442. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.ppc64.rpm +0 -0
  443. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.ppc64le.rpm +0 -0
  444. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.s390x.rpm +0 -0
  445. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.src.rpm +0 -0
  446. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.x86_64.rpm +0 -0
  447. data/spec/functional/dsl/reboot_pending_spec.rb +0 -88
  448. data/spec/functional/dsl/registry_helper_spec.rb +0 -61
  449. data/spec/functional/event_loggers/windows_eventlog_spec.rb +0 -107
  450. data/spec/functional/file_content_management/deploy_strategies_spec.rb +0 -229
  451. data/spec/functional/http/simple_spec.rb +0 -146
  452. data/spec/functional/mixin/from_file_spec.rb +0 -93
  453. data/spec/functional/mixin/powershell_out_spec.rb +0 -51
  454. data/spec/functional/mixin/shell_out_spec.rb +0 -48
  455. data/spec/functional/mixin/user_context_spec.rb +0 -119
  456. data/spec/functional/notifications_spec.rb +0 -238
  457. data/spec/functional/provider/remote_file/cache_control_data_spec.rb +0 -100
  458. data/spec/functional/provider/whyrun_safe_ruby_block_spec.rb +0 -51
  459. data/spec/functional/rebooter_spec.rb +0 -117
  460. data/spec/functional/resource/aix_service_spec.rb +0 -145
  461. data/spec/functional/resource/aixinit_service_spec.rb +0 -210
  462. data/spec/functional/resource/apt_package_spec.rb +0 -383
  463. data/spec/functional/resource/archive_file_spec.rb +0 -88
  464. data/spec/functional/resource/bash_spec.rb +0 -55
  465. data/spec/functional/resource/batch_spec.rb +0 -34
  466. data/spec/functional/resource/bff_spec.rb +0 -120
  467. data/spec/functional/resource/chocolatey_package_spec.rb +0 -194
  468. data/spec/functional/resource/cookbook_file_spec.rb +0 -79
  469. data/spec/functional/resource/cron_spec.rb +0 -179
  470. data/spec/functional/resource/directory_spec.rb +0 -43
  471. data/spec/functional/resource/dnf_package_spec.rb +0 -1629
  472. data/spec/functional/resource/dpkg_package_spec.rb +0 -355
  473. data/spec/functional/resource/dsc_resource_spec.rb +0 -91
  474. data/spec/functional/resource/dsc_script_spec.rb +0 -476
  475. data/spec/functional/resource/execute_spec.rb +0 -171
  476. data/spec/functional/resource/file_spec.rb +0 -167
  477. data/spec/functional/resource/git_spec.rb +0 -330
  478. data/spec/functional/resource/group_spec.rb +0 -486
  479. data/spec/functional/resource/ifconfig_spec.rb +0 -178
  480. data/spec/functional/resource/insserv_spec.rb +0 -206
  481. data/spec/functional/resource/launchd_spec.rb +0 -232
  482. data/spec/functional/resource/link_spec.rb +0 -704
  483. data/spec/functional/resource/locale_spec.rb +0 -108
  484. data/spec/functional/resource/macos_userdefaults_spec.rb +0 -139
  485. data/spec/functional/resource/mount_spec.rb +0 -219
  486. data/spec/functional/resource/msu_package_spec.rb +0 -107
  487. data/spec/functional/resource/ohai_spec.rb +0 -54
  488. data/spec/functional/resource/plist_spec.rb +0 -25
  489. data/spec/functional/resource/powershell_package_source_spec.rb +0 -106
  490. data/spec/functional/resource/powershell_script_spec.rb +0 -588
  491. data/spec/functional/resource/reboot_spec.rb +0 -103
  492. data/spec/functional/resource/registry_spec.rb +0 -300
  493. data/spec/functional/resource/remote_directory_spec.rb +0 -220
  494. data/spec/functional/resource/remote_file_spec.rb +0 -418
  495. data/spec/functional/resource/rpm_spec.rb +0 -120
  496. data/spec/functional/resource/template_spec.rb +0 -245
  497. data/spec/functional/resource/timezone_spec.rb +0 -41
  498. data/spec/functional/resource/user/linux_user_spec.rb +0 -127
  499. data/spec/functional/resource/user/mac_user_spec.rb +0 -207
  500. data/spec/functional/resource/user/windows_spec.rb +0 -245
  501. data/spec/functional/resource/windows_certificate_spec.rb +0 -401
  502. data/spec/functional/resource/windows_env_spec.rb +0 -285
  503. data/spec/functional/resource/windows_firewall_rule_spec.rb +0 -93
  504. data/spec/functional/resource/windows_font_spec.rb +0 -52
  505. data/spec/functional/resource/windows_hostname_spec.rb +0 -91
  506. data/spec/functional/resource/windows_package_spec.rb +0 -193
  507. data/spec/functional/resource/windows_pagefile_spec.rb +0 -125
  508. data/spec/functional/resource/windows_path_spec.rb +0 -68
  509. data/spec/functional/resource/windows_security_policy_spec.rb +0 -86
  510. data/spec/functional/resource/windows_share_spec.rb +0 -103
  511. data/spec/functional/resource/windows_task_spec.rb +0 -1969
  512. data/spec/functional/resource/windows_user_privilege_spec.rb +0 -192
  513. data/spec/functional/resource/yum_package_spec.rb +0 -1739
  514. data/spec/functional/resource/zypper_package_spec.rb +0 -276
  515. data/spec/functional/root_alias_spec.rb +0 -78
  516. data/spec/functional/run_lock_spec.rb +0 -481
  517. data/spec/functional/shell_spec.rb +0 -149
  518. data/spec/functional/tiny_server_spec.rb +0 -79
  519. data/spec/functional/util/path_helper_spec.rb +0 -37
  520. data/spec/functional/version_spec.rb +0 -36
  521. data/spec/functional/win32/crypto_spec.rb +0 -54
  522. data/spec/functional/win32/registry_spec.rb +0 -618
  523. data/spec/functional/win32/security_spec.rb +0 -233
  524. data/spec/functional/win32/sid_spec.rb +0 -55
  525. data/spec/functional/win32/version_info_spec.rb +0 -50
  526. data/spec/functional/win32/versions_spec.rb +0 -115
  527. data/spec/integration/client/client_spec.rb +0 -963
  528. data/spec/integration/client/exit_code_spec.rb +0 -116
  529. data/spec/integration/client/fips_spec.rb +0 -29
  530. data/spec/integration/client/ipv6_spec.rb +0 -135
  531. data/spec/integration/client/open_ssl_spec.rb +0 -25
  532. data/spec/integration/compliance/compliance_spec.rb +0 -143
  533. data/spec/integration/ohai/ohai_spec.rb +0 -62
  534. data/spec/integration/recipes/accumulator_spec.rb +0 -245
  535. data/spec/integration/recipes/lwrp_inline_resources_spec.rb +0 -176
  536. data/spec/integration/recipes/lwrp_spec.rb +0 -56
  537. data/spec/integration/recipes/noop_resource_spec.rb +0 -24
  538. data/spec/integration/recipes/notifies_spec.rb +0 -438
  539. data/spec/integration/recipes/notifying_block_spec.rb +0 -116
  540. data/spec/integration/recipes/provider_choice.rb +0 -38
  541. data/spec/integration/recipes/recipe_dsl_spec.rb +0 -1281
  542. data/spec/integration/recipes/remote_directory.rb +0 -74
  543. data/spec/integration/recipes/resource_action_spec.rb +0 -524
  544. data/spec/integration/recipes/resource_converge_if_changed_spec.rb +0 -554
  545. data/spec/integration/recipes/resource_load_spec.rb +0 -315
  546. data/spec/integration/recipes/unified_mode_spec.rb +0 -947
  547. data/spec/integration/recipes/use_partial_spec.rb +0 -116
  548. data/spec/integration/solo/solo_spec.rb +0 -219
  549. data/spec/rcov.opts +0 -2
  550. data/spec/spec_helper.rb +0 -350
  551. data/spec/stress/win32/file_spec.rb +0 -37
  552. data/spec/stress/win32/memory_spec.rb +0 -22
  553. data/spec/stress/win32/security_spec.rb +0 -69
  554. data/spec/support/chef_helpers.rb +0 -79
  555. data/spec/support/key_helpers.rb +0 -102
  556. data/spec/support/lib/chef/provider/easy.rb +0 -35
  557. data/spec/support/lib/chef/provider/openldap_includer.rb +0 -29
  558. data/spec/support/lib/chef/provider/snakeoil.rb +0 -42
  559. data/spec/support/lib/chef/resource/cat.rb +0 -39
  560. data/spec/support/lib/chef/resource/one_two_three_four.rb +0 -36
  561. data/spec/support/lib/chef/resource/openldap_includer.rb +0 -28
  562. data/spec/support/lib/chef/resource/with_state.rb +0 -29
  563. data/spec/support/lib/chef/resource/zen_follower.rb +0 -36
  564. data/spec/support/lib/chef/resource/zen_master.rb +0 -39
  565. data/spec/support/lib/library_load_order.rb +0 -20
  566. data/spec/support/matchers/leak.rb +0 -96
  567. data/spec/support/mock/platform.rb +0 -33
  568. data/spec/support/platform_helpers.rb +0 -284
  569. data/spec/support/platforms/prof/gc.rb +0 -51
  570. data/spec/support/platforms/prof/win32.rb +0 -45
  571. data/spec/support/platforms/win32/spec_service.rb +0 -57
  572. data/spec/support/recipe_dsl_helper.rb +0 -83
  573. data/spec/support/ruby_installer.rb +0 -51
  574. data/spec/support/shared/context/config.rb +0 -18
  575. data/spec/support/shared/context/win32.rb +0 -34
  576. data/spec/support/shared/functional/diff_disabled.rb +0 -10
  577. data/spec/support/shared/functional/directory_resource.rb +0 -178
  578. data/spec/support/shared/functional/execute_resource.rb +0 -150
  579. data/spec/support/shared/functional/file_resource.rb +0 -1047
  580. data/spec/support/shared/functional/http.rb +0 -224
  581. data/spec/support/shared/functional/knife.rb +0 -37
  582. data/spec/support/shared/functional/securable_resource.rb +0 -654
  583. data/spec/support/shared/functional/securable_resource_with_reporting.rb +0 -393
  584. data/spec/support/shared/functional/windows_script.rb +0 -260
  585. data/spec/support/shared/integration/integration_helper.rb +0 -122
  586. data/spec/support/shared/integration/knife_support.rb +0 -192
  587. data/spec/support/shared/matchers/exit_with_code.rb +0 -32
  588. data/spec/support/shared/matchers/match_environment_variable.rb +0 -17
  589. data/spec/support/shared/shared_examples.rb +0 -14
  590. data/spec/support/shared/unit/api_error_inspector.rb +0 -190
  591. data/spec/support/shared/unit/api_versioning.rb +0 -77
  592. data/spec/support/shared/unit/application_dot_d.rb +0 -82
  593. data/spec/support/shared/unit/execute_resource.rb +0 -166
  594. data/spec/support/shared/unit/file_system_support.rb +0 -70
  595. data/spec/support/shared/unit/knife_shared.rb +0 -39
  596. data/spec/support/shared/unit/mock_shellout.rb +0 -49
  597. data/spec/support/shared/unit/platform_introspector.rb +0 -189
  598. data/spec/support/shared/unit/provider/file.rb +0 -877
  599. data/spec/support/shared/unit/provider/package/package_shared.rb +0 -95
  600. data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +0 -410
  601. data/spec/support/shared/unit/resource/static_provider_resolution.rb +0 -63
  602. data/spec/support/shared/unit/script_resource.rb +0 -74
  603. data/spec/support/shared/unit/user_and_client_shared.rb +0 -114
  604. data/spec/support/shared/unit/windows_script_resource.rb +0 -65
  605. data/spec/tiny_server.rb +0 -193
  606. data/spec/unit/action_collection_spec.rb +0 -19
  607. data/spec/unit/api_client/registration_spec.rb +0 -278
  608. data/spec/unit/api_client_spec.rb +0 -341
  609. data/spec/unit/api_client_v1_spec.rb +0 -455
  610. data/spec/unit/application/agent_spec.rb +0 -0
  611. data/spec/unit/application/apply_spec.rb +0 -116
  612. data/spec/unit/application/base_spec.rb +0 -40
  613. data/spec/unit/application/client_spec.rb +0 -588
  614. data/spec/unit/application/exit_code_spec.rb +0 -145
  615. data/spec/unit/application/server_spec.rb +0 -0
  616. data/spec/unit/application/solo_spec.rb +0 -218
  617. data/spec/unit/application_spec.rb +0 -587
  618. data/spec/unit/chef_class_spec.rb +0 -240
  619. data/spec/unit/chef_fs/config_spec.rb +0 -235
  620. data/spec/unit/chef_fs/data_handler/data_bag_item_data_handler.rb +0 -82
  621. data/spec/unit/chef_fs/data_handler/data_handler_base_spec.rb +0 -65
  622. data/spec/unit/chef_fs/data_handler/group_handler_spec.rb +0 -63
  623. data/spec/unit/chef_fs/diff_spec.rb +0 -328
  624. data/spec/unit/chef_fs/file_pattern_spec.rb +0 -512
  625. data/spec/unit/chef_fs/file_system/cookbook_subdir_spec.rb +0 -34
  626. data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +0 -45
  627. data/spec/unit/chef_fs/file_system/repository/base_file_spec.rb +0 -126
  628. data/spec/unit/chef_fs/file_system/repository/directory_spec.rb +0 -175
  629. data/spec/unit/chef_fs/file_system_spec.rb +0 -150
  630. data/spec/unit/chef_fs/path_util_spec.rb +0 -108
  631. data/spec/unit/chef_spec.rb +0 -25
  632. data/spec/unit/client_spec.rb +0 -881
  633. data/spec/unit/compliance/fetcher/automate_spec.rb +0 -126
  634. data/spec/unit/compliance/fetcher/chef_server_spec.rb +0 -93
  635. data/spec/unit/compliance/input_spec.rb +0 -104
  636. data/spec/unit/compliance/profile_spec.rb +0 -120
  637. data/spec/unit/compliance/reporter/automate_spec.rb +0 -451
  638. data/spec/unit/compliance/reporter/chef_server_automate_spec.rb +0 -197
  639. data/spec/unit/compliance/reporter/compliance_enforcer_spec.rb +0 -49
  640. data/spec/unit/compliance/runner_spec.rb +0 -354
  641. data/spec/unit/compliance/waiver_spec.rb +0 -104
  642. data/spec/unit/config_fetcher_spec.rb +0 -125
  643. data/spec/unit/config_spec.rb +0 -31
  644. data/spec/unit/cookbook/chefignore_spec.rb +0 -69
  645. data/spec/unit/cookbook/cookbook_version_loader_spec.rb +0 -213
  646. data/spec/unit/cookbook/file_vendor_spec.rb +0 -123
  647. data/spec/unit/cookbook/gem_installer_spec.rb +0 -114
  648. data/spec/unit/cookbook/manifest_v0_spec.rb +0 -133
  649. data/spec/unit/cookbook/manifest_v2_spec.rb +0 -70
  650. data/spec/unit/cookbook/metadata_spec.rb +0 -610
  651. data/spec/unit/cookbook/synchronizer_spec.rb +0 -560
  652. data/spec/unit/cookbook/syntax_check_spec.rb +0 -229
  653. data/spec/unit/cookbook_loader_spec.rb +0 -265
  654. data/spec/unit/cookbook_manifest_spec.rb +0 -228
  655. data/spec/unit/cookbook_spec.rb +0 -62
  656. data/spec/unit/cookbook_uploader_spec.rb +0 -205
  657. data/spec/unit/cookbook_version_file_specificity_spec.rb +0 -623
  658. data/spec/unit/cookbook_version_spec.rb +0 -341
  659. data/spec/unit/daemon_spec.rb +0 -179
  660. data/spec/unit/data_bag_item_spec.rb +0 -387
  661. data/spec/unit/data_bag_spec.rb +0 -263
  662. data/spec/unit/data_collector/config_validation_spec.rb +0 -208
  663. data/spec/unit/data_collector_spec.rb +0 -1076
  664. data/spec/unit/decorator/lazy_array_spec.rb +0 -58
  665. data/spec/unit/decorator/lazy_spec.rb +0 -39
  666. data/spec/unit/decorator_spec.rb +0 -142
  667. data/spec/unit/delayed_evaluator_spec.rb +0 -35
  668. data/spec/unit/deprecated_spec.rb +0 -65
  669. data/spec/unit/deprecation_spec.rb +0 -129
  670. data/spec/unit/digester_spec.rb +0 -49
  671. data/spec/unit/dsl/data_query_spec.rb +0 -108
  672. data/spec/unit/dsl/declare_resource_spec.rb +0 -374
  673. data/spec/unit/dsl/platform_introspection_spec.rb +0 -160
  674. data/spec/unit/dsl/reboot_pending_spec.rb +0 -87
  675. data/spec/unit/dsl/recipe_spec.rb +0 -76
  676. data/spec/unit/dsl/registry_helper_spec.rb +0 -52
  677. data/spec/unit/dsl/render_helpers_spec.rb +0 -102
  678. data/spec/unit/dsl/resources_spec.rb +0 -85
  679. data/spec/unit/dsl/secret_spec.rb +0 -175
  680. data/spec/unit/encrypted_data_bag_item/check_encrypted_spec.rb +0 -97
  681. data/spec/unit/encrypted_data_bag_item_spec.rb +0 -439
  682. data/spec/unit/environment_spec.rb +0 -476
  683. data/spec/unit/event_dispatch/dispatcher_spec.rb +0 -172
  684. data/spec/unit/event_dispatch/dsl_spec.rb +0 -83
  685. data/spec/unit/exceptions_spec.rb +0 -132
  686. data/spec/unit/file_access_control_spec.rb +0 -308
  687. data/spec/unit/file_cache_spec.rb +0 -178
  688. data/spec/unit/file_content_management/deploy/cp_spec.rb +0 -44
  689. data/spec/unit/file_content_management/deploy/mv_unix_spec.rb +0 -113
  690. data/spec/unit/file_content_management/deploy/mv_windows_spec.rb +0 -232
  691. data/spec/unit/file_content_management/tempfile_spec.rb +0 -115
  692. data/spec/unit/formatters/base_spec.rb +0 -100
  693. data/spec/unit/formatters/doc_spec.rb +0 -110
  694. data/spec/unit/formatters/error_description_spec.rb +0 -141
  695. data/spec/unit/formatters/error_inspectors/api_error_formatting_spec.rb +0 -76
  696. data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +0 -265
  697. data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +0 -126
  698. data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +0 -43
  699. data/spec/unit/formatters/error_inspectors/node_load_error_inspector_spec.rb +0 -26
  700. data/spec/unit/formatters/error_inspectors/registration_error_inspector_spec.rb +0 -26
  701. data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +0 -191
  702. data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +0 -91
  703. data/spec/unit/guard_interpreter/resource_guard_interpreter_spec.rb +0 -155
  704. data/spec/unit/guard_interpreter_spec.rb +0 -41
  705. data/spec/unit/handler/json_file_spec.rb +0 -63
  706. data/spec/unit/handler_spec.rb +0 -308
  707. data/spec/unit/http/api_versions_spec.rb +0 -100
  708. data/spec/unit/http/authenticator_spec.rb +0 -247
  709. data/spec/unit/http/basic_client_spec.rb +0 -102
  710. data/spec/unit/http/http_request_spec.rb +0 -97
  711. data/spec/unit/http/json_input_spec.rb +0 -128
  712. data/spec/unit/http/simple_spec.rb +0 -32
  713. data/spec/unit/http/socketless_chef_zero_client_spec.rb +0 -174
  714. data/spec/unit/http/ssl_policies_spec.rb +0 -228
  715. data/spec/unit/http/validate_content_length_spec.rb +0 -207
  716. data/spec/unit/http_spec.rb +0 -235
  717. data/spec/unit/json_compat_spec.rb +0 -73
  718. data/spec/unit/key_spec.rb +0 -631
  719. data/spec/unit/log/syslog_spec.rb +0 -47
  720. data/spec/unit/log/winevt_spec.rb +0 -62
  721. data/spec/unit/lwrp_spec.rb +0 -693
  722. data/spec/unit/mixin/api_version_request_handling_spec.rb +0 -126
  723. data/spec/unit/mixin/checksum_spec.rb +0 -82
  724. data/spec/unit/mixin/convert_to_class_name_spec.rb +0 -54
  725. data/spec/unit/mixin/deep_merge_spec.rb +0 -357
  726. data/spec/unit/mixin/default_paths_spec.rb +0 -92
  727. data/spec/unit/mixin/deprecation_spec.rb +0 -57
  728. data/spec/unit/mixin/enforce_ownership_and_permissions_spec.rb +0 -96
  729. data/spec/unit/mixin/homebrew_spec.rb +0 -118
  730. data/spec/unit/mixin/lazy_module_include.rb +0 -71
  731. data/spec/unit/mixin/openssl_helper_spec.rb +0 -897
  732. data/spec/unit/mixin/params_validate_spec.rb +0 -422
  733. data/spec/unit/mixin/powershell_exec_spec.rb +0 -90
  734. data/spec/unit/mixin/powershell_out_spec.rb +0 -106
  735. data/spec/unit/mixin/powershell_type_coercions_spec.rb +0 -84
  736. data/spec/unit/mixin/properties_spec.rb +0 -107
  737. data/spec/unit/mixin/proxified_socket_spec.rb +0 -97
  738. data/spec/unit/mixin/securable_spec.rb +0 -313
  739. data/spec/unit/mixin/shell_out_spec.rb +0 -308
  740. data/spec/unit/mixin/subclass_directive_spec.rb +0 -45
  741. data/spec/unit/mixin/template_spec.rb +0 -317
  742. data/spec/unit/mixin/unformatter_spec.rb +0 -60
  743. data/spec/unit/mixin/uris_spec.rb +0 -57
  744. data/spec/unit/mixin/user_context_spec.rb +0 -99
  745. data/spec/unit/mixin/versioned_api_spec.rb +0 -128
  746. data/spec/unit/mixin/which.rb +0 -170
  747. data/spec/unit/mixin/why_run_spec.rb +0 -53
  748. data/spec/unit/mixin/windows_architecture_helper_spec.rb +0 -85
  749. data/spec/unit/mixin/xml_escape_spec.rb +0 -54
  750. data/spec/unit/monologger_spec.rb +0 -45
  751. data/spec/unit/node/attribute_spec.rb +0 -1322
  752. data/spec/unit/node/immutable_collections_spec.rb +0 -258
  753. data/spec/unit/node/vivid_mash_spec.rb +0 -500
  754. data/spec/unit/node_map_spec.rb +0 -276
  755. data/spec/unit/node_spec.rb +0 -2038
  756. data/spec/unit/org_group_spec.rb +0 -45
  757. data/spec/unit/org_spec.rb +0 -196
  758. data/spec/unit/platform/query_helpers_spec.rb +0 -48
  759. data/spec/unit/policy_builder/dynamic_spec.rb +0 -256
  760. data/spec/unit/policy_builder/expand_node_object_spec.rb +0 -311
  761. data/spec/unit/policy_builder/policyfile_spec.rb +0 -960
  762. data/spec/unit/policy_builder_spec.rb +0 -26
  763. data/spec/unit/property/state_spec.rb +0 -514
  764. data/spec/unit/property/validation_spec.rb +0 -813
  765. data/spec/unit/property_spec.rb +0 -1329
  766. data/spec/unit/provider/apt_preference_spec.rb +0 -91
  767. data/spec/unit/provider/apt_repository_spec.rb +0 -370
  768. data/spec/unit/provider/apt_update_spec.rb +0 -119
  769. data/spec/unit/provider/batch_spec.rb +0 -130
  770. data/spec/unit/provider/cookbook_file/content_spec.rb +0 -39
  771. data/spec/unit/provider/cookbook_file_spec.rb +0 -59
  772. data/spec/unit/provider/cron/unix_spec.rb +0 -144
  773. data/spec/unit/provider/cron_spec.rb +0 -1252
  774. data/spec/unit/provider/directory_spec.rb +0 -289
  775. data/spec/unit/provider/dsc_resource_spec.rb +0 -313
  776. data/spec/unit/provider/dsc_script_spec.rb +0 -173
  777. data/spec/unit/provider/execute_spec.rb +0 -244
  778. data/spec/unit/provider/file/content_spec.rb +0 -114
  779. data/spec/unit/provider/file_spec.rb +0 -58
  780. data/spec/unit/provider/git_spec.rb +0 -822
  781. data/spec/unit/provider/group/dscl_spec.rb +0 -339
  782. data/spec/unit/provider/group/gpasswd_spec.rb +0 -119
  783. data/spec/unit/provider/group/groupadd_spec.rb +0 -195
  784. data/spec/unit/provider/group/groupmod_spec.rb +0 -136
  785. data/spec/unit/provider/group/pw_spec.rb +0 -141
  786. data/spec/unit/provider/group/solaris_spec.rb +0 -106
  787. data/spec/unit/provider/group/usermod_spec.rb +0 -112
  788. data/spec/unit/provider/group/windows_spec.rb +0 -130
  789. data/spec/unit/provider/group_spec.rb +0 -285
  790. data/spec/unit/provider/http_request_spec.rb +0 -147
  791. data/spec/unit/provider/ifconfig/aix_spec.rb +0 -180
  792. data/spec/unit/provider/ifconfig/debian_spec.rb +0 -332
  793. data/spec/unit/provider/ifconfig/redhat_spec.rb +0 -83
  794. data/spec/unit/provider/ifconfig_spec.rb +0 -247
  795. data/spec/unit/provider/launchd_spec.rb +0 -234
  796. data/spec/unit/provider/link_spec.rb +0 -425
  797. data/spec/unit/provider/log_spec.rb +0 -94
  798. data/spec/unit/provider/mdadm_spec.rb +0 -138
  799. data/spec/unit/provider/mount/aix_spec.rb +0 -277
  800. data/spec/unit/provider/mount/linux_spec.rb +0 -131
  801. data/spec/unit/provider/mount/mount_spec.rb +0 -590
  802. data/spec/unit/provider/mount/solaris_spec.rb +0 -822
  803. data/spec/unit/provider/mount/windows_spec.rb +0 -150
  804. data/spec/unit/provider/mount_spec.rb +0 -222
  805. data/spec/unit/provider/package/apt_spec.rb +0 -703
  806. data/spec/unit/provider/package/bff_spec.rb +0 -188
  807. data/spec/unit/provider/package/cab_spec.rb +0 -272
  808. data/spec/unit/provider/package/chocolatey_spec.rb +0 -574
  809. data/spec/unit/provider/package/deb_spec.rb +0 -135
  810. data/spec/unit/provider/package/dnf/python_helper_spec.rb +0 -36
  811. data/spec/unit/provider/package/dpkg_spec.rb +0 -314
  812. data/spec/unit/provider/package/freebsd/pkgng_spec.rb +0 -147
  813. data/spec/unit/provider/package/freebsd/port_spec.rb +0 -151
  814. data/spec/unit/provider/package/homebrew_spec.rb +0 -402
  815. data/spec/unit/provider/package/ips_spec.rb +0 -233
  816. data/spec/unit/provider/package/macports_spec.rb +0 -203
  817. data/spec/unit/provider/package/msu_spec.rb +0 -283
  818. data/spec/unit/provider/package/openbsd_spec.rb +0 -136
  819. data/spec/unit/provider/package/pacman_spec.rb +0 -109
  820. data/spec/unit/provider/package/paludis_spec.rb +0 -134
  821. data/spec/unit/provider/package/portage_spec.rb +0 -179
  822. data/spec/unit/provider/package/powershell_spec.rb +0 -565
  823. data/spec/unit/provider/package/rpm_spec.rb +0 -440
  824. data/spec/unit/provider/package/rubygems_spec.rb +0 -1187
  825. data/spec/unit/provider/package/smartos_spec.rb +0 -110
  826. data/spec/unit/provider/package/snap_spec.rb +0 -208
  827. data/spec/unit/provider/package/solaris_spec.rb +0 -168
  828. data/spec/unit/provider/package/windows/exe_spec.rb +0 -201
  829. data/spec/unit/provider/package/windows/msi_spec.rb +0 -168
  830. data/spec/unit/provider/package/windows/registry_uninstall_entry_spec.rb +0 -78
  831. data/spec/unit/provider/package/windows_spec.rb +0 -441
  832. data/spec/unit/provider/package/yum/python_helper_spec.rb +0 -30
  833. data/spec/unit/provider/package/yum/yum_cache_spec.rb +0 -109
  834. data/spec/unit/provider/package/zypper_spec.rb +0 -494
  835. data/spec/unit/provider/package_spec.rb +0 -791
  836. data/spec/unit/provider/powershell_script_spec.rb +0 -157
  837. data/spec/unit/provider/registry_key_spec.rb +0 -487
  838. data/spec/unit/provider/remote_directory_spec.rb +0 -236
  839. data/spec/unit/provider/remote_file/cache_control_data_spec.rb +0 -245
  840. data/spec/unit/provider/remote_file/content_spec.rb +0 -253
  841. data/spec/unit/provider/remote_file/fetcher_spec.rb +0 -95
  842. data/spec/unit/provider/remote_file/ftp_spec.rb +0 -217
  843. data/spec/unit/provider/remote_file/http_spec.rb +0 -334
  844. data/spec/unit/provider/remote_file/local_file_spec.rb +0 -105
  845. data/spec/unit/provider/remote_file/network_file_spec.rb +0 -50
  846. data/spec/unit/provider/remote_file/sftp_spec.rb +0 -150
  847. data/spec/unit/provider/remote_file_spec.rb +0 -61
  848. data/spec/unit/provider/route_spec.rb +0 -268
  849. data/spec/unit/provider/ruby_block_spec.rb +0 -45
  850. data/spec/unit/provider/script_spec.rb +0 -67
  851. data/spec/unit/provider/service/aix_service_spec.rb +0 -195
  852. data/spec/unit/provider/service/aixinit_service_spec.rb +0 -272
  853. data/spec/unit/provider/service/arch_service_spec.rb +0 -326
  854. data/spec/unit/provider/service/debian_service_spec.rb +0 -273
  855. data/spec/unit/provider/service/freebsd_service_spec.rb +0 -621
  856. data/spec/unit/provider/service/gentoo_service_spec.rb +0 -145
  857. data/spec/unit/provider/service/init_service_spec.rb +0 -235
  858. data/spec/unit/provider/service/insserv_service_spec.rb +0 -75
  859. data/spec/unit/provider/service/invokercd_service_spec.rb +0 -211
  860. data/spec/unit/provider/service/macosx_spec.rb +0 -337
  861. data/spec/unit/provider/service/openbsd_service_spec.rb +0 -553
  862. data/spec/unit/provider/service/redhat_spec.rb +0 -253
  863. data/spec/unit/provider/service/simple_service_spec.rb +0 -171
  864. data/spec/unit/provider/service/solaris_smf_service_spec.rb +0 -292
  865. data/spec/unit/provider/service/systemd_service_spec.rb +0 -504
  866. data/spec/unit/provider/service/upstart_service_spec.rb +0 -322
  867. data/spec/unit/provider/service/windows_spec.rb +0 -986
  868. data/spec/unit/provider/service_spec.rb +0 -168
  869. data/spec/unit/provider/subversion_spec.rb +0 -364
  870. data/spec/unit/provider/systemd_unit_spec.rb +0 -1039
  871. data/spec/unit/provider/template/content_spec.rb +0 -169
  872. data/spec/unit/provider/template_spec.rb +0 -86
  873. data/spec/unit/provider/user/aix_spec.rb +0 -96
  874. data/spec/unit/provider/user/linux_spec.rb +0 -178
  875. data/spec/unit/provider/user/mac_spec.rb +0 -38
  876. data/spec/unit/provider/user/pw_spec.rb +0 -235
  877. data/spec/unit/provider/user/solaris_spec.rb +0 -177
  878. data/spec/unit/provider/user/windows_spec.rb +0 -198
  879. data/spec/unit/provider/user_spec.rb +0 -520
  880. data/spec/unit/provider/whyrun_safe_ruby_block_spec.rb +0 -46
  881. data/spec/unit/provider/windows_env_spec.rb +0 -385
  882. data/spec/unit/provider/windows_path_spec.rb +0 -60
  883. data/spec/unit/provider/windows_task_spec.rb +0 -436
  884. data/spec/unit/provider/yum_repository_spec.rb +0 -35
  885. data/spec/unit/provider/zypper_repository_spec.rb +0 -169
  886. data/spec/unit/provider_spec.rb +0 -215
  887. data/spec/unit/pure_application_spec.rb +0 -32
  888. data/spec/unit/recipe_spec.rb +0 -703
  889. data/spec/unit/resource/alternatives_spec.rb +0 -120
  890. data/spec/unit/resource/apt_package_spec.rb +0 -71
  891. data/spec/unit/resource/apt_preference_spec.rb +0 -39
  892. data/spec/unit/resource/apt_repository_spec.rb +0 -79
  893. data/spec/unit/resource/apt_update_spec.rb +0 -44
  894. data/spec/unit/resource/archive_file_spec.rb +0 -466
  895. data/spec/unit/resource/bash_spec.rb +0 -45
  896. data/spec/unit/resource/batch_spec.rb +0 -46
  897. data/spec/unit/resource/bff_package_spec.rb +0 -51
  898. data/spec/unit/resource/breakpoint_spec.rb +0 -64
  899. data/spec/unit/resource/build_essential_spec.rb +0 -77
  900. data/spec/unit/resource/cab_package_spec.rb +0 -64
  901. data/spec/unit/resource/chef_client_config_spec.rb +0 -145
  902. data/spec/unit/resource/chef_client_cron_spec.rb +0 -161
  903. data/spec/unit/resource/chef_client_launchd_spec.rb +0 -132
  904. data/spec/unit/resource/chef_client_scheduled_task_spec.rb +0 -186
  905. data/spec/unit/resource/chef_client_systemd_timer_spec.rb +0 -108
  906. data/spec/unit/resource/chef_client_trusted_certificate_spec.rb +0 -68
  907. data/spec/unit/resource/chef_gem_spec.rb +0 -122
  908. data/spec/unit/resource/chef_handler_spec.rb +0 -40
  909. data/spec/unit/resource/chef_sleep_spec.rb +0 -30
  910. data/spec/unit/resource/chef_vault_secret_spec.rb +0 -40
  911. data/spec/unit/resource/chocolatey_config_spec.rb +0 -93
  912. data/spec/unit/resource/chocolatey_feature_spec.rb +0 -89
  913. data/spec/unit/resource/chocolatey_installer_spec.rb +0 -151
  914. data/spec/unit/resource/chocolatey_package_spec.rb +0 -106
  915. data/spec/unit/resource/chocolatey_source_spec.rb +0 -151
  916. data/spec/unit/resource/conditional_action_not_nothing_spec.rb +0 -45
  917. data/spec/unit/resource/conditional_spec.rb +0 -254
  918. data/spec/unit/resource/cookbook_file_spec.rb +0 -93
  919. data/spec/unit/resource/cron_access_spec.rb +0 -36
  920. data/spec/unit/resource/cron_d_spec.rb +0 -84
  921. data/spec/unit/resource/cron_spec.rb +0 -167
  922. data/spec/unit/resource/csh_spec.rb +0 -45
  923. data/spec/unit/resource/directory_spec.rb +0 -69
  924. data/spec/unit/resource/dmg_package_spec.rb +0 -39
  925. data/spec/unit/resource/dnf_package_spec.rb +0 -114
  926. data/spec/unit/resource/dpkg_package_spec.rb +0 -72
  927. data/spec/unit/resource/dsc_resource_spec.rb +0 -102
  928. data/spec/unit/resource/dsc_script_spec.rb +0 -134
  929. data/spec/unit/resource/execute_spec.rb +0 -282
  930. data/spec/unit/resource/file/verification/json_spec.rb +0 -72
  931. data/spec/unit/resource/file/verification/systemd_unit_spec.rb +0 -103
  932. data/spec/unit/resource/file/verification/yaml_spec.rb +0 -67
  933. data/spec/unit/resource/file/verification_spec.rb +0 -147
  934. data/spec/unit/resource/file_spec.rb +0 -127
  935. data/spec/unit/resource/freebsd_package_spec.rb +0 -77
  936. data/spec/unit/resource/gem_package_spec.rb +0 -67
  937. data/spec/unit/resource/group_spec.rb +0 -165
  938. data/spec/unit/resource/helpers/cron_validations_spec.rb +0 -81
  939. data/spec/unit/resource/homebrew_cask_spec.rb +0 -58
  940. data/spec/unit/resource/homebrew_package_spec.rb +0 -68
  941. data/spec/unit/resource/homebrew_tap_spec.rb +0 -44
  942. data/spec/unit/resource/homebrew_update_spec.rb +0 -30
  943. data/spec/unit/resource/hostname_spec.rb +0 -47
  944. data/spec/unit/resource/http_request_spec.rb +0 -65
  945. data/spec/unit/resource/ifconfig_spec.rb +0 -101
  946. data/spec/unit/resource/inspec_input_spec.rb +0 -300
  947. data/spec/unit/resource/inspec_waiver_file_entry_spec.rb +0 -80
  948. data/spec/unit/resource/inspec_waiver_spec.rb +0 -312
  949. data/spec/unit/resource/ips_package_spec.rb +0 -54
  950. data/spec/unit/resource/kernel_module_spec.rb +0 -45
  951. data/spec/unit/resource/ksh_spec.rb +0 -45
  952. data/spec/unit/resource/launchd_spec.rb +0 -48
  953. data/spec/unit/resource/link_spec.rb +0 -120
  954. data/spec/unit/resource/locale_spec.rb +0 -189
  955. data/spec/unit/resource/log_spec.rb +0 -64
  956. data/spec/unit/resource/macos_pkg_spec.rb +0 -38
  957. data/spec/unit/resource/macos_user_defaults_spec.rb +0 -76
  958. data/spec/unit/resource/macosx_service.rb +0 -37
  959. data/spec/unit/resource/macports_package_spec.rb +0 -51
  960. data/spec/unit/resource/mdadm_spec.rb +0 -104
  961. data/spec/unit/resource/mount_spec.rb +0 -201
  962. data/spec/unit/resource/msu_package_spec.rb +0 -67
  963. data/spec/unit/resource/notify_group_spec.rb +0 -34
  964. data/spec/unit/resource/ohai_hint_spec.rb +0 -44
  965. data/spec/unit/resource/ohai_spec.rb +0 -185
  966. data/spec/unit/resource/openbsd_package_spec.rb +0 -58
  967. data/spec/unit/resource/openssl_dhparam_spec.rb +0 -61
  968. data/spec/unit/resource/openssl_ec_private_key_spec.rb +0 -64
  969. data/spec/unit/resource/openssl_ec_public_key_spec.rb +0 -43
  970. data/spec/unit/resource/openssl_rsa_private_key_spec.rb +0 -64
  971. data/spec/unit/resource/openssl_rsa_public_key_spec.rb +0 -43
  972. data/spec/unit/resource/openssl_x509_certificate_spec.rb +0 -72
  973. data/spec/unit/resource/openssl_x509_crl_spec.rb +0 -61
  974. data/spec/unit/resource/openssl_x509_request.rb +0 -68
  975. data/spec/unit/resource/osx_profile_spec.rb +0 -360
  976. data/spec/unit/resource/package_spec.rb +0 -98
  977. data/spec/unit/resource/pacman_package_spec.rb +0 -46
  978. data/spec/unit/resource/paludis_package_spec.rb +0 -36
  979. data/spec/unit/resource/perl_spec.rb +0 -44
  980. data/spec/unit/resource/plist_spec.rb +0 -130
  981. data/spec/unit/resource/portage_package_spec.rb +0 -46
  982. data/spec/unit/resource/powershell_package_source_spec.rb +0 -220
  983. data/spec/unit/resource/powershell_package_spec.rb +0 -98
  984. data/spec/unit/resource/powershell_script_spec.rb +0 -65
  985. data/spec/unit/resource/python_spec.rb +0 -40
  986. data/spec/unit/resource/reboot_spec.rb +0 -47
  987. data/spec/unit/resource/registry_key_spec.rb +0 -215
  988. data/spec/unit/resource/remote_directory_spec.rb +0 -118
  989. data/spec/unit/resource/remote_file_spec.rb +0 -220
  990. data/spec/unit/resource/resource_notification_spec.rb +0 -169
  991. data/spec/unit/resource/rest_resource_spec.rb +0 -381
  992. data/spec/unit/resource/rhsm_errata_level_spec.rb +0 -50
  993. data/spec/unit/resource/rhsm_errata_spec.rb +0 -39
  994. data/spec/unit/resource/rhsm_register_spec.rb +0 -308
  995. data/spec/unit/resource/rhsm_repo_spec.rb +0 -70
  996. data/spec/unit/resource/rhsm_subscription_spec.rb +0 -145
  997. data/spec/unit/resource/route_spec.rb +0 -100
  998. data/spec/unit/resource/rpm_package_spec.rb +0 -62
  999. data/spec/unit/resource/ruby_block_spec.rb +0 -58
  1000. data/spec/unit/resource/ruby_spec.rb +0 -39
  1001. data/spec/unit/resource/scm/git_spec.rb +0 -110
  1002. data/spec/unit/resource/scm/scm.rb +0 -122
  1003. data/spec/unit/resource/scm/subversion_spec.rb +0 -90
  1004. data/spec/unit/resource/script_spec.rb +0 -57
  1005. data/spec/unit/resource/selinux_boolean_spec.rb +0 -92
  1006. data/spec/unit/resource/selinux_fcontext_spec.rb +0 -65
  1007. data/spec/unit/resource/selinux_install_spec.rb +0 -60
  1008. data/spec/unit/resource/selinux_login_spec.rb +0 -73
  1009. data/spec/unit/resource/selinux_module_spec.rb +0 -55
  1010. data/spec/unit/resource/selinux_permissive_spec.rb +0 -39
  1011. data/spec/unit/resource/selinux_port_spec.rb +0 -42
  1012. data/spec/unit/resource/selinux_state_spec.rb +0 -46
  1013. data/spec/unit/resource/selinux_user_spec.rb +0 -92
  1014. data/spec/unit/resource/service_spec.rb +0 -203
  1015. data/spec/unit/resource/smartos_package_spec.rb +0 -52
  1016. data/spec/unit/resource/snap_package_spec.rb +0 -60
  1017. data/spec/unit/resource/solaris_package_spec.rb +0 -52
  1018. data/spec/unit/resource/ssh_known_hosts_entry_spec.rb +0 -50
  1019. data/spec/unit/resource/sudo_spec.rb +0 -99
  1020. data/spec/unit/resource/swap_file_spec.rb +0 -39
  1021. data/spec/unit/resource/sysctl_spec.rb +0 -76
  1022. data/spec/unit/resource/systemd_unit_spec.rb +0 -130
  1023. data/spec/unit/resource/template_spec.rb +0 -222
  1024. data/spec/unit/resource/timezone_spec.rb +0 -102
  1025. data/spec/unit/resource/user/linux_user_spec.rb +0 -42
  1026. data/spec/unit/resource/user/windows_user_spec.rb +0 -36
  1027. data/spec/unit/resource/user_spec.rb +0 -121
  1028. data/spec/unit/resource/user_ulimit_spec.rb +0 -66
  1029. data/spec/unit/resource/windows_ad_join_spec.rb +0 -55
  1030. data/spec/unit/resource/windows_audit_policy_spec.rb +0 -64
  1031. data/spec/unit/resource/windows_auto_run_spec.rb +0 -50
  1032. data/spec/unit/resource/windows_certificate_spec.rb +0 -95
  1033. data/spec/unit/resource/windows_defender_exclusion_spec.rb +0 -62
  1034. data/spec/unit/resource/windows_defender_spec.rb +0 -71
  1035. data/spec/unit/resource/windows_dfs_folder_spec.rb +0 -39
  1036. data/spec/unit/resource/windows_dfs_namespace_spec.rb +0 -39
  1037. data/spec/unit/resource/windows_dfs_server_spec.rb +0 -34
  1038. data/spec/unit/resource/windows_dns_record_spec.rb +0 -55
  1039. data/spec/unit/resource/windows_dns_zone_spec.rb +0 -51
  1040. data/spec/unit/resource/windows_env_spec.rb +0 -75
  1041. data/spec/unit/resource/windows_feature_dism_spec.rb +0 -57
  1042. data/spec/unit/resource/windows_feature_powershell_spec.rb +0 -83
  1043. data/spec/unit/resource/windows_feature_spec.rb +0 -64
  1044. data/spec/unit/resource/windows_firewall_profile_spec.rb +0 -77
  1045. data/spec/unit/resource/windows_firewall_rule_spec.rb +0 -510
  1046. data/spec/unit/resource/windows_font_spec.rb +0 -43
  1047. data/spec/unit/resource/windows_package_spec.rb +0 -125
  1048. data/spec/unit/resource/windows_pagefile_spec.rb +0 -44
  1049. data/spec/unit/resource/windows_path_spec.rb +0 -40
  1050. data/spec/unit/resource/windows_printer_port_spec.rb +0 -62
  1051. data/spec/unit/resource/windows_printer_spec.rb +0 -52
  1052. data/spec/unit/resource/windows_service_spec.rb +0 -122
  1053. data/spec/unit/resource/windows_share_spec.rb +0 -48
  1054. data/spec/unit/resource/windows_shortcut_spec.rb +0 -38
  1055. data/spec/unit/resource/windows_task_spec.rb +0 -403
  1056. data/spec/unit/resource/windows_uac_spec.rb +0 -50
  1057. data/spec/unit/resource/windows_update_settings_spec.rb +0 -64
  1058. data/spec/unit/resource/windows_user_privilege_spec.rb +0 -55
  1059. data/spec/unit/resource/windows_workgroup_spec.rb +0 -74
  1060. data/spec/unit/resource/yum_package_spec.rb +0 -159
  1061. data/spec/unit/resource/yum_repository_spec.rb +0 -156
  1062. data/spec/unit/resource/zypper_package_spec.rb +0 -51
  1063. data/spec/unit/resource/zypper_repository_spec.rb +0 -115
  1064. data/spec/unit/resource_builder_spec.rb +0 -1
  1065. data/spec/unit/resource_collection/resource_list_spec.rb +0 -137
  1066. data/spec/unit/resource_collection/resource_set_spec.rb +0 -244
  1067. data/spec/unit/resource_collection/stepable_iterator_spec.rb +0 -144
  1068. data/spec/unit/resource_collection_spec.rb +0 -408
  1069. data/spec/unit/resource_definition_spec.rb +0 -117
  1070. data/spec/unit/resource_inspector_spec.rb +0 -101
  1071. data/spec/unit/resource_reporter_spec.rb +0 -802
  1072. data/spec/unit/resource_resolver_spec.rb +0 -52
  1073. data/spec/unit/resource_spec.rb +0 -1484
  1074. data/spec/unit/role_spec.rb +0 -363
  1075. data/spec/unit/run_context/child_run_context_spec.rb +0 -126
  1076. data/spec/unit/run_context/cookbook_compiler_spec.rb +0 -236
  1077. data/spec/unit/run_context_spec.rb +0 -257
  1078. data/spec/unit/run_list/run_list_expansion_spec.rb +0 -147
  1079. data/spec/unit/run_list/run_list_item_spec.rb +0 -117
  1080. data/spec/unit/run_list/versioned_recipe_list_spec.rb +0 -197
  1081. data/spec/unit/run_list_spec.rb +0 -312
  1082. data/spec/unit/run_lock_spec.rb +0 -144
  1083. data/spec/unit/run_status_spec.rb +0 -144
  1084. data/spec/unit/runner_spec.rb +0 -397
  1085. data/spec/unit/scan_access_control_spec.rb +0 -183
  1086. data/spec/unit/search/query_spec.rb +0 -291
  1087. data/spec/unit/secret_fetcher/akeyless_vault_spec.rb +0 -37
  1088. data/spec/unit/secret_fetcher/aws_secrets_manager_spec.rb +0 -70
  1089. data/spec/unit/secret_fetcher/azure_key_vault_spec.rb +0 -149
  1090. data/spec/unit/secret_fetcher/hashi_vault_spec.rb +0 -126
  1091. data/spec/unit/secret_fetcher_spec.rb +0 -82
  1092. data/spec/unit/server_api_spec.rb +0 -151
  1093. data/spec/unit/server_api_versions_spec.rb +0 -66
  1094. data/spec/unit/shell/model_wrapper_spec.rb +0 -96
  1095. data/spec/unit/shell/shell_ext_spec.rb +0 -196
  1096. data/spec/unit/shell/shell_session_spec.rb +0 -218
  1097. data/spec/unit/shell_spec.rb +0 -178
  1098. data/spec/unit/train_transport_spec.rb +0 -85
  1099. data/spec/unit/user_spec.rb +0 -275
  1100. data/spec/unit/user_v1_spec.rb +0 -585
  1101. data/spec/unit/util/backup_spec.rb +0 -141
  1102. data/spec/unit/util/diff_spec.rb +0 -562
  1103. data/spec/unit/util/dsc/configuration_generator_spec.rb +0 -272
  1104. data/spec/unit/util/dsc/lcm_output_parser_spec.rb +0 -248
  1105. data/spec/unit/util/dsc/local_configuration_manager_spec.rb +0 -192
  1106. data/spec/unit/util/dsc/resource_store.rb +0 -78
  1107. data/spec/unit/util/editor_spec.rb +0 -152
  1108. data/spec/unit/util/file_edit_spec.rb +0 -224
  1109. data/spec/unit/util/powershell/ps_credential_spec.rb +0 -51
  1110. data/spec/unit/util/selinux_spec.rb +0 -160
  1111. data/spec/unit/util/threaded_job_queue_spec.rb +0 -60
  1112. data/spec/unit/util/windows/logon_session_spec.rb +0 -285
  1113. data/spec/unit/version/platform_spec.rb +0 -60
  1114. data/spec/unit/version_class_spec.rb +0 -171
  1115. data/spec/unit/version_constraint/platform_spec.rb +0 -45
  1116. data/spec/unit/version_constraint_spec.rb +0 -179
  1117. data/spec/unit/version_string_spec.rb +0 -79
  1118. data/spec/unit/win32/error_spec.rb +0 -77
  1119. data/spec/unit/win32/link_spec.rb +0 -73
  1120. data/spec/unit/win32/registry_spec.rb +0 -394
  1121. data/spec/unit/win32/security_spec.rb +0 -136
  1122. data/tasks/rspec.rb +0 -87
@@ -1,618 +0,0 @@
1
- #
2
- # Author:: Prajakta Purohit (<prajakta@chef.io>)
3
- # Author:: Lamont Granquist (<lamont@chef.io>)
4
- # Copyright:: Copyright (c) Chef Software Inc.
5
- # License:: Apache License, Version 2.0
6
- #
7
- # Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # http://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- # See the License for the specific language governing permissions and
17
- # limitations under the License.
18
- #
19
-
20
- require "spec_helper"
21
- require "chef/win32/registry"
22
-
23
- describe "Chef::Win32::Registry", :windows_only do
24
-
25
- before(:all) do
26
- # Create a registry item
27
- ::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root"
28
- ::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root\\Branch"
29
- ::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root\\B®anch"
30
- ::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root\\Branch\\Flower"
31
- ::Win32::Registry::HKEY_CURRENT_USER.open("Software\\Root", Win32::Registry::KEY_ALL_ACCESS) do |reg|
32
- reg["RootType1", Win32::Registry::REG_SZ] = "fibrous"
33
- reg.write("Roots", Win32::Registry::REG_MULTI_SZ, ["strong roots", "healthy tree"])
34
- end
35
- ::Win32::Registry::HKEY_CURRENT_USER.open("Software\\Root\\Branch", Win32::Registry::KEY_ALL_ACCESS) do |reg|
36
- reg["Strong", Win32::Registry::REG_SZ] = "bird nest"
37
- end
38
- ::Win32::Registry::HKEY_CURRENT_USER.open("Software\\Root\\Branch\\Flower", Win32::Registry::KEY_ALL_ACCESS) do |reg|
39
- reg["Petals", Win32::Registry::REG_MULTI_SZ] = %w{Pink Delicate}
40
- end
41
-
42
- # Create the node with ohai data
43
- events = Chef::EventDispatch::Dispatcher.new
44
- @node = Chef::Node.new
45
- @node.consume_external_attrs(OHAI_SYSTEM.data, {})
46
- @run_context = Chef::RunContext.new(@node, {}, events)
47
-
48
- # Create a registry object that has access ot the node previously created
49
- @registry = Chef::Win32::Registry.new(@run_context)
50
- end
51
-
52
- # Delete what is left of the registry key-values previously created
53
- after(:all) do
54
- ::Win32::Registry::HKEY_CURRENT_USER.open("Software") do |reg|
55
- reg.delete_key("Root", true)
56
- end
57
- end
58
-
59
- describe "hive_exists?" do
60
- it "returns true if the hive exists" do
61
- expect(@registry.hive_exists?("HKCU\\Software\\Root")).to eq(true)
62
- end
63
-
64
- it "returns false if the hive does not exist" do
65
- hive = expect(@registry.hive_exists?("LYRU\\Software\\Root")).to eq(false)
66
- end
67
- end
68
-
69
- describe "key_exists?" do
70
- it "returns true if the key path exists" do
71
- expect(@registry.key_exists?("HKCU\\Software\\Root\\Branch\\Flower")).to eq(true)
72
- end
73
-
74
- it "returns false if the key path does not exist" do
75
- expect(@registry.key_exists?("HKCU\\Software\\Branch\\Flower")).to eq(false)
76
- end
77
-
78
- it "throws an exception if the hive does not exist" do
79
- expect { @registry.key_exists?("JKLM\\Software\\Branch\\Flower") }.to raise_error(Chef::Exceptions::Win32RegHiveMissing)
80
- end
81
- end
82
-
83
- describe "key_exists!" do
84
- it "returns true if the key path exists" do
85
- expect(@registry.key_exists!("HKCU\\Software\\Root\\Branch\\Flower")).to eq(true)
86
- end
87
-
88
- it "throws an exception if the key path does not exist" do
89
- expect { @registry.key_exists!("HKCU\\Software\\Branch\\Flower") }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
90
- end
91
-
92
- it "throws an exception if the hive does not exist" do
93
- expect { @registry.key_exists!("JKLM\\Software\\Branch\\Flower") }.to raise_error(Chef::Exceptions::Win32RegHiveMissing)
94
- end
95
- end
96
-
97
- describe "value_exists?" do
98
- it "throws an exception if the hive does not exist" do
99
- expect { @registry.value_exists?("JKLM\\Software\\Branch\\Flower", { name: "Petals" }) }.to raise_error(Chef::Exceptions::Win32RegHiveMissing)
100
- end
101
- it "throws an exception if the key does not exist" do
102
- expect { @registry.value_exists?("HKCU\\Software\\Branch\\Flower", { name: "Petals" }) }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
103
- end
104
- it "returns true if the value exists" do
105
- expect(@registry.value_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "Petals" })).to eq(true)
106
- end
107
- it "returns true if the value exists with a case mismatch on the value name" do
108
- expect(@registry.value_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "petals" })).to eq(true)
109
- end
110
- it "returns false if the value does not exist" do
111
- expect(@registry.value_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "FOOBAR" })).to eq(false)
112
- end
113
- end
114
-
115
- describe "value_exists!" do
116
- it "throws an exception if the hive does not exist" do
117
- expect { @registry.value_exists!("JKLM\\Software\\Branch\\Flower", { name: "Petals" }) }.to raise_error(Chef::Exceptions::Win32RegHiveMissing)
118
- end
119
- it "throws an exception if the key does not exist" do
120
- expect { @registry.value_exists!("HKCU\\Software\\Branch\\Flower", { name: "Petals" }) }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
121
- end
122
- it "returns true if the value exists" do
123
- expect(@registry.value_exists!("HKCU\\Software\\Root\\Branch\\Flower", { name: "Petals" })).to eq(true)
124
- end
125
- it "returns true if the value exists with a case mismatch on the value name" do
126
- expect(@registry.value_exists!("HKCU\\Software\\Root\\Branch\\Flower", { name: "petals" })).to eq(true)
127
- end
128
- it "throws an exception if the value does not exist" do
129
- expect { @registry.value_exists!("HKCU\\Software\\Root\\Branch\\Flower", { name: "FOOBAR" }) }.to raise_error(Chef::Exceptions::Win32RegValueMissing)
130
- end
131
- end
132
-
133
- describe "data_exists?" do
134
- it "throws an exception if the hive does not exist" do
135
- expect { @registry.data_exists?("JKLM\\Software\\Branch\\Flower", { name: "Petals", type: :multi_string, data: %w{Pink Delicate} }) }.to raise_error(Chef::Exceptions::Win32RegHiveMissing)
136
- end
137
- it "throws an exception if the key does not exist" do
138
- expect { @registry.data_exists?("HKCU\\Software\\Branch\\Flower", { name: "Petals", type: :multi_string, data: %w{Pink Delicate} }) }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
139
- end
140
- it "returns true if all the data matches" do
141
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "Petals", type: :multi_string, data: %w{Pink Delicate} })).to eq(true)
142
- end
143
- it "returns true if all the data matches with a case mismatch on the data name" do
144
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "petals", type: :multi_string, data: %w{Pink Delicate} })).to eq(true)
145
- end
146
- it "returns false if the name does not exist" do
147
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "slateP", type: :multi_string, data: %w{Pink Delicate} })).to eq(false)
148
- end
149
- it "returns false if the types do not match" do
150
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "Petals", type: :string, data: "Pink" })).to eq(false)
151
- end
152
- it "returns false if the data does not match" do
153
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "Petals", type: :multi_string, data: %w{Mauve Delicate} })).to eq(false)
154
- end
155
- end
156
-
157
- describe "data_exists!" do
158
- it "throws an exception if the hive does not exist" do
159
- expect { @registry.data_exists!("JKLM\\Software\\Branch\\Flower", { name: "Petals", type: :multi_string, data: %w{Pink Delicate} }) }.to raise_error(Chef::Exceptions::Win32RegHiveMissing)
160
- end
161
- it "throws an exception if the key does not exist" do
162
- expect { @registry.data_exists!("HKCU\\Software\\Branch\\Flower", { name: "Petals", type: :multi_string, data: %w{Pink Delicate} }) }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
163
- end
164
- it "returns true if all the data matches" do
165
- expect(@registry.data_exists!("HKCU\\Software\\Root\\Branch\\Flower", { name: "Petals", type: :multi_string, data: %w{Pink Delicate} })).to eq(true)
166
- end
167
- it "returns true if all the data matches with a case mismatch on the data name" do
168
- expect(@registry.data_exists!("HKCU\\Software\\Root\\Branch\\Flower", { name: "petals", type: :multi_string, data: %w{Pink Delicate} })).to eq(true)
169
- end
170
- it "throws an exception if the name does not exist" do
171
- expect { @registry.data_exists!("HKCU\\Software\\Root\\Branch\\Flower", { name: "slateP", type: :multi_string, data: %w{Pink Delicate} }) }.to raise_error(Chef::Exceptions::Win32RegDataMissing)
172
- end
173
- it "throws an exception if the types do not match" do
174
- expect { @registry.data_exists!("HKCU\\Software\\Root\\Branch\\Flower", { name: "Petals", type: :string, data: "Pink" }) }.to raise_error(Chef::Exceptions::Win32RegDataMissing)
175
- end
176
- it "throws an exception if the data does not match" do
177
- expect { @registry.data_exists!("HKCU\\Software\\Root\\Branch\\Flower", { name: "Petals", type: :multi_string, data: %w{Mauve Delicate} }) }.to raise_error(Chef::Exceptions::Win32RegDataMissing)
178
- end
179
- end
180
-
181
- describe "get_values" do
182
- it "returns all values for a key if it exists" do
183
- values = @registry.get_values("HKCU\\Software\\Root")
184
- expect(values).to be_an_instance_of Array
185
- expect(values).to eq([{ name: "RootType1", type: :string, data: "fibrous" },
186
- { name: "Roots", type: :multi_string, data: ["strong roots", "healthy tree"] }])
187
- end
188
-
189
- it "throws an exception if the key does not exist" do
190
- expect { @registry.get_values("HKCU\\Software\\Branch\\Flower") }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
191
- end
192
-
193
- it "throws an exception if the hive does not exist" do
194
- expect { @registry.get_values("JKLM\\Software\\Branch\\Flower") }.to raise_error(Chef::Exceptions::Win32RegHiveMissing)
195
- end
196
- end
197
-
198
- describe "set_value" do
199
- it "updates a value if the key, value exist and type matches and value different" do
200
- expect(@registry.set_value("HKCU\\Software\\Root\\Branch\\Flower", { name: "Petals", type: :multi_string, data: ["Yellow", "Changed Color"] })).to eq(true)
201
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "Petals", type: :multi_string, data: ["Yellow", "Changed Color"] })).to eq(true)
202
- end
203
-
204
- it "updates a value if the type does match and the values are different" do
205
- expect(@registry.set_value("HKCU\\Software\\Root\\Branch\\Flower", { name: "Petals", type: :string, data: "Yellow" })).to eq(true)
206
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "Petals", type: :string, data: "Yellow" })).to eq(true)
207
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "Petals", type: :multi_string, data: ["Yellow", "Changed Color"] })).to eq(false)
208
- end
209
-
210
- it "creates a value if key exists and value does not" do
211
- expect(@registry.set_value("HKCU\\Software\\Root\\Branch\\Flower", { name: "Stamen", type: :multi_string, data: ["Yellow", "Changed Color"] })).to eq(true)
212
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "Stamen", type: :multi_string, data: ["Yellow", "Changed Color"] })).to eq(true)
213
- end
214
-
215
- it "does nothing if data,type and name parameters for the value are same" do
216
- expect(@registry.set_value("HKCU\\Software\\Root\\Branch\\Flower", { name: "Stamen", type: :multi_string, data: ["Yellow", "Changed Color"] })).to eq(false)
217
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "Stamen", type: :multi_string, data: ["Yellow", "Changed Color"] })).to eq(true)
218
- end
219
-
220
- it "throws an exception if the key does not exist" do
221
- expect { @registry.set_value("HKCU\\Software\\Branch\\Flower", { name: "Petals", type: :multi_string, data: ["Yellow", "Changed Color"] }) }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
222
- end
223
-
224
- it "throws an exception if the hive does not exist" do
225
- expect { @registry.set_value("JKLM\\Software\\Root\\Branch\\Flower", { name: "Petals", type: :multi_string, data: ["Yellow", "Changed Color"] }) }.to raise_error(Chef::Exceptions::Win32RegHiveMissing)
226
- end
227
-
228
- # we are validating that the data gets .to_i called on it when type is a :dword
229
-
230
- it "casts an integer string given as a dword into an integer" do
231
- expect(@registry.set_value("HKCU\\Software\\Root\\Branch\\Flower", { name: "ShouldBe32767", type: :dword, data: "32767" })).to eq(true)
232
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "ShouldBe32767", type: :dword, data: 32767 })).to eq(true)
233
- end
234
-
235
- it "casts a nonsense string given as a dword into zero" do
236
- expect(@registry.set_value("HKCU\\Software\\Root\\Branch\\Flower", { name: "ShouldBeZero", type: :dword, data: "whatdoesthisdo" })).to eq(true)
237
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "ShouldBeZero", type: :dword, data: 0 })).to eq(true)
238
- end
239
-
240
- it "throws an exception when trying to cast an array to an int for a dword" do
241
- expect { @registry.set_value("HKCU\\Software\\Root\\Branch\\Flower", { name: "ShouldThrow", type: :dword, data: %w{one two} }) }.to raise_error NoMethodError
242
- end
243
-
244
- # we are validating that the data gets .to_s called on it when type is a :string
245
-
246
- it "stores the string representation of an array into a string if you pass it an array" do
247
- expect(@registry.set_value("HKCU\\Software\\Root\\Branch\\Flower", { name: "ShouldBePainful", type: :string, data: %w{one two} })).to eq(true)
248
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "ShouldBePainful", type: :string, data: '["one", "two"]' })).to eq(true)
249
- end
250
-
251
- it "stores the string representation of a number into a string if you pass it an number" do
252
- expect(@registry.set_value("HKCU\\Software\\Root\\Branch\\Flower", { name: "ShouldBe65535", type: :string, data: 65535 })).to eq(true)
253
- expect(@registry.data_exists?("HKCU\\Software\\Root\\Branch\\Flower", { name: "ShouldBe65535", type: :string, data: "65535" })).to eq(true)
254
- end
255
-
256
- # we are validating that the data gets .to_a called on it when type is a :multi_string
257
-
258
- it "throws an exception when a multi-string is passed a number" do
259
- expect { @registry.set_value("HKCU\\Software\\Root\\Branch\\Flower", { name: "ShouldThrow", type: :multi_string, data: 65535 }) }.to raise_error NoMethodError
260
- end
261
-
262
- it "throws an exception when a multi-string is passed a string" do
263
- expect { @registry.set_value("HKCU\\Software\\Root\\Branch\\Flower", { name: "ShouldBeWat", type: :multi_string, data: "foo" }) }.to raise_error NoMethodError
264
- end
265
- end
266
-
267
- describe "create_key" do
268
- before(:all) do
269
- ::Win32::Registry::HKEY_CURRENT_USER.open("Software\\Root") do |reg|
270
-
271
- reg.delete_key("Trunk", true)
272
- rescue
273
-
274
- end
275
- end
276
-
277
- it "throws an exception if the path has missing keys but recursive set to false" do
278
- expect { @registry.create_key("HKCU\\Software\\Root\\Trunk\\Peck\\Woodpecker", false) }.to raise_error(Chef::Exceptions::Win32RegNoRecursive)
279
- expect(@registry.key_exists?("HKCU\\Software\\Root\\Trunk\\Peck\\Woodpecker")).to eq(false)
280
- end
281
-
282
- it "creates the key_path if the keys were missing but recursive was set to true" do
283
- expect(@registry.create_key("HKCU\\Software\\Root\\Trunk\\Peck\\Woodpecker", true)).to eq(true)
284
- expect(@registry.key_exists?("HKCU\\Software\\Root\\Trunk\\Peck\\Woodpecker")).to eq(true)
285
- end
286
-
287
- it "does nothing if the key already exists" do
288
- expect(@registry.create_key("HKCU\\Software\\Root\\Trunk\\Peck\\Woodpecker", false)).to eq(true)
289
- expect(@registry.key_exists?("HKCU\\Software\\Root\\Trunk\\Peck\\Woodpecker")).to eq(true)
290
- end
291
-
292
- it "throws an exception of the hive does not exist" do
293
- expect { @registry.create_key("JKLM\\Software\\Root\\Trunk\\Peck\\Woodpecker", false) }.to raise_error(Chef::Exceptions::Win32RegHiveMissing)
294
- end
295
- end
296
-
297
- describe "delete_value" do
298
- before(:all) do
299
- ::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root\\Trunk\\Peck\\Woodpecker"
300
- ::Win32::Registry::HKEY_CURRENT_USER.open("Software\\Root\\Trunk\\Peck\\Woodpecker", Win32::Registry::KEY_ALL_ACCESS) do |reg|
301
- reg["Peter", Win32::Registry::REG_SZ] = "Tiny"
302
- end
303
- end
304
-
305
- it "deletes values if the value exists" do
306
- expect(@registry.delete_value("HKCU\\Software\\Root\\Trunk\\Peck\\Woodpecker", { name: "Peter", type: :string, data: "Tiny" })).to eq(true)
307
- expect(@registry.value_exists?("HKCU\\Software\\Root\\Trunk\\Peck\\Woodpecker", { name: "Peter", type: :string, data: "Tiny" })).to eq(false)
308
- end
309
-
310
- it "does nothing if value does not exist" do
311
- expect(@registry.delete_value("HKCU\\Software\\Root\\Trunk\\Peck\\Woodpecker", { name: "Peter", type: :string, data: "Tiny" })).to eq(true)
312
- expect(@registry.value_exists?("HKCU\\Software\\Root\\Trunk\\Peck\\Woodpecker", { name: "Peter", type: :string, data: "Tiny" })).to eq(false)
313
- end
314
-
315
- it "throws an exception if the key does not exist?" do
316
- expect { @registry.delete_value("HKCU\\Software\\Trunk\\Peck\\Woodpecker", { name: "Peter", type: :string, data: "Tiny" }) }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
317
- end
318
-
319
- it "throws an exception if the hive does not exist" do
320
- expect { @registry.delete_value("JKLM\\Software\\Root\\Trunk\\Peck\\Woodpecker", { name: "Peter", type: :string, data: "Tiny" }) }.to raise_error(Chef::Exceptions::Win32RegHiveMissing)
321
- end
322
- end
323
-
324
- describe "delete_key" do
325
- before(:all) do
326
- ::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root\\Branch\\Fruit"
327
- ::Win32::Registry::HKEY_CURRENT_USER.open("Software\\Root\\Branch\\Fruit", Win32::Registry::KEY_ALL_ACCESS) do |reg|
328
- reg["Apple", Win32::Registry::REG_MULTI_SZ] = %w{Red Juicy}
329
- end
330
- ::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root\\Trunk\\Peck\\Woodpecker"
331
- ::Win32::Registry::HKEY_CURRENT_USER.open("Software\\Root\\Trunk\\Peck\\Woodpecker", Win32::Registry::KEY_ALL_ACCESS) do |reg|
332
- reg["Peter", Win32::Registry::REG_SZ] = "Tiny"
333
- end
334
- end
335
-
336
- it "deletes a key if it has no subkeys" do
337
- expect(@registry.delete_key("HKCU\\Software\\Root\\Branch\\Fruit", false)).to eq(true)
338
- expect(@registry.key_exists?("HKCU\\Software\\Root\\Branch\\Fruit")).to eq(false)
339
- end
340
-
341
- it "throws an exception if key to delete has subkeys and recursive is false" do
342
- expect { @registry.delete_key("HKCU\\Software\\Root\\Trunk", false) }.to raise_error(Chef::Exceptions::Win32RegNoRecursive)
343
- expect(@registry.key_exists?("HKCU\\Software\\Root\\Trunk\\Peck\\Woodpecker")).to eq(true)
344
- end
345
-
346
- it "deletes a key if it has subkeys and recursive true" do
347
- expect(@registry.delete_key("HKCU\\Software\\Root\\Trunk", true)).to eq(true)
348
- expect(@registry.key_exists?("HKCU\\Software\\Root\\Trunk")).to eq(false)
349
- end
350
-
351
- it "does nothing if the key does not exist" do
352
- expect(@registry.delete_key("HKCU\\Software\\Root\\Trunk", true)).to eq(true)
353
- expect(@registry.key_exists?("HKCU\\Software\\Root\\Trunk")).to eq(false)
354
- end
355
-
356
- it "throws an exception if the hive does not exist" do
357
- expect { @registry.delete_key("JKLM\\Software\\Root\\Branch\\Flower", false) }.to raise_error(Chef::Exceptions::Win32RegHiveMissing)
358
- end
359
- end
360
-
361
- describe "has_subkeys?" do
362
- before(:all) do
363
- ::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root\\Trunk"
364
- ::Win32::Registry::HKEY_CURRENT_USER.open("Software\\Root\\Trunk") do |reg|
365
-
366
- reg.delete_key("Red", true)
367
- rescue
368
-
369
- end
370
- end
371
-
372
- it "throws an exception if the hive was missing" do
373
- expect { @registry.has_subkeys?("LMNO\\Software\\Root") }.to raise_error(Chef::Exceptions::Win32RegHiveMissing)
374
- end
375
-
376
- it "throws an exception if the key is missing" do
377
- expect { @registry.has_subkeys?("HKCU\\Software\\Root\\Trunk\\Red") }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
378
- end
379
-
380
- it "returns true if the key has subkeys" do
381
- expect(@registry.has_subkeys?("HKCU\\Software\\Root")).to eq(true)
382
- end
383
-
384
- it "returns false if the key has no subkeys" do
385
- ::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root\\Trunk\\Red"
386
- expect(@registry.has_subkeys?("HKCU\\Software\\Root\\Trunk\\Red")).to eq(false)
387
- end
388
- end
389
-
390
- describe "get_subkeys" do
391
- it "throws an exception if the key is missing" do
392
- expect { @registry.get_subkeys("HKCU\\Software\\Trunk\\Red") }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
393
- end
394
- it "throws an exception if the hive does not exist" do
395
- expect { @registry.get_subkeys("JKLM\\Software\\Root") }.to raise_error(Chef::Exceptions::Win32RegHiveMissing)
396
- end
397
- it "returns the array of subkeys for a given key" do
398
- subkeys = @registry.get_subkeys("HKCU\\Software\\Root")
399
- reg_subkeys = []
400
- ::Win32::Registry::HKEY_CURRENT_USER.open("Software\\Root", Win32::Registry::KEY_ALL_ACCESS) do |reg|
401
- reg.each_key { |name| reg_subkeys << name }
402
- end
403
- expect(reg_subkeys).to eq(subkeys)
404
- end
405
- end
406
-
407
- describe "architecture" do
408
- describe "on 32-bit" do
409
- before(:all) do
410
- @saved_kernel_machine = @node.automatic_attrs[:kernel][:machine]
411
- @node.automatic_attrs[:kernel][:machine] = :i386
412
- end
413
-
414
- after(:all) do
415
- @node.automatic_attrs[:kernel][:machine] = @saved_kernel_machine
416
- end
417
-
418
- context "registry constructor" do
419
- it "throws an exception if requested architecture is 64bit but running on 32bit" do
420
- expect { Chef::Win32::Registry.new(@run_context, :x86_64) }.to raise_error(Chef::Exceptions::Win32RegArchitectureIncorrect)
421
- end
422
-
423
- it "can correctly set the requested architecture to 32-bit" do
424
- @r = Chef::Win32::Registry.new(@run_context, :i386)
425
- expect(@r.architecture).to eq(:i386)
426
- expect(@r.registry_system_architecture).to eq(0x0200)
427
- end
428
-
429
- it "can correctly set the requested architecture to :machine" do
430
- @r = Chef::Win32::Registry.new(@run_context, :machine)
431
- expect(@r.architecture).to eq(:machine)
432
- expect(@r.registry_system_architecture).to eq(0x0200)
433
- end
434
- end
435
-
436
- context "architecture setter" do
437
- it "throws an exception if requested architecture is 64bit but running on 32bit" do
438
- expect { @registry.architecture = :x86_64 }.to raise_error(Chef::Exceptions::Win32RegArchitectureIncorrect)
439
- end
440
-
441
- it "sets the requested architecture to :machine if passed :machine" do
442
- @registry.architecture = :machine
443
- expect(@registry.architecture).to eq(:machine)
444
- expect(@registry.registry_system_architecture).to eq(0x0200)
445
- end
446
-
447
- it "sets the requested architecture to 32-bit if passed i386 as a string" do
448
- @registry.architecture = :i386
449
- expect(@registry.architecture).to eq(:i386)
450
- expect(@registry.registry_system_architecture).to eq(0x0200)
451
- end
452
- end
453
- end
454
-
455
- describe "on 64-bit" do
456
- before(:all) do
457
- @saved_kernel_machine = @node.automatic_attrs[:kernel][:machine]
458
- @node.automatic_attrs[:kernel][:machine] = :x86_64
459
- end
460
-
461
- after(:all) do
462
- @node.automatic_attrs[:kernel][:machine] = @saved_kernel_machine
463
- end
464
-
465
- context "registry constructor" do
466
- it "can correctly set the requested architecture to 32-bit" do
467
- @r = Chef::Win32::Registry.new(@run_context, :i386)
468
- expect(@r.architecture).to eq(:i386)
469
- expect(@r.registry_system_architecture).to eq(0x0200)
470
- end
471
-
472
- it "can correctly set the requested architecture to 64-bit" do
473
- @r = Chef::Win32::Registry.new(@run_context, :x86_64)
474
- expect(@r.architecture).to eq(:x86_64)
475
- expect(@r.registry_system_architecture).to eq(0x0100)
476
- end
477
-
478
- it "can correctly set the requested architecture to :machine" do
479
- @r = Chef::Win32::Registry.new(@run_context, :machine)
480
- expect(@r.architecture).to eq(:machine)
481
- expect(@r.registry_system_architecture).to eq(0x0100)
482
- end
483
- end
484
-
485
- context "architecture setter" do
486
- it "sets the requested architecture to 64-bit if passed 64-bit" do
487
- @registry.architecture = :x86_64
488
- expect(@registry.architecture).to eq(:x86_64)
489
- expect(@registry.registry_system_architecture).to eq(0x0100)
490
- end
491
-
492
- it "sets the requested architecture to :machine if passed :machine" do
493
- @registry.architecture = :machine
494
- expect(@registry.architecture).to eq(:machine)
495
- expect(@registry.registry_system_architecture).to eq(0x0100)
496
- end
497
-
498
- it "sets the requested architecture to 32-bit if passed 32-bit" do
499
- @registry.architecture = :i386
500
- expect(@registry.architecture).to eq(:i386)
501
- expect(@registry.registry_system_architecture).to eq(0x0200)
502
- end
503
- end
504
- end
505
-
506
- describe "when running on an actual 64-bit server", :windows64_only do
507
- before(:all) do
508
- begin
509
- ::Win32::Registry::HKEY_LOCAL_MACHINE.open("Software\\Root", ::Win32::Registry::KEY_ALL_ACCESS | 0x0100) do |reg|
510
- reg.delete_key("Trunk", true)
511
- end
512
- rescue
513
- end
514
- begin
515
- ::Win32::Registry::HKEY_LOCAL_MACHINE.open("Software\\Root", ::Win32::Registry::KEY_ALL_ACCESS | 0x0200) do |reg|
516
- reg.delete_key("Trunk", true)
517
- end
518
- rescue
519
- end
520
- # 64-bit
521
- ::Win32::Registry::HKEY_LOCAL_MACHINE.create("Software\\Root\\Mauve", ::Win32::Registry::KEY_ALL_ACCESS | 0x0100)
522
- ::Win32::Registry::HKEY_LOCAL_MACHINE.open("Software\\Root\\Mauve", Win32::Registry::KEY_ALL_ACCESS | 0x0100) do |reg|
523
- reg["Alert", Win32::Registry::REG_SZ] = "Universal"
524
- end
525
- # 32-bit
526
- ::Win32::Registry::HKEY_LOCAL_MACHINE.create("Software\\Root\\Poosh", ::Win32::Registry::KEY_ALL_ACCESS | 0x0200)
527
- ::Win32::Registry::HKEY_LOCAL_MACHINE.open("Software\\Root\\Poosh", Win32::Registry::KEY_ALL_ACCESS | 0x0200) do |reg|
528
- reg["Status", Win32::Registry::REG_SZ] = "Lost"
529
- end
530
- end
531
-
532
- after(:all) do
533
- ::Win32::Registry::HKEY_LOCAL_MACHINE.open("Software", ::Win32::Registry::KEY_ALL_ACCESS | 0x0100) do |reg|
534
- reg.delete_key("Root", true)
535
- end
536
- ::Win32::Registry::HKEY_LOCAL_MACHINE.open("Software", ::Win32::Registry::KEY_ALL_ACCESS | 0x0200) do |reg|
537
- reg.delete_key("Root", true)
538
- end
539
- end
540
-
541
- describe "key_exists?" do
542
- it "does not find 64-bit keys in the 32-bit registry" do
543
- @registry.architecture = :i386
544
- expect(@registry.key_exists?("HKLM\\Software\\Root\\Mauve")).to eq(false)
545
- end
546
- it "finds 32-bit keys in the 32-bit registry" do
547
- @registry.architecture = :i386
548
- expect(@registry.key_exists?("HKLM\\Software\\Root\\Poosh")).to eq(true)
549
- end
550
- it "does not find 32-bit keys in the 64-bit registry" do
551
- @registry.architecture = :x86_64
552
- expect(@registry.key_exists?("HKLM\\Software\\Root\\Mauve")).to eq(true)
553
- end
554
- it "finds 64-bit keys in the 64-bit registry" do
555
- @registry.architecture = :x86_64
556
- expect(@registry.key_exists?("HKLM\\Software\\Root\\Poosh")).to eq(false)
557
- end
558
- end
559
-
560
- describe "value_exists?" do
561
- it "does not find 64-bit values in the 32-bit registry" do
562
- @registry.architecture = :i386
563
- expect { @registry.value_exists?("HKLM\\Software\\Root\\Mauve", { name: "Alert" }) }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
564
- end
565
- it "finds 32-bit values in the 32-bit registry" do
566
- @registry.architecture = :i386
567
- expect(@registry.value_exists?("HKLM\\Software\\Root\\Poosh", { name: "Status" })).to eq(true)
568
- end
569
- it "does not find 32-bit values in the 64-bit registry" do
570
- @registry.architecture = :x86_64
571
- expect(@registry.value_exists?("HKLM\\Software\\Root\\Mauve", { name: "Alert" })).to eq(true)
572
- end
573
- it "finds 64-bit values in the 64-bit registry" do
574
- @registry.architecture = :x86_64
575
- expect { @registry.value_exists?("HKLM\\Software\\Root\\Poosh", { name: "Status" }) }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
576
- end
577
- end
578
-
579
- describe "data_exists?" do
580
- it "does not find 64-bit keys in the 32-bit registry" do
581
- @registry.architecture = :i386
582
- expect { @registry.data_exists?("HKLM\\Software\\Root\\Mauve", { name: "Alert", type: :string, data: "Universal" }) }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
583
- end
584
- it "finds 32-bit keys in the 32-bit registry" do
585
- @registry.architecture = :i386
586
- expect(@registry.data_exists?("HKLM\\Software\\Root\\Poosh", { name: "Status", type: :string, data: "Lost" })).to eq(true)
587
- end
588
- it "does not find 32-bit keys in the 64-bit registry" do
589
- @registry.architecture = :x86_64
590
- expect(@registry.data_exists?("HKLM\\Software\\Root\\Mauve", { name: "Alert", type: :string, data: "Universal" })).to eq(true)
591
- end
592
- it "finds 64-bit keys in the 64-bit registry" do
593
- @registry.architecture = :x86_64
594
- expect { @registry.data_exists?("HKLM\\Software\\Root\\Poosh", { name: "Status", type: :string, data: "Lost" }) }.to raise_error(Chef::Exceptions::Win32RegKeyMissing)
595
- end
596
- end
597
-
598
- describe "create_key" do
599
- it "can create a 32-bit only registry key" do
600
- @registry.architecture = :i386
601
- expect(@registry.create_key("HKLM\\Software\\Root\\Trunk\\Red", true)).to eq(true)
602
- expect(@registry.key_exists?("HKLM\\Software\\Root\\Trunk\\Red")).to eq(true)
603
- @registry.architecture = :x86_64
604
- expect(@registry.key_exists?("HKLM\\Software\\Root\\Trunk\\Red")).to eq(false)
605
- end
606
-
607
- it "can create a 64-bit only registry key" do
608
- @registry.architecture = :x86_64
609
- expect(@registry.create_key("HKLM\\Software\\Root\\Trunk\\Blue", true)).to eq(true)
610
- expect(@registry.key_exists?("HKLM\\Software\\Root\\Trunk\\Blue")).to eq(true)
611
- @registry.architecture = :i386
612
- expect(@registry.key_exists?("HKLM\\Software\\Root\\Trunk\\Blue")).to eq(false)
613
- end
614
- end
615
-
616
- end
617
- end
618
- end