salt-bootstrap/tests
Pedro Algarvio 849162a9fd Some getopts and logic fixes. Added one test case for config only mode.
* `getopt` was ignoring `-C`.
* Fixed some logic which should stop execution in some cases(regarding the config only mode execution)
* Added a test case to test if script execution stops if config mode is enabled and no config dir is provided.
2013-02-13 16:38:37 +00:00
..
bootstrap Some getopts and logic fixes. Added one test case for config only mode. 2013-02-13 16:38:37 +00:00
ext Switched the bootstrap script unit testing to python. Refs #38. 2013-02-04 01:05:37 +00:00
README.rst Add a readme for the tests. 2013-02-07 04:51:47 +00:00
runtests.py Fix gathering data when running separate tests. 2013-02-08 11:30:32 +00:00

Salt Bootstrap Script - Integration Testing

Testing salt-bootstrap requires both Python and Perl.

Yes, it's weird that a shell script uses either one of the above languages for testing itself, the explanation though, is simple.

Perl is required because we use a script, checkbashisms, which does exactly what it's name says. In our case, it tries it's best to find non POSIX compliant code in our bootstrap script since we require the script to be able to properly execute in any POSIX compliant shell.

Python is used in the integration tests. It greatly simplifies running these tests and can even provide some JUnit compliant XML used to generate reports of those tests. Doing this job in shell scripting would be too cumbersome and too complicated.

Running the tests suite

Running the tests suite is as simple as:

python tests/runtests.py

For additional information on the available options:

python tests/runtests.py --help

Warning

The test suite is destructive. It will install/un-install packages on your system.