Nothing currently tests the control repo as a whole: site.pp, the Puppetfile, the repo hiera.yaml/data/, and role classification are never compiled together. Module unit tests use per-module fixtures and can't see the repo's Hiera data — which is exactly the layer where #2 (node data file silently ignored by automatic parameter lookup) went undetected. Repo-level CI only does syntax/lint/YAML validation.
Options to discuss:
- onceover — purpose-built control-repo testing: compiles every role against a matrix of supported OS factsets using the real Puppetfile, manifests, and Hiera data. Minimal config, would slot in as a fourth CI job.
- Hand-rolled repo-level rspec — a root
spec/ (modulesync-style spec/{classes,defines,functions,hosts,type_aliases} + spec_helper.rb) wired to the repo hiera.yaml and site modules. More flexible, more scaffolding to maintain, and overlaps the per-module suites.
Given the roles-and-profiles layout already has per-module unit tests, onceover targets the actual gap (cross-module catalog compilation with real repo data) with the least duplication.
Raised by Yury Bushmelev (jay7x).
Nothing currently tests the control repo as a whole:
site.pp, thePuppetfile, the repohiera.yaml/data/, and role classification are never compiled together. Module unit tests use per-module fixtures and can't see the repo's Hiera data — which is exactly the layer where #2 (node data file silently ignored by automatic parameter lookup) went undetected. Repo-level CI only does syntax/lint/YAML validation.Options to discuss:
spec/(modulesync-stylespec/{classes,defines,functions,hosts,type_aliases}+spec_helper.rb) wired to the repo hiera.yaml and site modules. More flexible, more scaffolding to maintain, and overlaps the per-module suites.Given the roles-and-profiles layout already has per-module unit tests, onceover targets the actual gap (cross-module catalog compilation with real repo data) with the least duplication.
Raised by Yury Bushmelev (jay7x).