mirror of
https://github.com/cozystack/cozystack.git
synced 2026-10-26 04:57:09 +09:00
test(hack): load the strict-mode helper in fork-new-images.bats (#4805)
## What this PR does The bats unit lane is red on main, and so is the "Unit & controller tests" check on pull requests built on it. `hack/bats-strict-setup.bats` requires each unit file to load `test_helper`, which turns `set -u` back on for its tests. `hack/fork-new-images.bats` is the only unit file without that line, so the audit fails with `strict-mode setup missing or overridden`. This PR adds the line. All six tests in that file pass under `set -u`. ### Screenshots Not a UI change. ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note test(hack): fork-new-images.bats loads the strict-mode helper, so the strict-mode audit in the bats unit lane passes again. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Updated the fork-image tests to load their shared test setup before running, ensuring the tests have the required support in place. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
1 file changed
+2
@@ -4,6 +4,8 @@
|
||||
# e2e-fork.yaml uses for the push allowlist, or the early check and the push
|
||||
# disagree about what counts as new.
|
||||
|
||||
load test_helper
|
||||
|
||||
ROOT="$(pwd)"
|
||||
SCRIPT="$ROOT/hack/fork-new-images.sh"
|
||||
FORK_WF="$ROOT/.github/workflows/e2e-fork.yaml"
|
||||
|
||||
Reference in new issue
Block a user