Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.62 KB

File metadata and controls

44 lines (31 loc) · 1.62 KB

Contributing

To make contributions to this charm, you'll need a working development setup.

You can create an environment for development with tox:

tox devenv -e integration
source venv/bin/activate

Testing

This project uses tox for managing test environments. There are two tox working directories, one in the root directory and one in the directory app for the application. For each tox working directory, there are some pre-configured environments that can be used for linting and formatting code when you're preparing contributions to the charm:

tox run -e format        # update your code according to linting rules
tox run -e lint          # code style
tox run -e unit          # unit tests
tox run -e integration   # integration tests
tox                      # runs 'format', 'lint', and 'unit' environments

The integration tests (both of the charm and the app) require options to be passed through the command line (see tests/conftest.py) and architecture-specific OpenStack password environment variables, for example OPENSTACK_PASSWORD_AMD64, to deploy the charm and/or upload images to OpenStack. If you are testing multiple architectures, set the corresponding OPENSTACK_PASSWORD_<ARCH> variables for each one. The tests create and use Juju secrets from these values during setup.

Build the charm

Build the charm in this git repository using:

charmcraft pack