Introducing kitchen-salt, a salt provisioner for test-kitchen

Over the last week I’ve been working on kitchen-salt, a SaltStack
provisioner for Test Kitchen, this allows you to perform integration
testing on salt-formula. Test Kitchen will create a VM (through
Vagrant, LXC, OpenStack, ec2 etc), install a version of salt of your
choosing, apply a given set of states & then optionally allow you to
perform some automated validation of the states via the supported
testing frameworks (bats, serverspec etc).

The tests can all be run from your workstation, but we’ve also just
started plugging this into our CI system, so that changes are gated on a
successful test run, hopefully preventing bad states ever making it into
a branch.

I’ve started a walkthrough of setting up a working Test Kitchen
environment & adding a test-kitchen support to an existing formula, you
can see it here:

kitchen-salt supports multiple salt install vectors (apt & bootstrap,
apt allows you to specify a version & repo to pull from) & setting of
pillars & state_top. Test Kitchen allows you to define suites of tests,
and you can change the pillars, state_top and installed version of salt
per suite too, so you can test many different scenarios.

You can find the full project here:

Looking forward to some feedback & hopefully some PR’s

I’m not going to SaltConf, but I will be at @cfgmgmtcamp in Gent in a
few weeks, see you soon!

2 thoughts on “Introducing kitchen-salt, a salt provisioner for test-kitchen”

Leave a Reply

Your email address will not be published. Required fields are marked *