Files
docker-pi-hole/test/TESTING.md
Adam Warner 522ddca96e ci: replace Python test suite with BATS and consolidate workflows
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>
2026-03-29 12:16:26 +01:00

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
```