Commit Graph
1 Commits
Author SHA1 Message Date
hermes-gadget 79190f8382 fix(ci): ship the external-consumer SQL checker with the worker image (#196)
The Workers and Compose job runs the worker suite inside the built image
(`python -m unittest discover -s /app/tests`). The relation-qualification
test resolved the checker as `<repo>/scripts/check_external_consumer_sql.py`
via `Path(__file__).parents[2]`, which inside the container is `/scripts`,
and the image only carries `viewshed-worker/`, so the job died with
`ModuleNotFoundError: check_external_consumer_sql` before any test ran.

The image builds with `context: viewshed-worker`, so a repo-level `scripts/`
file cannot be COPYed in without widening the build context (and the release
workflow). Move the implementation next to the worker (`viewshed-worker/
check_external_consumer_sql.py`), leave a thin shim at the old path so
`backend`'s `test:external-consumers:sql` keeps working from a checkout, and
add the module to the Dockerfile COPY.

The test now resolves the module from the worker root, and a new in-image
test asserts the checker imports from that root, so dropping it from the
image fails with a named test instead of a bare import error.
2026-11-05 16:44:29 +00:00