layout | title | date | summary |
---|---|---|---|
post |
How to run the test suite |
2021-10-20 |
A very short description of how to run the vox pupuli test suite. |
The Vox Pupuli test suite consists of several parts:
bundle install
Check out the following page if you want to add a test suite to your module or want to learn more about the Vox Pupuli test helpers:
- voxpupuli-test for unit testing
- voxpupuli-acceptance for acceptance testing
Vox Pupuli uses puppet-lint for better code quality. To run it:
bundle exec rake lint
To automatically fix puppet-lint issues you can use:
bundle exec rake lint_fix
bundle exec rake spec
If you have multiple cpu cores available we suggest using the following command:
bundle exec rake parallel_spec
Single test file could be run by:
bundle exec rspec spec/classes/myclass_spec.rb
bundle exec rake spec SPEC=spec/classes/myclass_spec.rb
To limit test execution to a certain os or os release you can set the environment variable SPEC_FACTS_OS
.
export SPEC_FACTS_OS=centos
export SPEC_FACTS_OS=centos-7
BEAKER_SETFILE=centos7-64 bundle exec rake beaker
How to run the acceptance tests is described more in detail on this page: voxpupuli-acceptance
If REFERENCE.md is now out of date you can fix it with:
bundle exec rake strings:generate:reference