Skip to content

chore(test): make the container suite runnable under colima - #21

Merged
ekalinin merged 1 commit into
docs/spec-code-alignmentfrom
chore/colima-container-tests
Aug 20, 2026
Merged

chore(test): make the container suite runnable under colima#21
ekalinin merged 1 commit into
docs/spec-code-alignmentfrom
chore/colima-container-tests

Conversation

@ekalinin

@ekalinin ekalinin commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Stacked on #20.

Running the container suite

testcontainers does not read the docker CLI context, so on a colima host it reported rootless Docker not found and the whole integration suite failed before starting a single container.

Two variables are needed, and both:

  • DOCKER_HOST - the host-side socket it connects to;
  • TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE - that same socket as seen inside the VM, because its reaper container bind-mounts it. With only DOCKER_HOST set, Docker tries to mount the host-side path and fails with mkdir ... operation not supported.

make test-containers supplies both when the current docker context is colima. On Docker Desktop and in CI they stay empty: there the default socket is already correct both for connecting and for mounting.

Log level for a draining 503

A rejection during drain was logged as ERROR. It is expected operation, and every rolling deploy would fill the log with it. Only the internal-error bucket is logged now; an unreachable database is already logged where it is detected, with the driver detail that the response deliberately drops.

Verification

make test-containers passes with no manual environment variables: 8/8 tests against real Redis, PostgreSQL 18, MySQL 8.4 and MinIO.

@ekalinin
ekalinin force-pushed the docs/spec-code-alignment branch from 92fe9a7 to aae0f6c Compare August 17, 2026 19:26
@ekalinin
ekalinin force-pushed the chore/colima-container-tests branch from cd98feb to 1406953 Compare August 17, 2026 19:26
@ekalinin
ekalinin force-pushed the docs/spec-code-alignment branch from aae0f6c to f55f04a Compare August 17, 2026 19:35
@ekalinin
ekalinin force-pushed the chore/colima-container-tests branch from 1406953 to 4b0d719 Compare August 17, 2026 19:35
testcontainers does not read the docker CLI context, so on a colima host it
reported "rootless Docker not found" and every integration test failed before
starting a container. The target now spells out both variables it needs when
the current context is colima: DOCKER_HOST is the host-side socket it
connects to, and TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE is that same socket as
seen inside the VM, which is what its reaper container bind-mounts. Both stay
empty on Docker Desktop and in CI, where the default socket is already
correct for each.

Also stops logging a draining 503 as an ERROR. It is expected operation and
would fill the log on every rolling deploy; an unreachable database is
already logged where it is detected, with the driver detail the response
deliberately drops.
@ekalinin
ekalinin force-pushed the docs/spec-code-alignment branch from f55f04a to 64cdda2 Compare August 18, 2026 09:47
@ekalinin
ekalinin force-pushed the chore/colima-container-tests branch from 4b0d719 to 2a04130 Compare August 18, 2026 09:47
@ekalinin
ekalinin merged commit 5062065 into docs/spec-code-alignment Aug 20, 2026
6 of 9 checks passed
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