The test currently requires some environment variables set in order to run, but these will be deprecated as soon as possible.
LXD should be installed via snap.
The connection to the LXD API server expects to use a self-signed SSL certificate, generated by lxc (lxc list, et al) is first one.
Juju is expected to be installed via snap and bootstrapped.
Run juju status -m controller and capture the IP address of machine 0. This is the Juju controller, specified in VCA_HOST
export VCA_HOST=1.2.3.4 export VCA_USER=admin export VCA_SECRET=admin
Tests are written with pytest, driven by tox. All tests are run from the root directory of the repository.
To run a single integration test, we tell tox which environment we need, and then the path to the test.
tox -e integration -- tests/integration/test_non-string_parameter.py
make test will invoke tox to run all unit tests. Alternatively, you can limit this to a specific type of test by invoking tox manually:
tox -e integration -- tests/integration/
charm build once.