This module has grown over time based on a range of contributions from people using it. If you follow these contributing guidelines your patch will likely make it into a release a little quicker.
-
Fork the repo.
-
Create a separate branch for your change.
-
Run the tests. We only take pull requests with passing tests, and documentation.
-
Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, please add a test.
-
Squash your commits down into logical components. Make sure to rebase against the current master.
-
Push the branch to your fork and submit a pull request.
Please be prepared to repeat some of these steps as our contributors review your code.
The testing and development tools have a bunch of dependencies, all managed by bundler.
By default the tests use a baseline version of Puppet.
Install the dependencies like so...
bundle install
Run rubocop
to detect style issues and perform fixes:
bundle exec rubocop -a .
The unit test suite covers most of the code, as mentioned above please add tests if you're adding new functionality.
The unit tests currently run against a real vault instance running in server -dev
mode.
This can be seen in ./spec/support/vault_server.rb).
You will need Vault in your path for this to work.
To run your all the unit tests
bundle exec rake spec SPEC_OPTS='--format documentation'
To run a specific spec test set the SPEC
variable:
bundle exec rake spec SPEC=spec/foo_spec.rb:123
The unit tests just check the code runs, not that it does exactly what we want on a real machine. For that we're using beaker.
This fires up a simple Docker cluster and runs a series of simple tests against it after applying the module. You can run this with:
bundle exec rake acceptance