-
Notifications
You must be signed in to change notification settings - Fork 23
Home
All the required dependencies can be installed by bundler. Install the bundler gem with gem install bundler
and then install the rest of the gems with bundler install
All static analysis can be run with rake test
. Any push to the repo will cause a Travis CI build job to run all static analysis.
All code must conform to the Puppet Style Guide. Tests are performed using puppet-lint. To run the lint tests only, use rake lint
Syntax checks are performed using puppet-syntax. To run syntax tests only, use rake syntax
Internal logic of the module should have test coverage, using puppet-rspec tests. These can be run with rake spec
Integration tests can be run with test-kitchen and librarian-puppet. This builds vagrant machines for all the supported platforms specified in .kitchen.yml
and tries to apply the puppet module and dependencies as defined in manifests/test_site.pp
. Afterwards, it runs the serverspec tests in test/integration/default/serverspec/redmine_spec.rb
to confirm redmine is running.
To run the tests, you need to be running ruby 1.9.3 or later. To run the integration steps you can do the following:
-
kitchen create
to build all the required vagrant VMs -
kitchen converge
to apply the puppet module on the VMs -
kitchen verify
to run the test suite and validate the redmine install -
kitchen destroy
to shut down and remove all the VMs
When debugging a problem, you can make a change and then run kitchen converge
and kitchen validate
to check your changes. You can see the current state of all the VMs by running kitchen list
. If you need to inspect a VM, use kitchen login <instance>
.
Integration tests are meant for local testing, and aren't automated at present.