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

Open
unkinben wants to merge 1 commits from benvin/comprehensive-docker-e2e into master
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.
All checks were successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Required
Details
ci/woodpecker/pr/build Pipeline was successful
Required
Details
ci/woodpecker/pr/test Pipeline was successful
Required
Details
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin benvin/comprehensive-docker-e2e:benvin/comprehensive-docker-e2e
git checkout benvin/comprehensive-docker-e2e
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/artifactapi#97