We recommend to install ChefDK to your development environment. It provides all tools used in the process of testig this cookbook.
Before starting, make sure you have installed all dependencies:
git clone https://github.com/Icinga/chef-icingaweb2.git icingaweb2
cd icingaweb2
To run all test suits on all platforms:
kitchen test
Instead of running all integration tests, you can specify each suite and platform to create the instances. All steps can be run separately.
kitchen verify chef13package-amazon
kitchen destroy chef13package-amazon
List existing instances
kitchen list
Unit tests are implemented in ChefSpec/RSpec:
/opt/chefdk/bin/chef exec rake spec
Linting is done with Foodcritic:
/opt/chefdk/bin/chef exec rake foodcritic
Ruby code is analyzed with Rubocop:
/opt/chefdk/bin/chef exec rake rubocop