Skip to content

Docker services#1300

Draft
jesper-friis wants to merge 7 commits into
masterfrom
docker-services
Draft

Docker services#1300
jesper-friis wants to merge 7 commits into
masterfrom
docker-services

Conversation

@jesper-friis

@jesper-friis jesper-friis commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Description

Added testutils.Service class that can used by the tests start needed services as docker containers.

Also added a dlite-service command that is used to check what test services that are running. This command is also used by ctest as fixtures to ensure that a service is only started once.

If a service is already running when running the tests, it will not be restarted.

It is fairly easy to add new services. Just specify them in the dlite.testutils.Service.conf dict. For simple cases (like redis), just specify the port and docker image. For more demanding services, provide a docker compose file instead of specifying the image.

The following services are currently added:

  • redis
  • mingw
  • postgres
  • mongo

Enabling the postgresql and mongodb tests revealed some bugs. These were also fixed.

Type of change

  • Bug fix & code cleanup
  • New feature
  • Documentation update
  • Test update

Checklist for the reviewer

This checklist should be used as a help for the reviewer.

  • Is the change limited to one issue?
  • Does this PR close the issue?
  • Is the code easy to read and understand?
  • Do all new feature have an accompanying new test?
  • Has the documentation been updated as necessary?

@jesper-friis jesper-friis marked this pull request as draft June 29, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant