6.4. Tests
Numerous tests are defined in the tests folder and called from .woodpecker.yaml. Some tests are simple BASH scripts and used for:
Checking if the original configuration files used for templates are up to date
Linting Ansible code
Checking if the project fulfills the REUSE compliance (if every single file contains license & copyright information)
Ensuring consistency for variables used the same way across the project
Ensuring roles variables are documented
Other tests are build on Molecule, Vagrant and KVM/QEMU/Libvirt. The test cases are inspired by the examples chapter and complex cases are only tested on Debian:
GNU Health (server & client), Thalamus Orthanc & DHIS2 are tested distinctly for all-in-one systems for Debian, Ubuntu and openSUSE Leap for the minimal default installation (+ custom CA & HTTPS). FreeBSD is planned to add as well but Vagrant does not offer a Libvirt based box yet.
GNU Health and Orthanc are also tested for separated systems (incl. custom CA & HTTPS, Debian only).
Another test installs GNU Health (server & client), Thalamus Orthanc & DHIS2 all on one Debian VM.
The last test runs the example for a small productive base.
In any case Molecule performs syntax and idempotency checks. Integration tests were added as well: They test if the connection works when sending a request to the reverse proxy that has to be processed by the application and the database as well (verify in Molecule).
The molecule tests are not triggered by commits but they are executed periodically (see playbook & role test-server, currently set up on infrastructure of the Leibniz University Hannover).