This folder contains configuration for running automated system integration tests against an isolated AiiDA environment.
This utilises molecule to automate the creation/destruction of a docker container environment and the setup and testing within it.
The tests are currently set up to stress-test the AiiDA engine by launching a number of workchains of varying complexity, defined by reverse polish notation.
The simplest way to run these tests is to use the tox
environment provided in this repository's pyproject.toml
file:
$ pip install tox
$ tox -e molecule
NOTE: if you wan to run molecule directly, ensure that you set export MOLECULE_GLOB=.molecule/*/config_local.yml
.
This runs the test
scenario (defined in config_local.yml
) which:
- Deletes any existing container with the same label
- Creates a docker container, based on the
Dockerfile
in this folder, which also copies the repository code into the container (seecreate_docker.yml
). - Installs aiida-core (see
setup_python.yml
) - Sets up an AiiDA profile and computer (see
setup_aiida.yml
). - Sets up a number of workchains of varying complexity,defined by reverse polish notation, and runs them (see
run_tests.yml
). - Deletes the container.
If you wish to setup the container for manual inspection (i.e. only run steps 2 - 4) you can run:
$ tox -e molecule converge
Then you can jump into this container or run the tests (step 5) separately with:
$ tox -e molecule validate
and finally run step 6:
$ tox -e molecule destroy
You can specify the number of daemon workers to spawn using the AIIDA_TEST_WORKERS
environment variable:
$ AIIDA_TEST_WORKERS=4 tox -e molecule