test: comprehensive dockerised end-to-end suite #97

Merged
benvin merged 2 commits from benvin/comprehensive-docker-e2e into master 2026-07-03 14:34:46 +10:00
Owner

Adds a black-box e2e suite that runs against the built container image via docker-compose (complementing the in-process e2e/ testcontainers suite).

What it does

make docker-e2escripts/docker-e2e.sh: builds the image, brings up the full stack (postgres, redis, minio, artifactapi) plus a static nginx mock upstream for hermetic caching, waits for /health, runs go test -tags=dockere2e ./e2e-docker/..., and tears everything down.

Coverage

  • Repository lifecycle — add / change / delete for remote, local and virtual repos.
  • Caching — one immutable artifact for each of the 10 remote package types (generic, docker, helm, pypi, npm, rpm, alpine, puppet, terraform, goproxy) proxied through the mock upstream: first fetch X-Artifact-Source: remote, second cache, bytes verified against the origin fixture.
  • Local uploads — generic (upload/download), pypi (wheel + generated simple/ index), rpm (real package + automatic repodata generation).
  • Virtual repositories — pypi simple-index merge and helm index.yaml merge across two members.

Notes

  • The artifactapi host port is parameterised (ARTIFACTAPI_PORT, default 8000; the e2e run uses 8001) so it does not collide with a locally-running instance. This is the only change to the production docker-compose.yml.
  • Fixtures under e2e-docker/fixtures/ are real package files (incl. a real RPM so repodata parsing works); a .gitignore negation tracks them over the global ignore of those extensions.

Validation

Ran make docker-e2e locally: all suites pass against the containerised product.

Adds a black-box e2e suite that runs against the **built container image** via docker-compose (complementing the in-process `e2e/` testcontainers suite). ## What it does `make docker-e2e` → `scripts/docker-e2e.sh`: builds the image, brings up the full stack (postgres, redis, minio, artifactapi) plus a static nginx **mock upstream** for hermetic caching, waits for `/health`, runs `go test -tags=dockere2e ./e2e-docker/...`, and tears everything down. ## Coverage - **Repository lifecycle** — add / change / delete for remote, local and virtual repos. - **Caching** — one immutable artifact for **each of the 10 remote package types** (generic, docker, helm, pypi, npm, rpm, alpine, puppet, terraform, goproxy) proxied through the mock upstream: first fetch `X-Artifact-Source: remote`, second `cache`, bytes verified against the origin fixture. - **Local uploads** — generic (upload/download), pypi (wheel + generated `simple/` index), rpm (real package + **automatic repodata** generation). - **Virtual repositories** — pypi simple-index merge and helm `index.yaml` merge across two members. ## Notes - The artifactapi host port is parameterised (`ARTIFACTAPI_PORT`, default `8000`; the e2e run uses `8001`) so it does not collide with a locally-running instance. This is the only change to the production `docker-compose.yml`. - Fixtures under `e2e-docker/fixtures/` are real package files (incl. a real RPM so repodata parsing works); a `.gitignore` negation tracks them over the global ignore of those extensions. ## Validation Ran `make docker-e2e` locally: **all suites pass** against the containerised product.
unkinben added 1 commit 2026-07-02 23:06:08 +10:00
test: add comprehensive dockerised end-to-end suite
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
221f3a7402
Add a black-box e2e suite (build tag dockere2e) that runs against the
built container image via docker-compose, plus a static nginx mock
upstream for hermetic caching tests.

Coverage:
- repository add/change/delete for remote, local and virtual repos
- caching (miss -> hit + byte integrity) for all 10 remote package types
- local uploads: generic, pypi (with generated simple index), rpm (with
  automatic repodata generation from a real package)
- virtual merges: pypi simple index and helm index.yaml

Driven by scripts/docker-e2e.sh (make docker-e2e): builds the image,
brings the stack up, waits for health, runs the suite, and tears down.
The artifactapi host port is parameterised (ARTIFACTAPI_PORT, default
8000; the e2e run uses 8001). Fixtures are force-tracked over the global
gitignore.
benvin added 1 commit 2026-07-03 14:32:04 +10:00
Merge branch 'master' into benvin/comprehensive-docker-e2e
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
5f21a4a684
benvin merged commit 30acc32174 into master 2026-07-03 14:34:46 +10:00
benvin deleted branch benvin/comprehensive-docker-e2e 2026-07-03 14:34:46 +10:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/artifactapi#97