This is intended to be a replacement for [KitchenCI](https://test-kitchen.chef.io/) and [kitchen-salt](https://github.com/saltstack/kitchen-salt), focussing on testing SaltStack states using Vagrant and Pytest/Testinfra.
--config CONFIG Specify the configuration file to use
--env Write environment file for direct use of Vagrant
--suite SUITE Specify the suite to run
--stop Stop running machines
--test Start machines and run tests
--status Get Vagrant deployment status
--refresh Re-sync files and re-run bootstrap scripts
--force-stop Invoke Vagrant destruction without having detected any running VM's
```
## Command line examples
* To run a complete test suite:
`$ scullery --suite <name of suite> --test`
* To create Vagrant VM's without invoking the tests:
`$ scullery --suite <name of suite>`
* To refresh the VM's Salt files:
`$ scullery --suite <name of suite> --refresh`
* To stop the VM's and tidy up:
`$ scullery --suite <name of suite> --stop`
## Interacting with Vagrant
It is possible to directly interact with the Vagrant environment templated by Scullery. To do so, generate an environment file by adding `--env` to any command line call - for example:
`$ scullery --suite <name of suite> --env`
This will write a `.scullery_env` file to the current working directory. Export the environment variables in the file using your Shell, afterwards use `vagrant` like you normally would. Example for `bash`/`sh`:
```
$ set -a; . .scullery_env; set +a
$ vagrant ssh # or any other Vagrant command
```
Do not forget to unset the exported variables before you call Scullery with a different `--suite`!
## Hacking
To test Scullery itself, call Pytest with your favourite arguments from the repository root:
```
$ pytest -v -rx -x tests/*.py
```
Make sure to not have _any_ other Scullery based Vagrant VM's running in the same Libvirt session and no `SCULLERY_*` or `VAGRANT_*` variables exported in your shell.
The complete test suite takes about 30 minutes to execute on an Intel i7-6820HQ CPU with SSHD storage. If you want to test only certain functionality, simply add `-k <name of test function>`.
## License
This project is licensed under the European Union Public License found in the file `LICENSE`.