test: add comprehensive dockerised end-to-end suite
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.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.PHONY: build test lint fmt e2e docker docker-ui compose clean tidy check-go
|
||||
.PHONY: build test lint fmt e2e docker-e2e docker docker-ui compose clean tidy check-go
|
||||
|
||||
BINARY := bin/artifactapi
|
||||
MODULE := git.unkin.net/unkin/artifactapi
|
||||
@@ -28,6 +28,11 @@ fmt: check-go
|
||||
e2e: check-go
|
||||
TESTCONTAINERS_RYUK_DISABLED=true go test -tags=e2e -race -count=1 -timeout=5m ./e2e/...
|
||||
|
||||
# Build the container, bring up the full docker-compose stack + a mock upstream,
|
||||
# and run the black-box suite against the running product.
|
||||
docker-e2e: check-go
|
||||
./scripts/docker-e2e.sh
|
||||
|
||||
docker:
|
||||
docker build -t artifactapi:$(VERSION) .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user