Files
computer-playbook/tests/integration
kevinveenbirkenbachandClaude Opus 4.7 7b40cd4f04 test(integration): guard run_once on every shared service-registry role
Adds tests/integration/roles/run_once/test_shared_primary_entity_run_once.py.
Walks every role that participates in the variant-aware service registry
(self-declared `shared: true` on the primary entity, declared via
`provides:`/aliases, OR consumer-activated through another role's
`services.<X>.enabled+shared`) and asserts that tasks/main.yml carries
a `run_once_<role_slug>` token.

Without that guard, sys-utils-service-loader can pull the role in twice
when both APPS= and a consumer's variant request it, triggering
duplicate execution / infinite recursion. The check is permissive about
the exact YAML shape (`include_tasks: 01_core.yml … when: run_once_…`,
a `block: … when: run_once_…`, or any other arrangement carrying the
literal token) so it complements the stricter
tests/lint/ansible/roles/test_service_core_first_task_run_once.py
schema lint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 12:19:34 +02:00
..
…
…

Integration Tests 🔗

See integration.md for the SPOT: framework, requirements, directory structure, and make test-integration usage.