Skip to content

[v2] Run backend tests in containers, behind a build tag - #276

Merged
ajvb merged 1 commit into
v2-devfrom
cl-08-container-test-harness
Nov 22, 2026
Merged

ajvb merged 1 commit into
v2-devfrom
cl-08-container-test-harness

Conversation

@ajvb

@ajvb ajvb commented Nov 22, 2026

Copy link
Copy Markdown
Owner
  • Adds internal/containers, which starts throwaway Docker containers for tests and removes them afterwards, including leftovers from a crashed run.
  • The consul, mongo, mysql and postgres database tests use it and carry the integration build tag. A plain go test runs only unit tests and needs no Docker. Without Docker the integration tests fail with a message saying so.
  • CI has a separate integration tests job, and ci-ok needs it. go vet and golangci-lint also check the tagged files. make test runs vet, lint and all tests; make test-integration runs only the integration tests.
  • Adds Job.Compare, which compares every exported field of two jobs, and uses it in the storage tests.
  • Removes test-mysqld. The mysql tests no longer need a local mysqld, and the postgres integration test, which did not compile, now runs.

Add internal/containers for Docker test containers. The consul, mongo, mysql and postgres database tests use it, behind the integration build tag, so plain go test runs only unit tests. CI and make test run both.
@ajvb
ajvb merged commit fa72b3e into v2-dev Nov 22, 2026
13 checks passed
@ajvb
ajvb deleted the cl-08-container-test-harness branch November 22, 2026 22:54
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