Chef integration tests run using Test Kitchen.
To test the cookbook, run bundle install to install test-kitchen and dependencies, then run:
bundle exec kitchen createto create the machine imagebundle exec kitchen convergeto install Chef and converge the cookbook in the platform environmentbundle exec kitchen verifyto run the integration test suitebundle exec kitchen destroyto destroy the running machine image and release associated resources
Cookbook tests will automatically run within CircleCI build for branches that match a cdo-* cookbook name.
For example, a branch named mysql-update will match the cdo-mysql cookbook, and will run its integration
tests on each commit.
Tests run by default on Docker using the kitchen-docker driver.
First make sure Docker is installed and running locally.
Tests can be configured to run on live Amazon EC2 instances using the kitchen-ec2 driver.
To use the EC2 configuration instead of Docker, run (from within the cdo-apps/ folder):
KITCHEN_LOCAL_YAML=../.kitchen.ec2.yml bundle exec kitchen [create|converge|verify|destroy]Note that the live EC2 instance will continue consuming resources until destroy is called,
so make sure to do this at the end of your testing!