puppetlabs-onceover 5.0.3

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 (324) hide show
  1. checksums.yaml +7 -0
  2. data/.devcontainer/devcontainer.json +31 -0
  3. data/.gitattributes +2 -0
  4. data/.github/workflows/ci.yml +81 -0
  5. data/.github/workflows/mend.yml +14 -0
  6. data/.github/workflows/nightly.yml +66 -0
  7. data/.github/workflows/release.yaml +16 -0
  8. data/.github/workflows/release_prep.yml +20 -0
  9. data/.gitignore +19 -0
  10. data/.rubocop.yml +19 -0
  11. data/.rubocop_todo.yml +804 -0
  12. data/.vscode/extensions.json +4 -0
  13. data/ARCHIVE.md +395 -0
  14. data/CHANGELOG.md +25 -0
  15. data/CODEOWNERS +2 -0
  16. data/Gemfile +65 -0
  17. data/LICENSE +202 -0
  18. data/README.md +965 -0
  19. data/Rakefile +86 -0
  20. data/bin/puppetlabs-onceover +17 -0
  21. data/cucumber.yml +1 -0
  22. data/factsets/AIX-6.1-powerpc.json +210 -0
  23. data/factsets/AIX-7.1-powerpc.json +215 -0
  24. data/factsets/Amazon-2018.03.json +420 -0
  25. data/factsets/CentOS-5.11-32.json +263 -0
  26. data/factsets/CentOS-5.11-64.json +263 -0
  27. data/factsets/CentOS-6.6-32.json +306 -0
  28. data/factsets/CentOS-6.6-64.json +342 -0
  29. data/factsets/CentOS-7.0-64.json +352 -0
  30. data/factsets/CentOS-8.3.2011-64.json +485 -0
  31. data/factsets/Debian-10.4-64.json +476 -0
  32. data/factsets/Debian-6.0.10-32.json +322 -0
  33. data/factsets/Debian-6.0.10-64.json +322 -0
  34. data/factsets/Debian-7.8-32.json +338 -0
  35. data/factsets/Debian-7.8-64.json +338 -0
  36. data/factsets/Debian-8.11-64.json +480 -0
  37. data/factsets/Debian-9.12-64.json +476 -0
  38. data/factsets/RHEL-6.7.json +415 -0
  39. data/factsets/RHEL-7.4.json +489 -0
  40. data/factsets/SLES-11.3-64.json +317 -0
  41. data/factsets/SLES-12.1-64.json +353 -0
  42. data/factsets/Ubuntu-12.04-32.json +328 -0
  43. data/factsets/Ubuntu-12.04-64.json +328 -0
  44. data/factsets/Ubuntu-14.04-32.json +337 -0
  45. data/factsets/Ubuntu-14.04-64.json +373 -0
  46. data/factsets/Ubuntu-18.04-64.json +556 -0
  47. data/factsets/Ubuntu-20.04-64.json +504 -0
  48. data/factsets/Windows_Server-2008r2-64.json +184 -0
  49. data/factsets/Windows_Server-2012r2-64.json +165 -0
  50. data/factsets/solaris-10_u9-sparc-64.json +769 -0
  51. data/factsets/solaris-11.2-sparc-64.json +774 -0
  52. data/factsets/windows-10-64.json +104 -0
  53. data/features/auto_vendored.feature +27 -0
  54. data/features/cache.feature +38 -0
  55. data/features/factsets.feature +48 -0
  56. data/features/formatting.feature +36 -0
  57. data/features/help.feature +14 -0
  58. data/features/init.feature +18 -0
  59. data/features/show.feature +28 -0
  60. data/features/step_definitions/cache.rb +38 -0
  61. data/features/step_definitions/common.rb +123 -0
  62. data/features/step_definitions/formatter.rb +41 -0
  63. data/features/step_definitions/init.rb +17 -0
  64. data/features/step_definitions/run.rb +17 -0
  65. data/features/support/cache_helper.rb +54 -0
  66. data/features/support/command_helper.rb +32 -0
  67. data/features/support/controlrepo_helper.rb +36 -0
  68. data/features/support/env.rb +2 -0
  69. data/features/windows.feature +35 -0
  70. data/features/zzz_run.feature +93 -0
  71. data/lib/puppetlabs-onceover/beaker/spec_helper.rb +71 -0
  72. data/lib/puppetlabs-onceover/beaker.rb +241 -0
  73. data/lib/puppetlabs-onceover/class.rb +56 -0
  74. data/lib/puppetlabs-onceover/cli/init.rb +34 -0
  75. data/lib/puppetlabs-onceover/cli/plugins.rb +10 -0
  76. data/lib/puppetlabs-onceover/cli/run.rb +85 -0
  77. data/lib/puppetlabs-onceover/cli/show.rb +79 -0
  78. data/lib/puppetlabs-onceover/cli/update.rb +48 -0
  79. data/lib/puppetlabs-onceover/cli.rb +47 -0
  80. data/lib/puppetlabs-onceover/controlrepo.rb +688 -0
  81. data/lib/puppetlabs-onceover/deploy.rb +171 -0
  82. data/lib/puppetlabs-onceover/group.rb +78 -0
  83. data/lib/puppetlabs-onceover/logger.rb +32 -0
  84. data/lib/puppetlabs-onceover/node.rb +72 -0
  85. data/lib/puppetlabs-onceover/rake_tasks.rb +95 -0
  86. data/lib/puppetlabs-onceover/rspec/formatters.rb +315 -0
  87. data/lib/puppetlabs-onceover/runner.rb +139 -0
  88. data/lib/puppetlabs-onceover/test.rb +135 -0
  89. data/lib/puppetlabs-onceover/testconfig.rb +315 -0
  90. data/lib/puppetlabs-onceover/vendored_modules.rb +202 -0
  91. data/lib/puppetlabs-onceover/version.rb +5 -0
  92. data/puppetlabs-onceover.gemspec +40 -0
  93. data/spec/fixtures/controlrepos/basic/Puppetfile +17 -0
  94. data/spec/fixtures/controlrepos/basic/environment.conf +7 -0
  95. data/spec/fixtures/controlrepos/basic/hieradata/common.yaml +2 -0
  96. data/spec/fixtures/controlrepos/basic/hieradata/nodes/example-node.yaml +1 -0
  97. data/spec/fixtures/controlrepos/basic/manifests/site.pp +32 -0
  98. data/spec/fixtures/controlrepos/basic/manifests_alternate/site.pp +2 -0
  99. data/spec/fixtures/controlrepos/basic/site/profile/manifests/base.pp +5 -0
  100. data/spec/fixtures/controlrepos/basic/site/profile/manifests/example.pp +3 -0
  101. data/spec/fixtures/controlrepos/basic/site/role/manifests/database_server.pp +7 -0
  102. data/spec/fixtures/controlrepos/basic/site/role/manifests/example.pp +3 -0
  103. data/spec/fixtures/controlrepos/basic/site/role/manifests/webserver.pp +7 -0
  104. data/spec/fixtures/controlrepos/caching/.gitignore +1 -0
  105. data/spec/fixtures/controlrepos/caching/.travis.yml +2 -0
  106. data/spec/fixtures/controlrepos/caching/Gemfile +5 -0
  107. data/spec/fixtures/controlrepos/caching/Puppetfile +17 -0
  108. data/spec/fixtures/controlrepos/caching/Rakefile +1 -0
  109. data/spec/fixtures/controlrepos/caching/deleteme.txt +0 -0
  110. data/spec/fixtures/controlrepos/caching/environment.conf +2 -0
  111. data/spec/fixtures/controlrepos/caching/hieradata/common.yaml +2 -0
  112. data/spec/fixtures/controlrepos/caching/hieradata/nodes/example-node.yaml +1 -0
  113. data/spec/fixtures/controlrepos/caching/manifests/site.pp +33 -0
  114. data/spec/fixtures/controlrepos/caching/site/profile/manifests/base.pp +5 -0
  115. data/spec/fixtures/controlrepos/caching/site/profile/manifests/example.pp +3 -0
  116. data/spec/fixtures/controlrepos/caching/site/role/manifests/database_server.pp +7 -0
  117. data/spec/fixtures/controlrepos/caching/site/role/manifests/example.pp +3 -0
  118. data/spec/fixtures/controlrepos/caching/site/role/manifests/webserver.pp +7 -0
  119. data/spec/fixtures/controlrepos/caching/spec/factsets/Debian-10-facter-4.json +1091 -0
  120. data/spec/fixtures/controlrepos/caching/spec/factsets/README.md +7 -0
  121. data/spec/fixtures/controlrepos/caching/spec/onceover.yaml +55 -0
  122. data/spec/fixtures/controlrepos/caching/spec/pre_conditions/README.md +24 -0
  123. data/spec/fixtures/controlrepos/caching/spec/pre_conditions/escaping.pp +7 -0
  124. data/spec/fixtures/controlrepos/caching/spec/r10k.yaml +3 -0
  125. data/spec/fixtures/controlrepos/control_branch/Puppetfile +18 -0
  126. data/spec/fixtures/controlrepos/control_branch/environment.conf +2 -0
  127. data/spec/fixtures/controlrepos/custom_puppetfile/Puppetfile.custom +3 -0
  128. data/spec/fixtures/controlrepos/custom_puppetfile/environment.conf +7 -0
  129. data/spec/fixtures/controlrepos/factsets/environment.conf +1 -0
  130. data/spec/fixtures/controlrepos/factsets/site/profile/manifests/base.pp +6 -0
  131. data/spec/fixtures/controlrepos/factsets/site/role/manifests/example.pp +4 -0
  132. data/spec/fixtures/controlrepos/factsets/site/role/manifests/trusted_extensions.pp +6 -0
  133. data/spec/fixtures/controlrepos/factsets/site/role/manifests/trusted_external.pp +6 -0
  134. data/spec/fixtures/controlrepos/factsets/spec/factsets/README.md +7 -0
  135. data/spec/fixtures/controlrepos/factsets/spec/factsets/centos7_notrusted.json +530 -0
  136. data/spec/fixtures/controlrepos/factsets/spec/factsets/centos7_trusted_extensions_nested.json +535 -0
  137. data/spec/fixtures/controlrepos/factsets/spec/factsets/centos7_trusted_extensions_top.json +533 -0
  138. data/spec/fixtures/controlrepos/factsets/spec/factsets/centos7_trusted_external_nested.json +537 -0
  139. data/spec/fixtures/controlrepos/factsets/spec/factsets/centos7_trusted_external_top.json +535 -0
  140. data/spec/fixtures/controlrepos/factsets/spec/factsets/centos_7_facter_4.json +706 -0
  141. data/spec/fixtures/controlrepos/factsets/spec/factsets/centos_with_env.json +353 -0
  142. data/spec/fixtures/controlrepos/function_mocking/.gitignore +1 -0
  143. data/spec/fixtures/controlrepos/function_mocking/Puppetfile +4 -0
  144. data/spec/fixtures/controlrepos/function_mocking/Rakefile +1 -0
  145. data/spec/fixtures/controlrepos/function_mocking/environment.conf +2 -0
  146. data/spec/fixtures/controlrepos/function_mocking/site/profile/functions/fail_puppet.pp +5 -0
  147. data/spec/fixtures/controlrepos/function_mocking/site/profile/lib/puppet/functions/profile/fail_ruby.rb +9 -0
  148. data/spec/fixtures/controlrepos/function_mocking/site/profile/manifests/base.pp +10 -0
  149. data/spec/fixtures/controlrepos/function_mocking/site/role/manifests/fail.pp +7 -0
  150. data/spec/fixtures/controlrepos/function_mocking/site/role/manifests/test_data_return.pp +19 -0
  151. data/spec/fixtures/controlrepos/function_mocking/site/role/manifests/test_new_functions.pp +12 -0
  152. data/spec/fixtures/controlrepos/function_mocking/spec/onceover.yaml +50 -0
  153. data/spec/fixtures/controlrepos/minimal/environment.conf +2 -0
  154. data/spec/fixtures/controlrepos/puppet_controlrepo/.atom-build.json +9 -0
  155. data/spec/fixtures/controlrepos/puppet_controlrepo/.gitignore +5 -0
  156. data/spec/fixtures/controlrepos/puppet_controlrepo/.ruby-version +1 -0
  157. data/spec/fixtures/controlrepos/puppet_controlrepo/.travis.yml +13 -0
  158. data/spec/fixtures/controlrepos/puppet_controlrepo/Gemfile +22 -0
  159. data/spec/fixtures/controlrepos/puppet_controlrepo/Jenkinsfile +50 -0
  160. data/spec/fixtures/controlrepos/puppet_controlrepo/Puppetfile +102 -0
  161. data/spec/fixtures/controlrepos/puppet_controlrepo/README.md +4 -0
  162. data/spec/fixtures/controlrepos/puppet_controlrepo/Rakefile +33 -0
  163. data/spec/fixtures/controlrepos/puppet_controlrepo/data/common.yaml +558 -0
  164. data/spec/fixtures/controlrepos/puppet_controlrepo/data/datacenter/melbourne.yaml +12 -0
  165. data/spec/fixtures/controlrepos/puppet_controlrepo/data/datacenter/singapore.yaml +12 -0
  166. data/spec/fixtures/controlrepos/puppet_controlrepo/data/environments/development.yaml +3 -0
  167. data/spec/fixtures/controlrepos/puppet_controlrepo/data/environments/production.yaml +3 -0
  168. data/spec/fixtures/controlrepos/puppet_controlrepo/data/size/vol.large.yaml +27 -0
  169. data/spec/fixtures/controlrepos/puppet_controlrepo/environment.conf +3 -0
  170. data/spec/fixtures/controlrepos/puppet_controlrepo/hiera.yaml +25 -0
  171. data/spec/fixtures/controlrepos/puppet_controlrepo/manifests/site.pp +11 -0
  172. data/spec/fixtures/controlrepos/puppet_controlrepo/scripts/code_manager_config_version.rb +19 -0
  173. data/spec/fixtures/controlrepos/puppet_controlrepo/scripts/config_version.rb +25 -0
  174. data/spec/fixtures/controlrepos/puppet_controlrepo/scripts/config_version.sh +12 -0
  175. data/spec/fixtures/controlrepos/puppet_controlrepo/scripts/count_changed_classes.rb +26 -0
  176. data/spec/fixtures/controlrepos/puppet_controlrepo/scripts/get_changed_classes.rb +26 -0
  177. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/console/functions/user/token.pp +10 -0
  178. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/console/manifests/init.pp +14 -0
  179. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/console/manifests/user.pp +35 -0
  180. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/deployments/lib/puppet/functions/deployments/generate.rb +15 -0
  181. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/deployments/plans/signed_deployment.pp +126 -0
  182. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/facts.d/test.sh +2 -0
  183. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/files/artifactory/config_descriptor.xml +265 -0
  184. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/files/autosign.sh +23 -0
  185. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/files/hudson.tasks.Shell.xml +4 -0
  186. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/files/motd +4 -0
  187. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/files/polar_clock/index.html +198 -0
  188. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/apt.pp +9 -0
  189. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/aws_nodes.pp +54 -0
  190. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/base/aws.pp +9 -0
  191. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/base/rhel.pp +50 -0
  192. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/base/windows/hardening.pp +57 -0
  193. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/base/windows.pp +52 -0
  194. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/base.pp +79 -0
  195. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/cd4pe/artifactory.pp +64 -0
  196. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/cd4pe/connection.pp +95 -0
  197. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/cd4pe/haproxy.pp +65 -0
  198. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/cd4pe/replicated.pp +53 -0
  199. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/compile/balancer.pp +28 -0
  200. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/compile/master.pp +19 -0
  201. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/dns/host_record.pp +16 -0
  202. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/dns/server.pp +66 -0
  203. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/docker.pp +5 -0
  204. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/eyeunify/base.pp +43 -0
  205. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/eyeunify/core/database_connection.pp +42 -0
  206. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/eyeunify/core.pp +72 -0
  207. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/eyeunify/ctrl.pp +57 -0
  208. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/eyeunify/database.pp +32 -0
  209. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/eyeunify/exec.pp +11 -0
  210. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/file_sync/client.pp +165 -0
  211. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/file_sync/master_patch.pp +37 -0
  212. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/grafana/dashboard.pp +17 -0
  213. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/haproxy.pp +43 -0
  214. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/init.pp +3 -0
  215. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/jenkins/plugins.pp +87 -0
  216. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/jenkins.pp +65 -0
  217. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/jira/aio.pp +39 -0
  218. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/jira/app.pp +27 -0
  219. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/jira/db.pp +25 -0
  220. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/metrics/collectd/compile.pp +82 -0
  221. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/metrics/collectd.pp +28 -0
  222. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/metrics/dashboard.pp +28 -0
  223. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/mysql_server.pp +7 -0
  224. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/nginx.pp +24 -0
  225. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/polar_clock.pp +55 -0
  226. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/puppetmaster/api_auth.pp +82 -0
  227. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/puppetmaster/autosign.pp +33 -0
  228. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/puppetmaster/aws.pp +58 -0
  229. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/puppetmaster/tuning.pp +139 -0
  230. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/puppetmaster.pp +139 -0
  231. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/rvm.pp +13 -0
  232. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/sumologic.pp +11 -0
  233. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/sunburst/windows.pp +104 -0
  234. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/vagrant.pp +25 -0
  235. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/manifests/windows/webserver.pp +27 -0
  236. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/templates/cd4pe/connection_script.sh.epp +110 -0
  237. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/templates/controlrepo_deploy_jenkins_job.xml.epp +51 -0
  238. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/templates/dashboard.json.epp +403 -0
  239. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/templates/jenkins_secret_text.json.epp +1 -0
  240. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/templates/onceover_jenkins_job.xml.epp +51 -0
  241. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/profile/templates/userdata.epp +17 -0
  242. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/cd4pe.pp +29 -0
  243. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/clock.pp +16 -0
  244. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/compile/balancer.pp +5 -0
  245. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/compile/master.pp +5 -0
  246. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/eyeunify/aio.pp +10 -0
  247. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/eyeunify/controller.pp +10 -0
  248. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/eyeunify/database.pp +7 -0
  249. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/eyeunify/exec.pp +6 -0
  250. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/init.pp +3 -0
  251. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/lb.pp +14 -0
  252. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/metrics.pp +5 -0
  253. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/mysql.pp +13 -0
  254. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/windows/base.pp +5 -0
  255. data/spec/fixtures/controlrepos/puppet_controlrepo/site-modules/role/manifests/windows/webserver.pp +6 -0
  256. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/.gitignore +5 -0
  257. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/acceptance/nodesets/onceover-nodes.yml +94 -0
  258. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/classes/test_spec.rb +8 -0
  259. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/factsets/CentOS-7.0-64-master-2017.3.2.json +531 -0
  260. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/factsets/CentOS-7.0-64-master.json +429 -0
  261. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/factsets/CentOS-7.0-64.json +353 -0
  262. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/factsets/Windows_Server-2008r2-64.json +184 -0
  263. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/factsets/Windows_Server-2012r2-64.json +165 -0
  264. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/hiera.yaml +18 -0
  265. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/matchers/file_matchers.rb +16 -0
  266. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/onceover.yaml +54 -0
  267. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/pre_conditions/site.pp +150 -0
  268. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/r10k.yaml +2 -0
  269. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/shared_examples/helper.rb +91 -0
  270. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/unit/00_parse_spec.rb +76 -0
  271. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/unit/01_linting_spec_example.rb +69 -0
  272. data/spec/fixtures/controlrepos/puppet_controlrepo/spec/unit/03_puppetfile_spec_example.rb +35 -0
  273. data/spec/fixtures/controlrepos/vendored/Puppetfile +3 -0
  274. data/spec/fixtures/controlrepos/vendored/Puppetfile.cron +5 -0
  275. data/spec/fixtures/controlrepos/vendored/environment.conf +1 -0
  276. data/spec/fixtures/controlrepos/vendored/site-modules/role/manifests/cron.pp +9 -0
  277. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/augeas_core-puppet_agent-7.30.0.json +1 -0
  278. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/augeas_core-puppet_agent-8.6.0.json +1 -0
  279. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/cron_core-puppet_agent-7.30.0.json +1 -0
  280. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/cron_core-puppet_agent-8.6.0.json +1 -0
  281. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/host_core-puppet_agent-7.30.0.json +1 -0
  282. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/host_core-puppet_agent-8.6.0.json +1 -0
  283. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/mount_core-puppet_agent-7.30.0.json +1 -0
  284. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/mount_core-puppet_agent-8.6.0.json +1 -0
  285. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/repo_tree-puppet_agent-7.30.0.json +1 -0
  286. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/repo_tree-puppet_agent-8.6.0.json +1 -0
  287. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/scheduled_task-puppet_agent-7.30.0.json +1 -0
  288. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/scheduled_task-puppet_agent-8.6.0.json +1 -0
  289. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/selinux_core-puppet_agent-7.30.0.json +1 -0
  290. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/selinux_core-puppet_agent-8.6.0.json +1 -0
  291. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/sshkeys_core-puppet_agent-7.30.0.json +1 -0
  292. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/sshkeys_core-puppet_agent-8.6.0.json +1 -0
  293. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/yumrepo_core-puppet_agent-7.30.0.json +1 -0
  294. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/yumrepo_core-puppet_agent-8.6.0.json +1 -0
  295. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/zfs_core-puppet_agent-7.30.0.json +1 -0
  296. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/zfs_core-puppet_agent-8.6.0.json +1 -0
  297. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/zone_core-puppet_agent-7.30.0.json +1 -0
  298. data/spec/fixtures/controlrepos/vendored/spec/vendored_modules/zone_core-puppet_agent-8.6.0.json +1 -0
  299. data/spec/fixtures/controlrepos/windows/Gemfile +3 -0
  300. data/spec/fixtures/controlrepos/windows/Puppetfile +8 -0
  301. data/spec/fixtures/controlrepos/windows/environment.conf +1 -0
  302. data/spec/fixtures/controlrepos/windows/site/role/manifests/groups.pp +8 -0
  303. data/spec/fixtures/controlrepos/windows/site/role/manifests/users.pp +9 -0
  304. data/spec/fixtures/controlrepos/windows/site-modules/role/manifests/acl.pp +12 -0
  305. data/spec/fixtures/controlrepos/windows/site-modules/role/manifests/choco.pp +9 -0
  306. data/spec/fixtures/controlrepos/windows/site-modules/role/manifests/groups.pp +8 -0
  307. data/spec/fixtures/controlrepos/windows/site-modules/role/manifests/users.pp +9 -0
  308. data/spec/fixtures/controlrepos/windows/spec/onceover.yaml +24 -0
  309. data/spec/puppetlabs-onceover/controlrepo_spec.rb +18 -0
  310. data/spec/spec_helper.rb +8 -0
  311. data/templates/.fixtures.yml.erb +24 -0
  312. data/templates/Gemfile.erb +3 -0
  313. data/templates/Rakefile.erb +1 -0
  314. data/templates/acceptance_test_spec.rb.erb +66 -0
  315. data/templates/controlrepo.yaml.erb +38 -0
  316. data/templates/error_summary.yaml.erb +17 -0
  317. data/templates/factsets_README.md.erb +10 -0
  318. data/templates/nodeset.yaml.erb +12 -0
  319. data/templates/pre_conditions_README.md.erb +24 -0
  320. data/templates/spec_helper.rb.erb +35 -0
  321. data/templates/spec_helper_acceptance.rb.erb +1 -0
  322. data/templates/test_spec.rb.erb +150 -0
  323. data/templates/testconfig_Rakefile.erb +47 -0
  324. metadata +602 -0
data/README.md ADDED
@@ -0,0 +1,965 @@
1
+ # Onceover
2
+
3
+ [![License](https://img.shields.io/github/license/voxpupuli/onceover.svg)](https://github.com/voxpupuli/onceover/blob/master/LICENSE)
4
+ [![Donated by dylanratcliffe](https://img.shields.io/badge/donated%20by-dylanratcliffe-fb7047.svg)](#transfer-notice)
5
+ [![RubyGem Version](https://img.shields.io/gem/v/onceover.svg)](https://rubygems.org/gems/onceover)
6
+ [![RubyGem Downloads](https://img.shields.io/gem/dt/onceover.svg)](https://rubygems.org/gems/onceover)
7
+
8
+ *The gateway drug to automated infrastructure testing with Puppet*
9
+
10
+ Onceover is a tool to automatically run basic tests on an entire Puppet control repository.
11
+
12
+ It includes automatic parsing of the `Puppetfile`, `environment.conf` and others in order to stop silly mistakes ever reaching your Puppet Master!
13
+
14
+ **New in v3.19.1: I've reversed the decision to have onceover use `site.pp` in the same way Puppet does. From now on your `manifest` setting in `environment.conf` will be ignored and your `site.pp` will only be used if you explicitly set the `manifest` option in the CLI or config file.**
15
+
16
+ ## Table of Contents
17
+
18
+ - [Overview](#overview)
19
+ - [Quick Start](#quick-start)
20
+ - [Configuration](#configuration)
21
+ - [onceover.yaml](#onceoveryaml)
22
+ - [Factsets](#factsets)
23
+ - [Hiera](#hiera)
24
+ - [Puppetfile](#puppetfile)
25
+ - [Spec testing](#spec-testing)
26
+ - [Adding your own spec tests](#adding-your-own-spec-tests)
27
+ - [Vendored Modules](#vendored-modules)
28
+ - [Using Workarounds](#using-workarounds)
29
+ - [Extra tooling](#extra-tooling)
30
+ - [Plugins](#plugins)
31
+ - [Overriding Onceover's Templates](#overriding-onceovers-templates)
32
+ - [Accessing Onceover in a traditional RSpec test](#accessing-onceover-in-a-traditional-rspec-test)
33
+ - [Accessing fact sets in a traditional RSpec test](#accessing-fact-sets-in-a-traditional-rspec-test)
34
+ - [Accessing Roles in a traditional RSpec test](#accessing-roles-in-a-traditional-rspec-test)
35
+ - [Filtering](#filtering)
36
+ - [Extra Configuration](#extra-configuration)
37
+ - [Ruby Warnings](#ruby-warnings)
38
+ - [Rake tasks](#rake-tasks)
39
+ - [generate_fixtures](#generate_fixtures)
40
+ - [generate_vendor_cache](#generate_vendor_cache)
41
+
42
+ ## Overview
43
+
44
+ This gem provides a toolset for testing _Puppet control repository_ (ie. Repos used with r10k).
45
+
46
+ The main purpose of this project is to provide a set of tools to help smooth out the process of setting up and running `rspec-puppet` tests for a controlrepo.
47
+
48
+ Due to the fact that controlrepos are fairly standardised in nature it seemed ridiculous that you would need to set up the same testing framework that we would normally use within a module for a controlrepo. This is because at this level we are normally just running very basic tests that cover a lot of code. It would also mean that we would need to essentially duplicated our `Puppetfile` into a `.fixtures.yml` file, along with a few other things.
49
+
50
+ This toolset requires some [configuration](#configuration) before it can be used so definitely read that section before getting started.
51
+
52
+ ## Quick Start
53
+
54
+ **Note:** This assumes you are inside the root of your control-repo.
55
+
56
+ 1. Add `onceover` to your `Gemfile`:
57
+
58
+ ```ruby
59
+ gem 'onceover'
60
+ ```
61
+
62
+ 1. Run _Bundler_ to install `onceover`
63
+
64
+ ```shell
65
+ bundle install
66
+ ```
67
+
68
+ 1. Set up your configuration
69
+
70
+ ```shell
71
+ bundle exec onceover init
72
+ ```
73
+
74
+ 1. Run your spec tests!
75
+
76
+ ```shell
77
+ bundle exec onceover run spec
78
+ ```
79
+
80
+ ## Configuration
81
+
82
+ This project uses one main config file to determine what Puppet classes we should be testing and how: [onceover.yaml](#onceoveryaml).
83
+
84
+ As `onceover` tests Puppet classes, it need sets of facts to compile the Puppet code against, these are stored in [factsets](#factsets).
85
+
86
+ ### onceover.yaml
87
+
88
+ Usually located at `spec/onceover.yaml`, this path could be overrided with environment variable: `ONCEOVER_YAML`.
89
+
90
+ Hopefully this config file will be fairly self explanatory once you see it, but basically this is the place where we define what classes we want to test and the [factsets](#factsets) that we want to test them against.
91
+
92
+ #### Main settings
93
+
94
+ - `classes`
95
+
96
+ A list (array) of classes that we want to test
97
+
98
+ Classes are specified as string or **regular expressions**.
99
+ The recommended setting to have a good coverage is `/^role::/` if you use [roles and profiles method](https://puppet.com/docs/pe/latest/the_roles_and_profiles_method.html) and if you dont, you [should](https://puppet.com/docs/pe/2019.8/the_roles_and_profiles_method.html).
100
+
101
+ - `nodes`
102
+
103
+ A list (array) of nodes that we want to test against.
104
+
105
+ The nodes that we list here map directly to a [factset](#factsets), e.g. `Debian-7.8-64`
106
+
107
+ - `node_groups`
108
+
109
+ An hash of named node groups.
110
+
111
+ We can create groups by simply specifying an array of nodes to be in the group, or use the subtractive [include/exclude syntax](#includeexclude-syntax).
112
+
113
+ **Note:** A _node group_ named `all_nodes` is automatically created by `onceover`.
114
+
115
+ **Important:** The names used for the actual `class_groups` and `node_groups` must be unique.
116
+
117
+ - `class_groups`
118
+
119
+ An hash of named class groups.
120
+
121
+ We can create groups by simply specifying an array of classes (string or regexp) to be in the group, or use the subtractive [include/exclude syntax](#includeexclude-syntax).
122
+
123
+ **Note:** A _class group_ named `all_classes` is automatically created by `onceover`.
124
+
125
+ **Important:** The names used for the actual `class_groups` and `node_groups` must be unique.
126
+
127
+ - `test_matrix`
128
+
129
+ An array of hashes with the following format:
130
+
131
+ ```yaml
132
+ - {nodes_to_test}: # The name of a node or node group
133
+ classes: '{classes_to_test}' # the name of a class or
134
+ tests: '{all_tests|acceptance|spec}' # acceptance deprecated/broken, set to spec
135
+ {valid_option}: {value} # See below
136
+ ```
137
+
138
+ Valid options:
139
+
140
+ - `tags`
141
+
142
+ Default: `nil`
143
+
144
+ One or many tags that tests in this group should be tagged with.
145
+ This allows you to run only certain tests using the `--tags` command line parameter.
146
+
147
+ #### Advanced settings
148
+
149
+ - `functions`
150
+
151
+ Default: `nil`
152
+
153
+ In this section we can add functions that we want to mock when running spec tests.
154
+
155
+ Each function takes the `returns` arguments, e.g.
156
+
157
+ ```yaml
158
+ functions:
159
+ puppetdb_query:
160
+ returns: []
161
+ ```
162
+
163
+ - `before`
164
+
165
+ Default: `nil`
166
+
167
+ A block to run **before** each spec test.
168
+
169
+ For example, this can be used when the functions to stub are conditional, the following stub function `x` if the OS is windows, stub function `y` if the fact `java_installed` is true.
170
+
171
+ **Note**: The facts are available through the `node_facts` hash and the trusted facts as `trusted_facts`.
172
+
173
+ Example:
174
+ ```yaml
175
+ before:
176
+ - "Puppet::Util::Platform.stubs(:'windows?').returns(node_facts['kernel'] == 'windows')"
177
+ ```
178
+
179
+ - `after`
180
+
181
+ Default: `nil`
182
+
183
+ A block to run **after** each spec test.
184
+
185
+ **Note**: The facts are available through the `node_facts` hash and the trusted facts as `trusted_facts`.
186
+
187
+ Exmaple:
188
+
189
+ ```yaml
190
+ after:
191
+ - "puts 'Test finished running'"
192
+ ```
193
+
194
+ - `include_spec_files`
195
+
196
+ Default: `[**/*]`
197
+
198
+ Glob to select additionnal files to be run during `onceover` spec tests.
199
+
200
+ Default is to select all files located in the repo spec directory, usually `spec/`.
201
+ If you have some RSpec tests that depend on a different RSpec configuration than `onceover` or want, for example, to have a different job in your CI to run your own unit tests, you can use this option to select which spec files to run during `onceover` spec tests.
202
+
203
+ - `opts`
204
+
205
+ Default: `{}`
206
+
207
+ This setting overrides defaults for the `PuppetlabsOnceover::Controlrepo` class' `opts` hash.
208
+
209
+ Example:
210
+
211
+ ```yaml
212
+ opts:
213
+ :facts_dirs: # Remember: `opts` keys are symbols!
214
+ - 'spec/factsets' # Limit factsets to files in this repository
215
+ :debug: true # Set the `logger.level` to debug
216
+ :profile_regex: '^(profile|site)::' # Profiles include a legacy module named `site::`
217
+ :facts_files: # Factset filenames use the extension`.facts` instead of `.json`
218
+ - 'spec/factsets/*.facts'
219
+ :manifest: 'manifests/site.pp' # Manifest to use while compiling (nil by default)
220
+ ```
221
+
222
+ #### Include/Exclude syntax
223
+
224
+ This can be used with either `node_groups` or `class_groups` and allows us to save some time by using existing groups to create new ones e.g.
225
+
226
+ ```yaml
227
+ node_groups:
228
+ windows_nodes: # This has to be defined first
229
+ - sevrer2008r2
230
+ - server2012r2
231
+ non_windows:
232
+ include: 'all_nodes' # Start with all nodes
233
+ exclude: 'windows_nodes' # Then remove the windows ones from that list
234
+ ```
235
+
236
+ It's important to note that in order to reference a group using the *include/exclude* syntax it has to have been defined already i.e. it has to come above the group that references it
237
+
238
+ #### Examples
239
+
240
+ ##### Minimal
241
+
242
+ ```yaml
243
+ classes:
244
+ - /^role::/
245
+
246
+ nodes:
247
+ - Debian-10-amd64
248
+
249
+ test_matrix:
250
+ - all_nodes:
251
+ classes: 'all_classes'
252
+ tests: 'spec'
253
+ ```
254
+
255
+ ##### Advanced
256
+
257
+ In the example below we have referred to `centos6a` and `centos7b` in all of our tests as they are in `all_nodes`, `non_windows_servers` and `centos_severs`. However we have *left the more specific references to last*. This is because entries in the test_matrix will override entries above them if applicable. Meaning that we are still only testing each class on the two Centos servers once (Because the gem does de-duplication before running the tests), but also making sure we run `roles::frontend_webserver` twice before checking for idempotency.
258
+
259
+ A full example:
260
+
261
+ ```yaml
262
+ classes:
263
+ - 'roles::backend_dbserver'
264
+ - 'roles::frontend_webserver'
265
+ - 'roles::load_balancer'
266
+ - 'roles::syd_f5_load_balancer'
267
+ - 'roles::windows_server'
268
+ - '/^role/' # Note that this regex format requires `/`
269
+
270
+ nodes:
271
+ - centos6a
272
+ - centos7b
273
+ - server2008r2a
274
+ - ubuntu1404a
275
+ - ubuntu1604a
276
+
277
+ node_groups:
278
+ centos_severs:
279
+ - centos6a
280
+ - centos7b
281
+ ubuntu_servers:
282
+ - ubuntu1404a
283
+ - ubuntu1604a
284
+ non_windows_servers:
285
+ include: 'all_nodes'
286
+ exclude: 'server2008r2a'
287
+
288
+ class_groups:
289
+ windows_roles:
290
+ - 'roles::windows_server'
291
+ - 'roles::backend_dbserver'
292
+ - '/^roles::win/'
293
+ non_windows_roles:
294
+ include: 'all_classes'
295
+ exclude: 'windows_roles'
296
+
297
+ test_matrix:
298
+ - all_nodes:
299
+ classes: 'all_classes'
300
+ tests: 'spec'
301
+ - non_windows_servers:
302
+ classes: 'non_windows_roles'
303
+ - ubuntu_servers:
304
+ classes: 'all_classes'
305
+ tests: 'spec'
306
+ - centos_severs:
307
+ classes: 'roles::frontend_webserver'
308
+ tests: 'spec'
309
+ runs_before_idempotency: 2
310
+ tags:
311
+ - 'frontend'
312
+
313
+ functions:
314
+ query_resources:
315
+ returns: []
316
+ profile::custom_function:
317
+ returns: ["one", "two"]
318
+
319
+ opts:
320
+ :facts_dirs:
321
+ - spec/factsets
322
+ :profile_regex: '^(profile|site)::' # Note that this regex _doesn't_ use `/`
323
+ ```
324
+
325
+ ### Factsets
326
+
327
+ Factsets are used by the onceover gem to generate spec tests, which compile a given class against a certain set of facts.
328
+
329
+ This gem comes with a few pre-canned factsets, these are listed under the `nodes` sections of `onceover.yaml` when you run `onceover init`.
330
+
331
+ You can, and its a good pratice, add your own factsets by putting them in `spec/factsets/*.json`.
332
+
333
+ To generate these factsets all we need to do is log onto a real machine that has puppet installed and run:
334
+
335
+ ```shell
336
+ puppet facts > fact_set_name.json
337
+ ```
338
+
339
+ Its recommended to run this on each of the types of nodes that you run in your infrastructure to have good coverage.
340
+
341
+ If you are using [Trusted Facts](#trusted-facts) or [Trusted External Data](#trusted-external-data) run the following on a primary, compiler or host with the [PE client tools](https://puppet.com/docs/pe/latest/installing_pe_client_tools.html):
342
+
343
+ ```shell
344
+ puppet facts --terminus puppetdb > fact_set_name.json
345
+ ```
346
+
347
+ or
348
+
349
+ ```shell
350
+ puppet facts find <node certname> --terminus puppetdb > fact_set_name.json
351
+ ```
352
+
353
+ Factsets are named based on their filename, i.e. `myfactset` in `onceover.yaml` refers `spec/factsets/myfactset.json`
354
+
355
+ #### Trusted Facts
356
+
357
+ You can add trusted facts to the factsets by creating a new section called trusted:
358
+
359
+ ```json
360
+ {
361
+ "name": "node.puppetlabs.net",
362
+ "trusted": {
363
+ "pp_role": "agent",
364
+ "pp_datacenter": "puppet",
365
+ },
366
+ "values": {
367
+ "aio_agent_build": "1.10.4",
368
+ "aio_agent_version": "1.10.4",
369
+ "architecture": "x86_64",
370
+ ```
371
+
372
+ Notice that the `extensions` part is implied. The first fact in that example translates to `$trusted['extensions']['pp_role']` in Puppet code.
373
+
374
+ Alternatively, if you generated your factset using the PE client tools your trusted facts will be nested under the **values** hash. For example:
375
+
376
+ ```json
377
+ {
378
+ "name": "node.puppetlabs.net",
379
+ "values": {
380
+ "aio_agent_build": "1.10.4",
381
+ "aio_agent_version": "1.10.4",
382
+ "architecture": "x86_64",
383
+ "trusted": {
384
+ "extensions": {
385
+ "pp_role": "agent",
386
+ "pp_datacenter": "puppet"
387
+ }
388
+ }
389
+ ```
390
+
391
+ In this case, you're all set and onceover will auto-magically pick those up for you.
392
+
393
+ **Note**: The top level `trusted` hash takes precidence over the `trusted[extensions]` hash nested under `values`. Meaning that if you have any specified at the top level, any nested ones will not be considered. So pick **ONE** method and stick with that.
394
+
395
+ #### Trusted Certname
396
+
397
+ **Note:** When testing with Puppet >= 4.3 the trusted facts hash will have the standard trusted fact keys (certname, domain, and hostname) populated based on the node name (as set with :node).
398
+
399
+ To support the resolution of the trusted fact `certname` in auto-generated spec tests, onceover will set `:node` to the value of `trusted[certname]` where present in the source factset.
400
+
401
+ For example: A spec test generated by the factset below would result in `:node` == `node.puppetlabs.net`.
402
+
403
+ ```json
404
+ {
405
+ "name": "node.puppetlabs.net",
406
+ "values": {
407
+ "aio_agent_build": "1.10.4",
408
+ "aio_agent_version": "1.10.4",
409
+ "architecture": "x86_64",
410
+ "trusted": {
411
+ "certname": "node.puppetlabs.net",
412
+ "extensions": {
413
+ "pp_role": "agent",
414
+ "pp_datacenter": "puppet"
415
+ }
416
+ }
417
+ ```
418
+
419
+ If `trusted[certname]` is absent, the value of `:node` will default to the FQDN of the host running onceover. For example:
420
+
421
+ ```json
422
+ {
423
+ "name": "node.puppetlabs.net",
424
+ "values": {
425
+ "aio_agent_build": "1.10.4",
426
+ "aio_agent_version": "1.10.4",
427
+ "architecture": "x86_64",
428
+ "trusted": {
429
+ "extensions": {
430
+ "pp_role": "agent",
431
+ "pp_datacenter": "puppet"
432
+ }
433
+ }
434
+ ```
435
+
436
+ See the following rspec-puppet links for more information:
437
+
438
+ - [Specifying the FQDN of the test node](https://github.com/puppetlabs/rspec-puppet#specifying-the-fqdn-of-the-test-node)
439
+ - [Specifying trusted facts](https://github.com/puppetlabs/rspec-puppet#specifying-trusted-facts)
440
+
441
+ #### Trusted External Data
442
+
443
+ **Note:** This feature requires `rspec-puppet` >= 2.8.0.
444
+
445
+ You can add trusted external data to the factsets by creating a new section called trusted_external:
446
+
447
+ ```json
448
+ {
449
+ "name": "node.puppetlabs.net",
450
+ "trusted_external": {
451
+ "example_forager": {
452
+ "globalRegion": "EMEA",
453
+ "serverOwner": "John Doe"
454
+ }
455
+ },
456
+ "values": {
457
+ "aio_agent_build": "1.10.4",
458
+ "aio_agent_version": "1.10.4",
459
+ "architecture": "x86_64",
460
+ ```
461
+
462
+ Notice that the `external` part is implied, though the foragers name will still need to be provided. The first fact in that example translates to `$trusted['external']['example_forager']['globalRegion']` in Puppet code.
463
+
464
+ Alternatively, if you generated your factset using the PE client tools your trusted external data will be nested under the **values** hash. For example:
465
+
466
+ ```json
467
+ {
468
+ "name": "node.puppetlabs.net",
469
+ "values": {
470
+ "aio_agent_build": "1.10.4",
471
+ "aio_agent_version": "1.10.4",
472
+ "architecture": "x86_64",
473
+ "trusted": {
474
+ "external": {
475
+ "example_forager": {
476
+ "globalRegion": "EMEA",
477
+ "serverOwner": "John Doe"
478
+ }
479
+ }
480
+ }
481
+ ```
482
+
483
+ In this case, you're all set and onceover will auto-magically pick those up for you.
484
+
485
+ **Note**: The top level `trusted_external` hash takes precidence over the `trusted[external]` hash nested under `values`. Meaning that if you have any specified at the top level, any nested ones will not be considered. So pick **ONE** method and stick with that.
486
+
487
+ ### Hiera
488
+
489
+ If you have hiera data inside your controlrepo (or somewhere else) `onceover` can be configured to use it.
490
+ It is however worth noting the `hiera.yaml` file that you currently use may not be applicable for testing right away.
491
+ For example; if you are using `hiera-eyaml` I recommend creating a `hiera.yaml` purely for testing that simply uses the `yaml` backend, meaning that you don't need to provide the private keys to the testing machines.
492
+
493
+ It is also worth noting that any hiera hierarchies that are based on custom facts will not work unless those facts are part of your factsets.
494
+ Trusted facts will also not work at all as the catalogs are being compiled without the node's certificate.
495
+ In these instances it may be worth creating a hierarchy level that simply includes dummy data for testing purposes in order to avoid hiera lookup errors.
496
+
497
+ ### Puppetfile
498
+
499
+ Organisations often reference modules from their own git servers in the `Puppetfile`, like this:
500
+
501
+ ```ruby
502
+ mod "puppetlabs-apache",
503
+ :git => "https://git.megacorp.com/pup/puppetlabs-apache.git",
504
+ :tag => "v5.4.0"
505
+ ```
506
+
507
+ Under the hood, `onceover` uses `r10k` to download the modules in your `Puppetfile`.
508
+ If you get errors downloading modules from `git`, its because `r10k`'s call to your underlying `git` command has failed.
509
+ `onceover` tells you the command that `r10k` tried to run, so if you get an error like this:
510
+
511
+ ```text
512
+ INFO -> Updating module /Users/dylan/control-repo/.onceover/etc/puppetlabs/code/environments
513
+ /production/modules/apache
514
+ ERROR -> Command exited with non-zero exit code:
515
+ Command: git --git-dir /Users/dylan/.r10k/git/ssh---git.megacorp.com-pup-puppetlabs_apache.git fetch origin --prune
516
+ Stderr:
517
+ ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory
518
+ Host key verification failed.
519
+
520
+ fatal: Could not read from remote repository.
521
+
522
+ Please make sure you have the correct access rights
523
+ and the repository exists.
524
+ Exit code: 128
525
+ ```
526
+
527
+ Then the approach to debug it would be to run the command that Onceover suggested:
528
+
529
+ ```shell
530
+ git --git-dir /Users/dylan/.r10k/git/ssh---git.megacorp.com-pup-puppetlabs_apache.git fetch origin --prune
531
+ ```
532
+
533
+ In this case, running the command interactively gives us a prompt to add the server to our `~/.ssh/known_hosts` file, which fixes the problem permanently:
534
+
535
+ ```shell
536
+ $ git --git-dir /Users/dylan/.r10k/git/ssh---git.megacorp.com-pup-puppetlabs_apache.git fetch origin --prune
537
+ ```
538
+
539
+ ```text
540
+ The authenticity of host 'git.megacorp.com (123.456.789.101)' can't be established.
541
+ ...
542
+ Warning: Permanently added 'git.megacorp.com,123.456.789.101' (RSA) to the list of known hosts.
543
+ ```
544
+
545
+ The other way to resolve this would have been to install the `ssh_askpass` program, but this can spam the screen with modal dialogs on some platforms.
546
+
547
+ #### r10k configuration
548
+
549
+ If you have custom r10k config that you want to use, place the `r10k.yaml` file in one of the following locations:
550
+
551
+ - `{repo root}/r10k.yaml`
552
+ - `{repo root}/spec/r10k.yaml`
553
+
554
+ A good use of this is [enabling multi threading](https://github.com/puppetlabs/r10k/blob/master/doc/dynamic-environments/configuration.mkd#pool_size) by creating the following in `r10k.yaml`:
555
+
556
+ ```yaml
557
+ # spec/r10k.yaml
558
+ ---
559
+ pool_size: 20
560
+ ```
561
+
562
+ #### Creating the config file
563
+
564
+ If your `hiera.yaml` is version 4 or 5 and lives in the root of the controlrepo (as it should), Onceover will pick this up automatically. If you would like to make changes to this file for testing purposes, create a copy under `spec/hiera.yaml`. Onceover will use this version of the hiera config file first if it exists.
565
+
566
+ #### Setting the `datadir`
567
+
568
+ | Hiera Version | Config File Location | Required datadir |
569
+ |---------------|----------------------|------------------|
570
+ | 3 | `spec` folder | relative to the root of the repo e.g. `data` |
571
+ | 4 *deprecated* | Root of repo | relative to the root of the repo e.g. `data` |
572
+ | 4 *deprecated* | `spec` folder | relative to the spec folder e.g. `../data` |
573
+ | 5 | Root of repo | relative to the root of the repo e.g. `data` |
574
+ | 5 | `spec` folder | relative to the spec folder e.g. `../data` |
575
+
576
+ #### `hiera-eyaml`
577
+
578
+ If you are using the `hiera-eyaml` backend there are some modifications that you will need to make in order to ensure that things actually work. Remember that when onceover compiles catalogs it is actually using hiera with your config file to do the lookups on the host that is running the tests, meaning that the `hiera-eyaml` gem will need to be present (put it in your Gemfile), as will the keys in the correct location, otherwise hiera will fail to load them. *This is really not a great situation as you don't want to be distributing your private keys*
579
+
580
+ **Recommended Solution:** I recommend that if you are using `hiera-eyaml` (which you probably should be) that you do the following:
581
+
582
+ 1. Duplicate your `hiera.yaml` file so that there is a copy in the `spec/` directory
583
+ 1. Change the `datadir` setting as described above
584
+ 1. Remove the eyaml backend entirely and just use the base yaml backend. For hiera 5 this will look like:
585
+
586
+ ```yaml
587
+ ---
588
+ version: 5
589
+ defaults:
590
+ datadir: "../data"
591
+ data_hash: yaml_data
592
+ ```
593
+
594
+ This means that for testing, hiera will just return the encrypted string for anything that is encrypted using eyaml. This usually isn't a problem for catalog compilation and will allow tests to pass.
595
+
596
+ ## Spec testing
597
+
598
+ Once you have your `onceover.yaml` and factsets set up you are ready to go with spec testing.
599
+
600
+ To run the tests:
601
+
602
+ `onceover run spec`
603
+
604
+ This will do the following things:
605
+
606
+ 1. Create a temporary directory under `.onceover`
607
+ 2. Clone all repos in the Puppetfile into the temporary directory
608
+ 3. Generate tests that use rspec-puppet
609
+ 4. Run the tests
610
+
611
+ ### Adding your own spec tests
612
+
613
+ When using this gem adding your own spec tests is exactly the same as if you were to add them to a module, simply create them under `spec/{classes,defines,etc.}` in the Controlrepo and they will be run like normal, along with all of the `it { should compile }` tests.
614
+
615
+ ### Exposing Puppet output
616
+
617
+ If you want to see Puppet's output, you can set the `SHOW_PUPPET_OUTPUT` environment variable to `true`, eg:
618
+
619
+ `SHOW_PUPPET_OUTPUT=true onceover run spec`
620
+
621
+ ### Vendored Modules
622
+
623
+ As of Puppet 6.0 some resource types were removed from Puppet and repackaged as individual modules. These supported type modules are still included in the `puppet-agent` package, so you don't have to download them from the Forge. However, this does not apply to the `puppet` gem used when spec testing. This frequently results in users wondering why their Puppet manifests apply just fine on a node, but their tests fail with messages like `Unknown resource type: cron_core` for example. A common workaround for this problem was to add said modules into your Puppetfile, thus requiring manual management.
624
+
625
+ Onceover now has the ability to remove that manual process for you by querying Github's API to determine which versions are in use by the version of the [puppet-agent package](https://github.com/puppetlabs/puppet-agent/tree/main/configs/components) you are testing against.
626
+
627
+ This functionality is opt in, so to use it configure the following:
628
+
629
+ ```yaml
630
+ # onceover.yaml
631
+ opts:
632
+ auto_vendored: true
633
+ ```
634
+
635
+ or on the cli:
636
+
637
+ ```shell
638
+ bundle exec onceover run spec --auto_vendored=true
639
+ ```
640
+
641
+ Essentially what this is doing is resolving any of these [supported type modules](https://www.puppet.com/docs/puppet/8/type#supported-type-modules-in-puppet-agent) that are not already specified in your Puppetfile, and adding them to the copy Onceover uses to deploy into its working directory structure.
642
+
643
+ CI/CD pipeline users are encouraged to provide Onceover with a cache of the module versions to test against in order to avoid hitting Githubs API ratelimit. To do so, the [generate_vendor_cache](#generate_vendor_cache) rake task can be used to populate the cache into your `spec/vendored_modules` directory.
644
+
645
+ ## Using workarounds
646
+
647
+ There may be situations where you cannot test everything that is in your puppet code, some common reasons for this include:
648
+
649
+ - Code is destined for a Puppet Master but the VM image is not a Puppet Master which means we can't restart certain services etc.
650
+ - A file is being pulled from somewhere that is only accessible in production
651
+ - Something is trying to connect to something else that does not exist
652
+
653
+ Fear not! There is a solution for this, it's also a good way to practice writing *nasty* puppet code. For this exact purpose I have added the ability for onceover to include extra bits of code in the tests to fix things like this. All you need to do is put a file/s containing puppet code here:
654
+
655
+ `spec/pre_conditions/*.pp`
656
+
657
+ What this will do is it will take any puppet code from any files it finds in that directory and have it executed alongside the code that you are actually testing. For example if we are testing some code that notifies the `pe-puppetserver` service, but are not managing that service in our code because it is managed by the PE module that ships with Puppet Enterprise the following code will fail:
658
+
659
+ ```puppet
660
+ file { '/etc/puppetlabs/puppet/puppet.conf':
661
+ ensure => file,
662
+ content => '#nothing',
663
+ notify => Service['pe-puppetserver'], # This will fail without the PE module!
664
+ }
665
+ ```
666
+
667
+ To fix this we can add the service to the pre_conditions to make sure that our catalogs can compile e.g.
668
+
669
+ ```puppet
670
+ # spec/pre_conditions/services.pp
671
+ service { 'pe-puppetserver':
672
+ ensure => 'running',
673
+ }
674
+ ```
675
+
676
+ You can also mock out defined resources or types that you cannot gain access to easily, such as `puppet_enterprise::mcollective::client`:
677
+
678
+ ```puppet
679
+ define puppet_enterprise::mcollective::client (
680
+ $activemq_brokers,
681
+ $logfile = '/var/log',
682
+ $create_user = true,
683
+ ) {
684
+
685
+ }
686
+ ```
687
+
688
+ or
689
+
690
+ ```puppet
691
+ define pe_ini_setting (
692
+ $ensure = present,
693
+ $path,
694
+ $section,
695
+ $setting,
696
+ $value,
697
+ ) {
698
+ }
699
+ ```
700
+
701
+ [Resource collectors](https://docs.puppetlabs.com/puppet/latest/reference/lang_resources_advanced.html#amending-attributes-with-a-collector) are likely to come in handy here too. They allow you to override values of resources that match given criteria. This way we can override things for the sake of testing without having to change the code.
702
+
703
+ **NOTE:** If you want to access the class or factset that onceover is running against just use the `$onceover_class` and `$onceover_node` variables respectively.
704
+
705
+ ## Extra Tooling
706
+
707
+ ### Plugins
708
+
709
+ Onceover now allows for plugins. To use a plugin simply install a gem with a name that starts with `onceover-` and onceover will activate it.
710
+
711
+ Useful plugins:
712
+
713
+ - [onceover-codequality](https://github.com/declarativesystems/onceover-codequality) _Check lint and syntax_
714
+ - [onceover-octocatalog-diff](https://github.com/voxpupuli/onceover-octocatalog-diff) _See the differences between two versions of a catalog_
715
+
716
+ If you want to write your own plugin, take a look at [onceover-helloworld](https://github.com/declarativesystems/onceover-helloworld) to help you get started.
717
+
718
+ ### Inspecting and updating the Puppetfile
719
+
720
+ Onceover comes with some extra commands for interacting with the Puppetfile in useful ways. These are:
721
+
722
+ `onceover show puppetfile`
723
+
724
+ This will display all the current versions of all modules that are in the Puppetfile alongside the latest versions and whether or not they are out of date. This is a useful took for making sure your modules don't get too stale.
725
+
726
+ `onceover update puppetfile`
727
+
728
+ This takes your Puppetfile and actually modifies all of the module versions in there to the latest versions and saves the file. This is useful for setting up automated Puppetfile updates, just get Jenkins or Bamboo to:
729
+
730
+ 1. Check out the Controlrepo
731
+ 2. Run onceover to get a passing baseline
732
+ 3. Update the Puppetfile with the latest versions of all modules
733
+ 4. Run Onceover again
734
+ 5. Create a pull request if all tests pass
735
+
736
+ ### Overriding Onceover's Templates
737
+
738
+ Onceover uses templates to create a bunch of files in the `.onceover` directory, these templates can be modified if required. To do this create your own custom template with the same name os the original in the `spec/templates/` directory and it will be used in preference to the default template. e.g. `spec/templates/spec_helper.rb.erb`
739
+
740
+ ### Accessing Onceover in a traditional RSpec test
741
+
742
+ If you would like to use `onceover.yaml` to manage which tests you want to run, but want more than just `it { should_compile }` tests to be run you can write you own as follows:
743
+
744
+ ```ruby
745
+ # spec/classes/role_spec.rb
746
+ require 'spec_helper'
747
+ require 'puppetlabs-onceover/controlrepo'
748
+ require 'helpers/shared_examples'
749
+
750
+ PuppetlabsOnceover::Controlrepo.new.spec_tests do |class_name, node_name, facts, trusted_facts, trusted_external_data, pre_conditions|
751
+ describe class_name do
752
+ context "on #{node_name}" do
753
+ let(:facts) { facts }
754
+ let(:trusted_facts) { trusted_facts }
755
+ let(:trusted_external_data) { trusted_external_data }
756
+ let(:pre_condition) { pre_conditions }
757
+
758
+ it_behaves_like 'soe'
759
+ end
760
+ end
761
+ end
762
+ ```
763
+
764
+ This will use the `soe` [shared example](https://web.archive.org/web/20220319011206/https://relishapp.com/rspec/rspec-core/docs/example-groups/shared-examples) on all of the tests that are configured in your `onceover.yaml` including any [pre_conditions](#using-workarounds) that you have set up.
765
+
766
+ **Note:** Onceover will automatically run any extra Rspec tests that it finds in the normal directories `spec/{classes,defines,unit,functions,hosts,integration,types}` so you can easily use auto-generated spec tests in conjunction with your own Rspec tests.
767
+
768
+ ### Accessing fact sets in a traditional RSpec test
769
+
770
+ We can access all of our fact sets using `PuppetlabsOnceover::Controlrepo.facts`. Normally it would be implemented something like this:
771
+
772
+ ```ruby
773
+ PuppetlabsOnceover::Controlrepo.facts.each do |facts|
774
+ context "on #{facts['fqdn']}" do
775
+ let(:facts) { facts }
776
+ it { should compile }
777
+ end
778
+ end
779
+ ```
780
+
781
+ ### Other (possibly less useful) methods
782
+
783
+ The following code will test all roles that onceover can find (ignoring the ones configured in `onceover.yaml`) on all nodes in native rspec:
784
+
785
+ ```ruby
786
+ require 'spec_helper'
787
+ require 'puppetlabs-onceover/controlrepo'
788
+ PuppetlabsOnceover::Controlrepo.roles.each do |role|
789
+ describe role do
790
+ PuppetlabsOnceover::Controlrepo.facts.each do |facts|
791
+ context "on #{facts['fqdn']}" do
792
+ let(:facts) { facts }
793
+ it { should compile }
794
+ end
795
+ end
796
+ end
797
+ end
798
+ ```
799
+
800
+ This will iterate over each role in the controlrepo and test that it compiles with each set of facts.
801
+
802
+ The same can also be done with profiles just by using the profiles method instead:
803
+
804
+ ```ruby
805
+ require 'spec_helper'
806
+ require 'puppetlabs-onceover'
807
+ PuppetlabsOnceover::Controlrepo.profiles.each do |profile|
808
+ describe profile do
809
+ PuppetlabsOnceover::Controlrepo.facts.each do |facts|
810
+ context "on #{facts['fqdn']}" do
811
+ let(:facts) { facts }
812
+ it { should compile }
813
+ end
814
+ end
815
+ end
816
+ end
817
+ ```
818
+
819
+ It is not limited to just doing simple "It should compile" tests. You can put any tests you want in here.
820
+
821
+ Also since the `profiles`, `roles` and `facts` methods simply return arrays, you can iterate over them however you would like i.e. you could write a different set of tests for each profile and then just use the `facts` method to run those tests on every fact set.
822
+
823
+ ### Filtering
824
+
825
+ You can also filter your fact sets based on the value of any fact, including structured facts. (It will drill down into nested hashes and match those too, it's not just a dumb equality match)
826
+
827
+ Just pass a hash to the `facts` method and it will return only the fact sets with facts that match the hash e.g. Testing a certain profile on against only your Windows fact sets:
828
+
829
+ ```ruby
830
+ require 'spec_helper'
831
+ require 'puppetlabs-onceover'
832
+
833
+ describe 'profile::windows_appserver' do
834
+ PuppetlabsOnceover::Controlrepo.facts({
835
+ 'kernel' => 'windows'
836
+ }).each do |facts|
837
+ context "on #{facts['fqdn']}" do
838
+ let(:facts) { facts }
839
+ it { should compile }
840
+ end
841
+ end
842
+ end
843
+ ```
844
+
845
+ ### Extra Configuration
846
+
847
+ You can modify the regexes that the gem uses to filter classes that it finds into roles and profiles. Just set up a Controlrepo object and pass regexes to the below settings.
848
+
849
+ ```ruby
850
+ repo = PuppetlabsOnceover::Controlrepo.new()
851
+ repo.role_regex = /.*/ # Tells the class how to find roles, will be applied to repo.classes
852
+ repo.profile_regex = /.*/ # Tells the class how to find profiles, will be applied to repo.classes
853
+ ```
854
+
855
+ Note that you will need to call the `roles` and `profiles` methods on the object you just instantiated, not the main class e.g. `repo.roles` not PuppetlabsOnceover::Controlrepo.roles
856
+
857
+ ### Ruby Warnings
858
+
859
+ When running onceover with `--debug` you will see ruby warnings in your test output such as `warning: constant ::Fixnum is deprecated`. This is because when running without `--debug` onceover sets the `RUBYOPT` environment variable to `-W0` during the run. If you would like to run in debug mode but still want to suppress ruby warnings, simply run the following command before your tests:
860
+
861
+ ```shell
862
+ export RUBYOPT='-W0'
863
+ ```
864
+
865
+ It is also worth noting if you want to use `RUBYOPT` for some other reason when testing you will **need** to use `--debug` to stop it being clobbered by onceover.
866
+
867
+ ### Rake tasks
868
+
869
+ I have included a couple of little rake tasks to help get you started with testing your control repos. Set them up by adding this to your `Rakefile`
870
+
871
+ ```ruby
872
+ require 'puppetlabs-onceover/rake_tasks'
873
+ ```
874
+
875
+ The tasks are as follows:
876
+
877
+ #### generate_fixtures
878
+
879
+ `bundle exec rake generate_fixtures`
880
+
881
+ This task will go though your Puppetfile, grab all of the modules in there and convert them into a `.fixtures.yml` file. (You only need this if you are writing your own custom spec tests) It will also take the `environment.conf` file into account, check to see if you have any relative pathed directories and also include them into the `.fixtures.yml` as symlinks. e.g. If your files look like this:
882
+
883
+ **Puppetfile**
884
+
885
+ ```ruby
886
+ forge "http://forgeapi.puppetlabs.com"
887
+
888
+ # Modules from the Puppet Forge
889
+ mod "puppetlabs/stdlib", "4.6.0"
890
+ mod "puppetlabs/apache", "1.5.0"
891
+ ```
892
+
893
+ **environment.conf**
894
+
895
+ ```ini
896
+ modulepath = site:modules:$basemodulepath
897
+ environment_timeout = 0
898
+ ```
899
+
900
+ Then the `.fixtures.yml` file that this rake task will create will look like this:
901
+
902
+ ```yaml
903
+ ---
904
+ fixtures:
905
+ symlinks:
906
+ profiles: site/profiles
907
+ roles: site/roles
908
+ forge_modules:
909
+ stdlib:
910
+ repo: puppetlabs/stdlib
911
+ ref: 4.6.0
912
+ apache:
913
+ repo: puppetlabs/apache
914
+ ref: 1.5.0
915
+ ```
916
+
917
+ Notice that the symlinks are not the ones that we provided in `environment.conf`? This is because the rake task will go into each of directories, find the modules and create a symlink for each of them (This is what rspec expects).
918
+
919
+ #### generate_vendor_cache
920
+
921
+ `bundle exec rake generate_vendor_cache`
922
+
923
+ This task will query Github's API to determine the versions of the vendored modules in use by the version of the puppet agent you are testing against, and cache that information in `control-repo/spec/vendored_modules`. This way your pipelines won't need to reach out for this information each time Onceover is ran with `auto_vendored` enabled.
924
+
925
+ ## Developing Onceover
926
+
927
+ Install gem dependencies:
928
+
929
+ `bundle install`
930
+
931
+ Clone the submodules
932
+
933
+ `git submodule init && git submodule update --recursive`
934
+
935
+ Execute tests
936
+
937
+ `bundle exec rake`
938
+
939
+ ## Contributors
940
+
941
+ Cheers to all of those who helped out:
942
+
943
+ - @jessereynolds
944
+ - @op-ct
945
+ - @GeoffWilliams
946
+ - @beergeek
947
+ - @jairojunior
948
+ - @natemccurdy
949
+ - @aardvark
950
+ - @Mandos
951
+ - @Nekototori
952
+ - @LMacchi
953
+ - @tabakhase
954
+ - @binford2k
955
+ - @raphink
956
+ - @tequeter
957
+ - @alexjfisher
958
+ - @smortex
959
+ - @16c7x
960
+ - @neomilium
961
+ - @chlawren
962
+
963
+ ## Transfer Notice
964
+
965
+ This project was originally authored by dylanratcliffe. The maintainer preferred that Vox Pupuli take ownership of the project for future improvement and maintenance. Existing pull requests and issues were transferred over, please fork and continue to contribute here instead of voxpupuli-onceover.