Files
cozystack/hack/test_helper.bash
Myasnikov Daniil cc942fed68 test(tests): run unit suites with Bats and retain POSIX coverage
The shell translator rewrites test bodies and loses Bats reporting.
The unit lane needs complete TAP results and JUnit reports without
changing how live-cluster suites run.

Sourced production helpers still need a dash pass, and unit test bodies
need nounset without exporting shell options into subprocesses.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-10-07 11:04:00 +03:00

12 lines
357 B
Bash

# Bats supplies errexit but not nounset. Enable nounset in each test process
# without exporting shell options to production scripts launched by the tests.
# A file-local setup() must call strict_setup first; bats-strict-setup.bats
# audits that contract against the Makefile's discovered unit files.
strict_setup() {
set -u
}
setup() {
strict_setup
}