mveitas/loggly-rsyslog — pull request #2 by motns (2014-04-06 16:10:56+00:00)
Title: Consolidation

As promised, I have now added a set of basic integration tests using Test Kitchen. Typing `kitchen test` in the terminal will run all three suites via Vagrant, in sequence. You can run them in parallel by passing a flag to the command, say `-c3` to run all three tests in parallel.
With the current setup all tests are executed via Vagrant, but there are additional drivers supporting other platforms, including cloud providers. For our other cookbooks I'm in the process of adding support for running the tests in DigitalOcean, so that the tests can be run from a build server. If this is something you're also interested in, I can help set that up.

The environments are set up via a test cookbook, located under `test/cookbooks`. At the moment there is only a single recipe, and all it really does is include the `default.rb` recipe from the cookbook under test. However this pattern allows for more flexibility in the future.
After an environment is successfully converged, a set of tests are executed against it. The specs are written in [serverspec](http://serverspec.org/), and are located under `test/integration/{suite_name}/serverspec/*_spec.rb` - one for each environment (or "suite").

Next to adding Test Kitchen support, I have also made a couple of small changes to how the Loggly token is loaded:
1. **Data Bag now optional**: I have added a configuration attribute, so that people can use to set the token manually, rather than have it loaded by this cookbook for them - the default behaviour remains the same. I have extended the documentation, and the unit tests under `spec/*` accordingly.
2. **Data Bag details configurable**: I have added attributes to set the name of the Data Bag and the item. Again, I updated the specs and documentation accordingly.