Commit graph

5 commits

Author SHA1 Message Date
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
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
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
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