Information Technology Reference
In-Depth Information
When you are not interactively coding tests, you probably want to run kitchen converge ,
kitchen setup , and so on all in one fell swoop instead of needing to remember all the indi-
vidual Test Kitchen actions to run tests.
The kitchen test command will run the following commands in sequence:
1. kitchen destroy (if necessary)
2. kitchen create
3. kitchen converge
4. kitchen setup
5. kitchen verify
6. kitchen destroy
You wouldn't want to use this command locally when you are writing tests, as for some
cookbooks the process of creating a virtual machine and performing an initial converge can
be quite time consuming, and you wouldn't want the environment automatically destroyed in
the end. But Test Kitchen is a perfect command for a continual integration environment such
as Jenkins. It's also a good idea to do a final kitchen test run against a clean setup before
committing your Chef code to source control.
Go ahead and run kitchen test now, so you can see it in action. Plus, it will destroy our
test environment. Note that kitchen test runs all five phases automatically for you:
$ kitchen test
-----> Starting Kitchen (v1.2.1)
-----> Cleaning up any prior instances of <default-centos65>
-----> Destroying <default-centos65>...
...
-----> Testing <default-centos65>
-----> Creating <default-centos65>...
Bringing machine 'default' up with 'virtualbox' provider...
...
Vagrant instance <default-centos65> created.
Finished creating <default-centos65> (0m35.57s).
-----> Converging <default-centos65>...
Preparing files for transfer
Resolving cookbook dependencies with Berkshelf 3.1.5...
Search WWH ::




Custom Search