pi-hole/test
RD WebDesign 68cd19ef8b
Remove tests for operating systems that passed official EOL date
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
2026-11-13 15:05:04 -03:00
..
_alpine_3_22.Dockerfile
_alpine_3_23.Dockerfile
_alpine_3_24.Dockerfile
_centos_9.Dockerfile Add diffutils to RPM dependencies and CentOS test images 2026-10-17 11:55:20 +01:00
_centos_10.Dockerfile Add diffutils to RPM dependencies and CentOS test images 2026-10-17 11:55:20 +01:00
_debian_12.Dockerfile
_debian_13.Dockerfile
_fedora_44.Dockerfile
_fedora_45.Dockerfile Add Fedora 45 to tests 2026-11-03 21:08:38 +01:00
_ubuntu_22.Dockerfile
_ubuntu_24.Dockerfile
_ubuntu_26.Dockerfile
bats_helper.bash
README.md Allow running the test suite using podman 2026-11-03 22:15:39 +01:00
run.sh Allow running the test suite using podman 2026-11-03 22:15:39 +01:00
test_automated_install.bats Install Pi-hole's scripts owned by root 2026-11-13 15:24:09 +00:00
test_fresh_install.bats fix: only trust git repositories the pihole user cannot modify 2026-10-15 19:48:02 +01:00
test_gravity.bats Keep list changes made while gravity runs 2026-10-20 04:23:51 +02:00
test_installer_ftl.bats
test_logflush.bats use setpriv for dropping from root to pihole 2026-11-03 13:25:42 +01:00
test_network.bats
test_selinux.bats
test_symlink_safety.bats Merge branch 'development' into fix/debug-redact-secrets 2026-11-11 17:31:20 +00:00
test_utils.bats Test getFTLPID() and the logrotate migration 2026-10-17 11:18:37 +02:00

Recommended way to run tests

The test suite is implemented with BATS and runs inside distro-specific OCI containers.

Requirements

  • Docker (with buildx support) or Podman
  • Bash shell

Run tests

From the repository root, run:

bash test/run.sh --distro debian_12

test/run.sh will:

  • Build the distro test image from test/_<distro>.Dockerfile
  • Run the mock/function BATS suite in a fresh container
  • Run the fresh-install BATS suite in a separate fresh container

Available distros

If you are unsure which distro names are valid, run:

bash test/run.sh --help

The help output includes the current list of supported distros.

Optional: override BATS library versions

test/run.sh accepts optional environment variable overrides when building test images:

  • BATS_CORE_VER
  • BATS_SUPPORT_VER
  • BATS_ASSERT_VER
  • BATS_MOCK_VER
  • BATS_FILE_VER

Example:

BATS_CORE_VER=v1.14.0 DISTRO=debian_12 bash test/run.sh