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