mirror of
https://github.com/lobaro/restic-backup-docker.git
synced 2026-11-13 15:45:22 +00:00
container-structure-test left one anonymous volume per test container. tests/structure.py runs it with --save and removes the new containers with their volumes afterwards. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
version: "3"
|
|
|
|
vars:
|
|
IMAGE: '{{.IMAGE | default "restic-backup-docker:test"}}'
|
|
|
|
env:
|
|
IMAGE: "{{.IMAGE}}"
|
|
|
|
tasks:
|
|
default:
|
|
cmds:
|
|
- task --list
|
|
silent: true
|
|
|
|
build:
|
|
desc: Build the image under test
|
|
cmds:
|
|
- docker build --quiet -t {{.IMAGE}} .
|
|
|
|
lint:
|
|
desc: Lint the Python test suite with ruff
|
|
cmds:
|
|
- uv run ruff check tests
|
|
- uv run ruff format --check tests
|
|
|
|
test:
|
|
desc: Build the image and run all suites
|
|
cmds:
|
|
- task: build
|
|
- task: test:structure
|
|
- task: test:compat
|
|
- task: test:features
|
|
|
|
test:structure:
|
|
desc: Run container-structure-test against the image and remove its containers and volumes
|
|
cmds:
|
|
- uv run python tests/structure.py
|
|
|
|
test:compat:
|
|
desc: Run the compat tests
|
|
cmds:
|
|
- uv run pytest -m "not feature" {{.CLI_ARGS}}
|
|
|
|
test:features:
|
|
desc: Run the feature-gated tests
|
|
cmds:
|
|
- uv run pytest -m feature {{.CLI_ARGS}}
|
|
|
|
test:sabotage:
|
|
desc: Prove the compat tests go red on an image with a broken backup
|
|
cmds:
|
|
- uv run python tests/sabotage.py
|