5 ## Environment variables
7 The test currently requires some environment variables set in order to run, but these will be deprecated as soon as possible.
11 LXD should be installed via snap.
13 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.
17 Juju is expected to be installed via snap and bootstrapped.
19 Run `juju status -m controller` and capture the IP address of machine 0. This is the Juju controller, specified in VCA_HOST
21 export VCA_HOST=1.2.3.4
23 export VCA_SECRET=admin
28 Tests are written with pytest, driven by tox. All tests are run from the root directory of the repository.
32 To run a single integration test, we tell tox which environment we need, and then the path to the test.
35 tox -e integration -- tests/integration/test_non-string_parameter.py
40 `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:
42 tox -e integration -- tests/integration/
46 - Update CI environment to have Juju and LXD available via snap
47 - Investigate running via Docker
48 - Remove the requirement for setting environment variables
49 - Integrate into Jenkins so that tests run against every commit
50 - Add global timeout to abort tests that are hung
51 - Only build a charm once per test run, i.e., if two or more tests use the same charm, we should only call `charm build` once.