mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2025-12-27 02:56:36 +00:00
- add `make clean` and run it before `test-e2e` to avoid stale artifacts - restore: do not hardcode `mysql` for --empty; use detected mariadb/mysql client - e2e: improve subprocess error output for easier CI debugging - e2e: adjust MariaDB readiness checks for socket-only root on MariaDB 11 - e2e: add `wait_for_mariadb_sql` and run SQL readiness checks for dedicated TCP user - e2e: update MariaDB full/no-copy tests to use dedicated user over TCP and consistent credentials https://chatgpt.com/share/694ecfb8-f8a8-800f-a1c9-a5f410d4ba02
44 lines
1.3 KiB
Makefile
44 lines
1.3 KiB
Makefile
.PHONY: install build test-e2e
|
|
|
|
# Default python if no venv is active
|
|
PY_DEFAULT ?= python3
|
|
|
|
IMAGE_NAME ?= baudolo
|
|
IMAGE_TAG ?= local
|
|
IMAGE := $(IMAGE_NAME):$(IMAGE_TAG)
|
|
|
|
install:
|
|
@set -eu; \
|
|
PY="$(PY_DEFAULT)"; \
|
|
if [ -n "$${VIRTUAL_ENV:-}" ] && [ -x "$${VIRTUAL_ENV}/bin/python" ]; then \
|
|
PY="$${VIRTUAL_ENV}/bin/python"; \
|
|
fi; \
|
|
echo ">>> Using python: $$PY"; \
|
|
"$$PY" -m pip install --upgrade pip; \
|
|
"$$PY" -m pip install -e .; \
|
|
command -v baudolo >/dev/null 2>&1 || { \
|
|
echo "ERROR: baudolo not found on PATH after install"; \
|
|
exit 2; \
|
|
}; \
|
|
baudolo --help >/dev/null 2>&1 || true
|
|
|
|
# ------------------------------------------------------------
|
|
# Build the baudolo Docker image
|
|
# ------------------------------------------------------------
|
|
build:
|
|
@echo ">> Building Docker image $(IMAGE)"
|
|
docker build -t $(IMAGE) .
|
|
|
|
clean:
|
|
git clean -fdX .
|
|
|
|
# ------------------------------------------------------------
|
|
# Run E2E tests inside the container (Docker socket required)
|
|
# ------------------------------------------------------------
|
|
# E2E via isolated Docker-in-Docker (DinD)
|
|
# - depends on local image build
|
|
# - starts a DinD daemon container on a dedicated network
|
|
# - loads the freshly built image into DinD
|
|
# - runs the unittest suite inside a container that talks to DinD via DOCKER_HOST
|
|
test-e2e: clean build
|
|
@bash scripts/test-e2e.sh
|