Testing
Note
CI testing is done after every push to the GitHub repository.
Manual Testing
podman is used for development; docker should also work.
Dockerfile Locations
The testing Dockerfile(s) lives in .github/actions/
directory.
There are two Dockerfiles used for testing:
Name | Description |
---|---|
flatcurve-test-alpine | Alpine Linux Container |
flatcurve-test-debian | Debian Container |
The containers run a script located at /fts-flatcurve-test.sh
which performs all the testing.
Testing Commands
To build image, the GitHub testing environment needs to be replicated locally.
The dev/build_env.sh
script is provided to help with this. It creates the expected environment in the /tmp/dovecot-fts-flatcurve-build
directory.
The script takes one argument: either alpine
or debian
.
For example, to create the Alpine testing image:
./dev/build_env.sh alpine
podman build -t dovecot-fts-flatcurve /tmp/dovecot-fts-flatcurve-build
To run tests:
podman run dovecot-fts-flatcurve
To enter interactive shell without running the tests:
podman run -it --rm --entrypoint=/bin/ash dovecot-fts-flatcurve
Imaptest
Imaptest is installed in the container to run automated testing.
imaptest example command (run in container):
imaptest user=foo pass=pass rawlog test=/dovecot/imaptest/src/tests/