mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2026-04-19 08:20:09 +01:00
Replace the pytest/testinfra/tox test stack with BATS, aligning with the approach used in the FTL repository. - Merge build-and-test.yml into build-and-publish.yml; the combined lint+test job now runs on pull_request via a single bash test/run.sh call, removing the need for Python/tox in CI - Replace Python test files with test/run.sh and test/test_suite.bats - test/run.sh handles image build, BATS install, container lifecycle, and cleanup via trap in one place - Containers consolidated from 6 to 2 (CONTAINER_DEFAULT and CONTAINER_CUSTOM), removing tests that belong to FTL's own suite - Tests now focus on Docker-specific behaviour: entrypoint, signal handling, UID/GID mapping, cron setup, and password assignment Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Adam Warner <me@adamwarner.co.uk>
23 lines
433 B
Markdown
23 lines
433 B
Markdown
# Prerequisites
|
|
|
|
Make sure you have `docker` and `git` installed.
|
|
|
|
# Running tests locally
|
|
|
|
```sh
|
|
bash test/run.sh
|
|
```
|
|
|
|
This will:
|
|
|
|
- Build an image named `pihole:test`
|
|
- Start a set of containers (one per configuration under test)
|
|
- Run the BATS test suite against those containers
|
|
- Remove all test containers on exit
|
|
|
|
To test a specific platform via emulation, set `CIPLATFORM`:
|
|
|
|
```sh
|
|
CIPLATFORM=linux/arm64 bash test/run.sh
|
|
```
|