Commit Graph
2 Commits
Author SHA1 Message Date
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
kevinveenbirkenbachandClaude Opus 4.7 02da33b0a5 refactor(tests): reorganize into topical sub-clusters and consolidate linting
Under tests/integration/roles/ introduce four sub-clusters (meta/,
dependencies/, applications/, run_once/) plus nested dependencies/run_after/
and applications/id/. Fold tests/integration/application_id/ into
roles/applications/id/ and tests/integration/run_once/ into roles/run_once/.
Pull four application-related tests out of tests/integration/ into
roles/applications/, and test_run_after_references.py into the run_after/
sub-cluster.

Consolidate tests/integration/linting/ into tests/lint/{ansible,filesystem,
repository}/, so repository-wide lint checks now run under make test-lint
rather than make test-integration.

Each new cluster ships a README.md and __init__.py; cross-referencing
READMEs (categories, ports, services, roles, applications) are updated to
point at the new paths. Path depths inside moved tests and one hardcoded
ignore path in test_domain.py are adjusted accordingly. No behavior change;
all 32 lint tests and every moved cluster pass locally.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 12:22:33 +02:00