[icinga-checkins] icinga.org: chef-icinga2/master: Add TESTING.md

git at icinga.org git at icinga.org
Fri Aug 5 16:23:52 CEST 2016

Module: chef-icinga2
Branch: master
Commit: 07be7f12bc728f1adc73cb6b7d24305ac9ae569c
URL:    https://git.icinga.org/?p=chef-icinga2.git;a=commit;h=07be7f12bc728f1adc73cb6b7d24305ac9ae569c

Author: Blerim Sheqa <blerim.sheqa at netways.de>
Date:   Thu Aug  4 13:59:41 2016 +0200



 TESTING.md |   64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/TESTING.md b/TESTING.md
new file mode 100644
index 0000000..4a524de
--- /dev/null
+++ b/TESTING.md
@@ -0,0 +1,64 @@
+# Testing
+## Prerequisites
+We recommend to intall [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-icinga2.git
+cd chef-icinga2
+chef exec bundle install
+## Integration 
+### Requirements
+* [Vagrant]
+* [VirtualBox] (other Vagrant provider may work but are not tested)
+### Run Tests
+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 create server-ubuntu-1404
+kitchen converge server-ubuntu-1404
+kitchen setup server-ubuntu-1404
+kitchen verify server-ubuntu-1404
+kitchen destroy server-ubuntu-1404
+List existing instances
+kitchen list
+## Spec
+Unit tests are implemented in [ChefSpec]/[RSpec]:
+chef exec rake spec
+## Foodcritic
+Linting is done with [Foodcritic]:
+chef exec rake foodcritic
+## Rubocop
+Ruby code is analyzed with [Rubocop]:
+chef exec rake rubocop
+[ChefDK]: https://downloads.chef.io/chef-dk/
+[Vagrant]: https://www.vagrantup.com/
+[Virtualbox]: https://www.virtualbox.org/
+[ChefSpec]: https://docs.chef.io/chefspec.html
+[RSpec]: http://rspec.info/
+[Foodcritic]: http://www.foodcritic.io/
+[Rubocop]: https://github.com/bbatsov/rubocop
\ No newline at end of file

More information about the icinga-checkins mailing list