zokradonh / kopano-docker

Unofficial Kopano Docker images for all Kopano services.
MIT License
59 stars 37 forks source link

Add testing to check if configuration changes are applied successfully #220

Closed fbartels closed 4 years ago

fbartels commented 5 years ago

The kcconf.py script does not work with the double quotes according to my tests. It worked after removing them.

Hmm.. Maybe some tests would be in order to check config files after startup.

Originally posted by @fbartels in https://github.com/zokradonh/kopano-docker/pull/218#issuecomment-523605703

Continuation of #26

fbartels commented 5 years ago

Unit testing framework or simple bash script (something like https://blog.jevsejev.io/2016/06/09/docker-image-tests/)?

Should test startup of containers with various changes to .env. Test if additional packages are installed, etc.

fbartels commented 5 years ago

A first shot at using goss has been merged. Goss could also be used to implement a healthcheck for each container, see https://github.com/aelsabbahy/goss-docker.

The above change is not yet part of the actions performed in Travis.

fbartels commented 5 years ago

While goss is nice for general verification of the image (and subsequently doing healthchecks) without additional scripting it does not really seem capable of testing different container configurations.

Maybe https://github.com/SimonBaeumer/commander could be a good fit?

Something like:

fbartels commented 5 years ago

https://github.com/zokradonh/kopano-docker/pull/233 adds a basic test based on commander to verify that the ldap configuration is properly applied. Both the goss and commander tests are not part of the release pipeline, though.

github-actions[bot] commented 4 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

fbartels commented 4 years ago

This issue is no longer required, some of the containers now have tests based on goss and commander. The next steps is setting up github actions to execute them on regular intervals (as doing it on each commit will impact test runtime too much).