All Projects → amolenaar → salt-formula-testing

amolenaar / salt-formula-testing

Licence: other
Test Salt formulas and states with ease

Programming Languages

python
139335 projects - #7 most used programming language
SaltStack
118 projects
ruby
36898 projects - #4 most used programming language
shell
77523 projects

Test Salt Formulas and States with ease Build Status

This is an example repo, showing how salt configuration can be (regression) tested with use of Testinfra.

Directory layout

  • salt - The Salt states and formula
  • pillar - Salt pillar data
  • test - The actual tests
  • vagrant - Contains Vagrant configuration for easy testing (our development machine, so to speak).

Getting started

First make sure you have Vagrant (1.8.1+) installed. From a terminal, enter the vagrant folder and launch the Vagrant box:

$ vagrant up

This will prepare a test machine, Don't worry, you can still change your salt formulas and tests locally.

One the machine is booted, log in to the machine and go to the folder containing the tests. From there you can run the tests:

$ vagrant ssh
...
$ cd /srv/test
$ testinfra -v

This (demo) setup contains two setups: one for CentOS 7 and one for Ubuntu 15.

The Salt states are tested against both configurations.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].