Skip to content

Comments

Infra/Refactor docker-based test runner and add linux container tests#173

Merged
alexskr merged 5 commits intoontoportal-lirmm-developmentfrom
infra/docker-test-runner
Feb 12, 2026
Merged

Infra/Refactor docker-based test runner and add linux container tests#173
alexskr merged 5 commits intoontoportal-lirmm-developmentfrom
infra/docker-test-runner

Conversation

@alexskr
Copy link
Member

@alexskr alexskr commented Feb 11, 2026

Refactor docker-based test runner and add linux container tests

Summary

  • Refactored docker-based test runner to rely on docker compose up --wait healthchecks.
  • Added linux overrides (including no-ports) to run unit tests in a container, useful for macOS devs.
  • Added developer tasks: test:docker:up, test:docker:down, test:docker:shell.
  • Moved backend fixtures to test/fixtures/backends and updated compose mounts.
  • Renamed GraphDB repository from 'ontoportal' to ontoportal_test
  • Documented docker test commands and env vars.
  • replace virtuoso image from tenforce/virtuoso:virtuoso7.2.5 to the official openlink/virtuoso-opensource-7:7.2.16 which supports arm64 architecture

Details

  • rakelib/docker_based_test.rake: new shell task, up/down tasks, compose --wait, no-ports override for linux, new OP_* env vars.
  • dev/compose/linux/*.yml: linux overrides and no-ports file (ports disabled for containerized runs).
  • docker-compose.yml: updated volumes for backend fixtures.
  • test/fixtures/backends/*: moved GraphDB and Virtuoso init/config fixtures.

How to Test

  • Host tests:
    • bundle exec rake test:docker:fs
  • Linux container tests:
    • bundle exec rake test:docker:fs:linux
  • Shell:
    • bundle exec rake test:docker:shell
  • Bring up backend containers for development
    • bundle exec rake test:docker:up

Notes

  • compose_down now tears down all profiles by default.
  • Linux runs use the no-ports override to avoid host port exposure.
  • tasks associated with GraphDB are renamed from gb to gd, i.e bundle exec rake test:docker:gd

  - remove custom wait logic; rely on docker compose --wait healthchecks
  - add linux overrides to run unit tests in a container (useful on macOS)
  - add no-ports override for containerized runs
  - update compose mounts and move backend fixtures to test/fixtures
  - document docker test commands and env vars
  - ensure redis host is read from goo_redis (not redis)
  - update sample config to match
  When adding rake tasks for running unit tests in linux containers,
  unit tests started failing due to unsafe target detection and state leakage.
  This refactor consolidates safety checks into TestSafety,
  moves test_reset into test helpers. It also adds a redis key-count guard to
  abort against non-test instances.
@alexskr alexskr marked this pull request as ready for review February 11, 2026 21:13
@alexskr alexskr requested a review from mdorf February 11, 2026 21:13
alexskr added a commit to ncbo/ontologies_linked_data that referenced this pull request Feb 11, 2026
@alexskr alexskr merged commit f631065 into ontoportal-lirmm-development Feb 12, 2026
8 checks passed
alexskr added a commit to ncbo/ontologies_linked_data that referenced this pull request Feb 12, 2026
…264)

CI: refactor docker-based test runner and add linux container tests

see ncbo/goo#173
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