Files
computer-playbook/tests/unit/python
kevinveenbirkenbachandClaude Opus 5.5 699e5d8d83 fix(web-app-stalwart): write the 1.x store guard in store-i18n's conventions
updater's Stalwart v1 port (store_guard.yml, migrate.env.j2) arrived in
the merge (c9e7f950d9) with three constructs store-i18n's lints reject:

- `DEPLOYMENT_MODE == 'swarm'` in store_guard.yml and migrate.env.j2
  (test_deployment_mode_booleans): now IS_SWARM_MODE;
- `get_entity_name` in the store-engine fail_msg, a filter store-i18n
  renamed to entity_name (a05071fe78), so TestAllUsedFiltersAreDefined
  failed: now entity_name;
- two pairs of sibling tasks repeating the same `when`
  (test_no_repeated_when_runs): the shared-database and dedicated-volume
  lookups now sit in one block gated on `not (stalwart_store_marked |
  bool)`, the migrate include and the pre-1.0 assert in one block gated
  on `stalwart_store_layout is not skipped`; each task keeps its own
  remaining condition. Ansible evaluates a block's `when` per task, so
  the assert still sees the layout migrate.yml registers again.

updater's test_store_guard.py walked only the top-level tasks and failed
with KeyError: 'register' on the block wrappers. It now walks
block/rescue/always (utils.roles.invocations.NESTED_KEYS), hands a
block's `when` down to its children and checks the block condition
before the task's own, as Ansible does; the assertions are unchanged.
With either block's `when` removed from a copy of store_guard.yml, two
respectively four of its tests fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 03:28:37 +01:00
..