mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-02 21:30:46 +09:00
Fixes picked from main now bring unit suites written for bats-core: they load hack/test_helper.bash and rely on Bats calling setup() and setting BATS_TEST_TMPDIR. release-1.6 runs every hack/*.bats through cozytest.sh, which has no load, so such a suite fails with "load: not found" and keeps the backport batch red. Main moved every unit suite to Bats in #3849, which also edited each existing suite. Only the runner part comes over here: the helper, the pinned bats-core install in the checks job, and a bats-unit-tests target that runs the suites loading the helper under bats. The other suites keep running through cozytest.sh under /bin/sh and nounset, so the 49 suites release-1.6 has today run exactly as before, and the 13 of them that source production shell scripts keep their dash coverage. Tested with make bats-unit-tests and dash as the recipe shell, on release-1.6 alone (49 suites, 527 tests through cozytest.sh, none under bats, the same as before) and with the open backport batch and its conflict resolutions on top (50 suites, 532 tests through cozytest.sh, 10 suites, 73 tests under bats, all passing). Refs: #3849 Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>