Christian König
cdb990ad23
Include alpine 3.24 in tests
...
Signed-off-by: Christian König <github@yubiuser.dev>
2026-06-10 20:30:07 +02:00
Christian König
fa1de50068
Use bats_helper also in newly added gravity tests
...
Signed-off-by: Christian König <github@yubiuser.dev>
2026-06-01 19:31:55 +02:00
Christian König
8a90c77ff2
Fix shellcheck wrning
...
Signed-off-by: Christian König <github@yubiuser.dev>
2026-06-01 19:30:57 +02:00
Christian König
c5949aaa8f
Move on_failure_hook to helper file
...
Signed-off-by: Christian König <github@yubiuser.dev>
2026-06-01 19:30:57 +02:00
Christian König
c66159302f
Use on_failure hook to improve failure output
...
Signed-off-by: Christian König <github@yubiuser.dev>
2026-06-01 19:30:57 +02:00
Christian König
400b3abc26
Set BATS pretty output flag depending on the terminal
...
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-06-01 19:30:57 +02:00
yubiuser
3b0aad0db2
Add gravity tests ( #6639 )
2026-05-30 14:31:33 +02:00
Christian König
2671ebc2b8
Ubuntu 20 curl version does not support etag-compare and etag-save on the same file, so the target will always be downloaded and no 304 is returned
...
Signed-off-by: Christian König <github@yubiuser.dev>
2026-05-25 21:40:35 +02:00
Christian König
43840b250d
Account for curl version < 7.75
...
Signed-off-by: yubiuser <github@yubiuser.dev>
2026-05-21 23:44:47 +02:00
Christian König
a8de5788c6
Be more generous regarding curl's error output
...
Signed-off-by: Christian König <github@yubiuser.dev>
2026-05-21 23:25:14 +02:00
Christian König
227689f491
Adjust tests to recent changes from https://github.com/pi-hole/pi-hole/pull/6430 and https://github.com/pi-hole/pi-hole/pull/6607 and https://github.com/pi-hole/pi-hole/pull/6605
...
Signed-off-by: Christian König <github@yubiuser.dev>
2026-05-21 23:16:38 +02:00
Christian König
164a0c134a
Fix shellcheck
...
Signed-off-by: Christian König <github@yubiuser.dev>
2026-05-21 22:43:41 +02:00
darkexplosiveqwx
d01a893721
replace tox with BATS for new OSes
...
Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
2026-05-21 22:29:28 +02:00
darkexplosiveqwx
af4df3fa75
Merge branch 'development' into april-os
2026-05-21 22:24:50 +02:00
Christian König
de7cb639d5
Add gravity tests
...
Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Christian König <github@yubiuser.dev>
2026-05-21 22:22:53 +02:00
Adam Warner
86562b5eba
Remove spurious runUnattended=true from install test
...
Move from setup/teardown steps to explicit cleanup in each test that creates a "mess"
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-05-21 19:30:20 +01:00
Adam Warner
3468c0c418
test: update README for BATS runner usage
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-05-21 19:30:20 +01:00
Adam Warner
e972c758ab
test: split containers, simplify run_suite, improve distro error
...
Split the BATS suite into two containers: one for mock/function tests
and one for the fresh install, so installer tests can mutate the
filesystem freely without teardown.
Replace mocks.bash with bats-mock and bats-file, baked into the test
images at build time via Docker ARG-versioned git clones.
Improve the invalid-distro error to list available distros rather than
printing an opaque Dockerfile path.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-05-21 19:30:20 +01:00
Adam Warner
551b6516d1
test: bake BATS libraries into test images at build time
...
Add ARG declarations and a build-time RUN step to all Dockerfiles so
bats-core, bats-support, bats-assert, bats-mock, and bats-file are cloned
at image build time rather than at container runtime. Library versions are
defined once in run.sh and passed down via --build-arg
Add .dockerignore to exclude any locally-cached test/libs/ directory from
the build context, preventing 'destination already exists' failures when
the directory exists from a previous local test run.
Remove the legacy commented-out sed stub command from all Dockerfiles
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-05-21 19:30:20 +01:00
Adam Warner
356afe66c5
test: restore executable bit on installer FTL bats file
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-05-21 19:30:20 +01:00
Adam Warner
1359c6aff5
test: simplify in-container BATS flow and clarify suite intent
...
The test refactor intentionally prioritizes deterministic CI behavior and clearer semantics over historical transition scaffolding.
Reasoning behind the changes:
- Keep output consistent across distros by enabling pretty BATS output in all images; Alpine now installs ncurses so tput is available.
- Remove no-longer-needed migration plumbing in test/run.sh (CSV env handoff and extra local filename array), while preserving isolated /tmp tests execution to avoid installer side effects on /etc/.pihole.
- Rename ambiguous terminology from earlier direct-vs-legacy comparison and keep runner naming minimal (TEST_FILES, /tmp/tests).
- Clarify scope of the former FTL suite by renaming it to test_installer_ftl.bats and updating test titles to reflect that these validate installer architecture-detection/install paths.
- Reduce duplicated setup/teardown cleanup code in BATS files via shared reset helpers without changing behavior.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-05-21 19:30:20 +01:00
Adam Warner
da333b0982
test: replace pytest/tox with direct in-container BATS
...
Replace the Python/tox-based test stack with BATS and run tests directly inside each built DISTRO container. Remove docker:cli orchestration and unify local mock helpers in test/helpers/mocks.bash for direct execution.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2026-05-21 19:30:19 +01:00
darkexplosiveqwx
9586b470e8
Add Fedora 44 and Ubuntu 26.04 LTS to tests
...
Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
2026-04-29 20:27:39 +02:00
dependabot[bot]
5b45416c6d
Bump the python-dependencies group in /test with 2 updates
...
Bumps the python-dependencies group in /test with 2 updates: [pytest](https://github.com/pytest-dev/pytest ) and [tox](https://github.com/tox-dev/tox ).
Updates `pytest` from 9.0.2 to 9.0.3
- [Release notes](https://github.com/pytest-dev/pytest/releases )
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pytest-dev/pytest/compare/9.0.2...9.0.3 )
Updates `tox` from 4.52.0 to 4.52.1
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.52.0...4.52.1 )
---
updated-dependencies:
- dependency-name: pytest
dependency-version: 9.0.3
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: python-dependencies
- dependency-name: tox
dependency-version: 4.52.1
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-04-11 10:02:49 +00:00
dependabot[bot]
3999157cf6
Bump tox from 4.51.0 to 4.52.0 in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [tox](https://github.com/tox-dev/tox ).
Updates `tox` from 4.51.0 to 4.52.0
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.51.0...4.52.0 )
---
updated-dependencies:
- dependency-name: tox
dependency-version: 4.52.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-04-04 10:02:48 +00:00
Adam Warner
1cb17cdcf9
Wipe version file before creating a new one ( #6538 )
2026-04-03 23:15:33 +01:00
dependabot[bot]
12373981a4
Bump tox from 4.50.3 to 4.51.0 in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [tox](https://github.com/tox-dev/tox ).
Updates `tox` from 4.50.3 to 4.51.0
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.50.3...4.51.0 )
---
updated-dependencies:
- dependency-name: tox
dependency-version: 4.51.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-03-28 10:02:40 +00:00
dependabot[bot]
811467e8b9
Bump tox from 4.49.1 to 4.50.3 in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [tox](https://github.com/tox-dev/tox ).
Updates `tox` from 4.49.1 to 4.50.3
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.49.1...4.50.3 )
---
updated-dependencies:
- dependency-name: tox
dependency-version: 4.50.3
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-03-21 10:02:41 +00:00
dependabot[bot]
47de7d5913
Bump tox from 4.49.0 to 4.49.1 in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [tox](https://github.com/tox-dev/tox ).
Updates `tox` from 4.49.0 to 4.49.1
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.49.0...4.49.1 )
---
updated-dependencies:
- dependency-name: tox
dependency-version: 4.49.1
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-03-14 10:02:46 +00:00
dependabot[bot]
752273f400
Bump tox from 4.46.3 to 4.49.0 in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [tox](https://github.com/tox-dev/tox ).
Updates `tox` from 4.46.3 to 4.49.0
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.46.3...4.49.0 )
---
updated-dependencies:
- dependency-name: tox
dependency-version: 4.49.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-03-07 10:02:46 +00:00
dependabot[bot]
6dc67a48e9
Bump tox from 4.44.0 to 4.46.3 in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [tox](https://github.com/tox-dev/tox ).
Updates `tox` from 4.44.0 to 4.46.3
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.44.0...4.46.3 )
---
updated-dependencies:
- dependency-name: tox
dependency-version: 4.46.3
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-02-28 10:02:45 +00:00
dependabot[bot]
c8ff8b747f
Bump tox from 4.35.0 to 4.44.0 in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [tox](https://github.com/tox-dev/tox ).
Updates `tox` from 4.35.0 to 4.44.0
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.35.0...4.44.0 )
---
updated-dependencies:
- dependency-name: tox
dependency-version: 4.44.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-02-21 10:02:39 +00:00
Christian König
4125bcccdc
Files should be created before calling addOrEditKeyValPair
...
Signed-off-by: Christian König <github@yubiuser.dev>
2026-02-18 09:25:10 +01:00
yubiuser
e929d799b8
Don't install unused /usr/local/share/man/man5 ( #6526 )
2026-02-14 20:36:17 +01:00
dependabot[bot]
0b0cbdf7d0
Bump tox from 4.34.1 to 4.35.0 in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [tox](https://github.com/tox-dev/tox ).
Updates `tox` from 4.34.1 to 4.35.0
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.34.1...4.35.0 )
---
updated-dependencies:
- dependency-name: tox
dependency-version: 4.35.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-02-14 10:02:34 +00:00
darkexplosiveqwx
3d5c832dbe
Remove /usr/local/share/man/man5 from tests
...
Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
2026-02-06 16:49:31 +01:00
Christian König
03ee5b514d
Fix black formatting
...
Signed-off-by: Christian König <github@yubiuser.dev>
2026-01-28 08:56:25 +01:00
dependabot[bot]
ec6d3e2f83
Bump tox from 4.33.0 to 4.34.1 in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [tox](https://github.com/tox-dev/tox ).
Updates `tox` from 4.33.0 to 4.34.1
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.33.0...4.34.1 )
---
updated-dependencies:
- dependency-name: tox
dependency-version: 4.34.1
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-01-10 10:01:07 +00:00
dependabot[bot]
102bc6043d
Bump tox from 4.32.0 to 4.33.0 in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [tox](https://github.com/tox-dev/tox ).
Updates `tox` from 4.32.0 to 4.33.0
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.32.0...4.33.0 )
---
updated-dependencies:
- dependency-name: tox
dependency-version: 4.33.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2026-01-03 10:01:40 +00:00
dependabot[bot]
3ddf4014af
Bump pytest in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [pytest](https://github.com/pytest-dev/pytest ).
Updates `pytest` from 9.0.1 to 9.0.2
- [Release notes](https://github.com/pytest-dev/pytest/releases )
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pytest-dev/pytest/compare/9.0.1...9.0.2 )
---
updated-dependencies:
- dependency-name: pytest
dependency-version: 9.0.2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-12-13 10:02:04 +00:00
Christian König
f5f74066fc
Add Alpine 3.23 to test suite
...
Signed-off-by: Christian König <github@yubiuser.dev>
2025-12-03 23:37:04 +01:00
dependabot[bot]
17dd5b97f3
Bump pytest in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [pytest](https://github.com/pytest-dev/pytest ).
Updates `pytest` from 8.4.2 to 9.0.1
- [Release notes](https://github.com/pytest-dev/pytest/releases )
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pytest-dev/pytest/compare/8.4.2...9.0.1 )
---
updated-dependencies:
- dependency-name: pytest
dependency-version: 9.0.1
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-11-15 10:02:08 +00:00
Christian König
558f0c4bf7
Add Fedora 43 to test suite
...
Signed-off-by: yubiuser <github@yubiuser.dev>
2025-10-31 18:54:42 +01:00
dependabot[bot]
77dd566a4f
Bump tox from 4.31.0 to 4.32.0 in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [tox](https://github.com/tox-dev/tox ).
Updates `tox` from 4.31.0 to 4.32.0
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.31.0...4.32.0 )
---
updated-dependencies:
- dependency-name: tox
dependency-version: 4.32.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-10-25 10:01:46 +00:00
dependabot[bot]
71dbf2715a
Bump tox from 4.30.3 to 4.31.0 in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [tox](https://github.com/tox-dev/tox ).
Updates `tox` from 4.30.3 to 4.31.0
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.30.3...4.31.0 )
---
updated-dependencies:
- dependency-name: tox
dependency-version: 4.31.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-10-11 10:01:51 +00:00
dependabot[bot]
f5ce7b29e0
Bump the python-dependencies group across 1 directory with 3 updates
...
Bumps the python-dependencies group with 3 updates in the /test directory: [pyyaml](https://github.com/yaml/pyyaml ), [pytest](https://github.com/pytest-dev/pytest ) and [tox](https://github.com/tox-dev/tox ).
Updates `pyyaml` from 6.0.2 to 6.0.3
- [Release notes](https://github.com/yaml/pyyaml/releases )
- [Changelog](https://github.com/yaml/pyyaml/blob/6.0.3/CHANGES )
- [Commits](https://github.com/yaml/pyyaml/compare/6.0.2...6.0.3 )
Updates `pytest` from 8.4.1 to 8.4.2
- [Release notes](https://github.com/pytest-dev/pytest/releases )
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst )
- [Commits](https://github.com/pytest-dev/pytest/compare/8.4.1...8.4.2 )
Updates `tox` from 4.28.4 to 4.30.2
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.28.4...4.30.2 )
---
updated-dependencies:
- dependency-name: pyyaml
dependency-version: 6.0.3
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: python-dependencies
- dependency-name: pytest
dependency-version: 8.4.2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: python-dependencies
- dependency-name: tox
dependency-version: 4.30.2
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-10-04 10:02:17 +00:00
Dominik
e5112a9fb8
Add Debian 13 Trixie to the test suite ( #6382 )
2025-10-04 09:10:30 +02:00
Rob Gill
d75dae788d
Alpine Linux tests
...
Add Dockerfile and corresponding tox file to add alpine linux 3.21 & 3.22 to the test suite
Add apk as another package manager in the automated install tests
Use short switches for su command as busybox's su does not accept long switches here
Add Alpine test to github workflow
Signed-off-by: Michael Ziminsky (Z) <mgziminsky@users.noreply.github.com>
2025-08-16 21:47:54 +00:00
Christian König
ea274073b4
Add Debian 13 Trixie to the test suite
...
Signed-off-by: Christian König <github@yubiuser.dev>
2025-08-13 06:27:19 +02:00
dependabot[bot]
9bc17a1f2b
Bump tox from 4.28.3 to 4.28.4 in /test in the python-dependencies group
...
Bumps the python-dependencies group in /test with 1 update: [tox](https://github.com/tox-dev/tox ).
Updates `tox` from 4.28.3 to 4.28.4
- [Release notes](https://github.com/tox-dev/tox/releases )
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst )
- [Commits](https://github.com/tox-dev/tox/compare/4.28.3...4.28.4 )
---
updated-dependencies:
- dependency-name: tox
dependency-version: 4.28.4
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: python-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-08-02 10:52:42 +00:00