test scripts for validating deployments
To run the tests on a local machine:
You want to make sure that you are part of the LXD group and running the latest kernel for your distribution. See here for Trusty instructions.
$ ./runtests
If you have a MAAS and a few systems you can run the tests with Juju:
juju bootstrap maaslab test-controller
juju add-machine
# Machine 1 added
./runner-juju 1
Passing certain variables to the runner to control it's testing mechanism.
KEEP - Do not tear down controller when finished.
# Juju
./runner-juju 1 KEEP=1
# Locally
KEEP=1 ./runtests
SPELLTEST - Set this to a spell to only run this spell's test.
# Juju
./runner-juju 1 SPELLTEST=openstack-novalxd
# Locally
SPELLTEST=openstack-novalxd ./runtests
SPELLDIR - Set this to use a local copy of spells rather than whats provided in the snap.
juju ssh 1 <<EOF
git clone https://github.com/conjure-up/spells local-spells
EOF
# Juju
./runner-juju 1 SPELLDIR=$HOME/local-spells
# Locally
SPELLDIR=$HOME/local-spells ./runtests
CORE - Only perform tests on the core spells.
Current core spells:
- openstack-novalxd
- kubernetes-core
- canonical-kubernetes
# Juju
./runner-juju 1 CORE=1
# Locally
CORE=1 ./runtests
Runs through the known spells, using the localhost provider for the majority of tests.
Currently takes about 3.5 hours to complete all tests on the localhost provider.
- Adam Stokes [email protected]
2016-2017 Canonical, Ltd.
MIT