Follow Gerrit topic [[ https://gerrit.wikimedia.org/r/#/q/topic:rspec-puppet+(status:open+OR+status:merged) | rspec-puppet ]]
The operations/puppet.git has a ton of manifests and a good share of ruby functions to extend puppet. None of them are tested and we definitely need unit tests for them. We recently had a cluster wide surge of puppet failures due to a bad usage of the os_version() helper provided in modules/wmflib.
During summer 2013, Alexandros Andrew and I attempted to add some rspec based test for the puppet repository. Since rspec-puppet ends up loading all the global manifests that was kind of slow. Now that our puppet manifests are split in modules it is way faster.
Antoine started a base using bundler and the rspec-puppet v2.0.0 gem. Proposed as: https://gerrit.wikimedia.org/r/#/c/178810/ It has a single example to test the wmflib os_version() function.
Example run:
Dan, Subbu, Zeljkof, and Chris definitely have experience with ruby / bundle / rspec. I guess they can help polish up / finish it.
After a sprint, the rspec integration is complete and Jenkins craft a test report:
