Files
computer-playbook/tests/integration/roles/meta/services/README.md
kevinveenbirkenbachandClaude Opus 4.7 8d8576e538 refactor(tests): reorganise meta tests + add multi-doc yaml cache
Two intertwined changes that share the same touched files:

1. Move every meta-related integration test under
   `tests/integration/roles/meta/` into one of three sibling
   sub-clusters and shorten the redundant filename prefixes:

   - `services/` — `test_services_dynamic_flags.py` →
     `test_dynamic_flags.py`, `test_services_no_self_reference.py` →
     `test_no_self_reference.py`. The `run_after` cluster moves
     under it (it is a `meta/services.yml` concern, not a
     stand-alone dependency one): `test_services_explicit.py` keeps
     its name, the rest drop the redundant prefix.
   - `variants/` — `test_variants_coverage.py` → `test_coverage.py`,
     plus the two new lints `test_auth_coverage.py` (LDAP / OIDC /
     OAuth2 matrix completeness) and `test_services_match.py`
     (every variant override key MUST exist in `services.yml`).
   - `dependencies/` — relocates the legacy
     `tests/integration/roles/dependencies/` cluster so all
     `meta/`-shaped tests live under one parent.

   Path-index constants (`Path(__file__).resolve().parents[N]`,
   `os.pardir` chains) updated for the deeper nesting.

2. Route every yaml read in the migrated tests through
   `utils.cache.yaml`. The single-doc helper `load_yaml_any` covers
   most of them; the new `load_yaml_all` mirrors `load_yaml_any` for
   the multi-doc case (`yaml.safe_load_all`) and is keyed off the
   same `(path, mtime, size)` signature, with parallel `_drop_path`
   / `_reset` housekeeping. `tests/lint/ansible/variables/
   test_vars_usage_in_yaml.py` is the first user.

READMEs cleaned up to match the new directory structure (path
crosslinks, level-up counts) and four new READMEs added for the
new sub-clusters under the `docs/` README guidelines (RFC 2119,
emojis after headlines, no em dashes, no SPOT self-labels).

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

856 B

Role meta/services.yml Tests 🛎️

Integration tests that enforce invariants of each role's meta/services.yml: the dynamic-flag form ("{{ '<role>' in group_names }}") MUST be used wherever a service entry depends on a sibling role's deployment, and a role's services.yml MUST NOT reference itself as a sibling provider.

Tests in this directory MUST only cover meta/services.yml shape and content. The ordering-only galaxy_info.run_after cluster lives in the run_after/ sub-cluster; coverage of meta/variants.yml lives one level up in ../variants/; coverage of meta/main.yml's dependencies: key lives in ../dependencies/.

For framework, directory layout, and make test-integration usage see integration.md.