Skip to content

Migrate lookup acceptance tests to Hiera 5 data providers - #596

Open
silug wants to merge 1 commit into
OpenVoxProject:mainfrom
silug:acceptance-hiera5-data-providers
Open

Migrate lookup acceptance tests to Hiera 5 data providers#596
silug wants to merge 1 commit into
OpenVoxProject:mainfrom
silug:acceptance-hiera5-data-providers

Conversation

@silug

@silug silug commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Short description

PRs #384/#385 removed the deprecated data_binding_terminus and environment_data_provider settings and the metadata.json data_provider key, as accepted in the OpenVox 9 deprecation review. Two acceptance tests still configured environment and module data through those removed mechanisms and began failing on all platforms once 9.0.0 beta packages were built (acceptance-pipelines run 31098859281).

Migrate the fixtures the same way #385 migrated the in-repo spec fixtures:

  • tests/lookup/lookup.rb: bind the environment and module data functions through hiera.yaml (version 5, v4_data_hash) at the environment root and module roots; drop the data_provider key from metadata.json.

  • tests/parser_functions/puppet_lookup_cmd.rb: env2/env3 (function providers) get env-level hiera.yaml v5 with v4_data_hash: environment::data; env4 (none) gets an explicit empty hierarchy, since environments always have a data layer under Hiera 5; production/env1 keep their still-supported v4 env hiera.yaml. mod2/mod3 (function) get module hiera.yaml v5 with v4_data_hash; mod4 (none) loses its hiera.yaml entirely so the module layer is absent, preserving the not-found behavior the assertions expect. The inert environment_data_provider lines and all 20 metadata.json data_provider keys are removed. One --explain assertion is updated because the environment data provider section now always appears in explain output (previously absent under provider none).

Verified on a local beaker rig (single almalinux 9 primary running openvox-agent 9.0.0beta2 and openvox-server 9.0.0beta4, the versions from the failing pipeline run): both pipeline failures reproduced exactly with the pristine tests, and both tests pass with this change. All lookup value expectations are unchanged -- the loader picks the same function implementations the v4 providers did (ruby when both ruby and puppet-language exist, e.g. env2/mod2; puppet-language when only it exists, e.g. env3/mod3) and the v4_data_hash backend even preserves the Deprecated API function explain wording the test asserts.

Note for rerunning on persistent hosts: the puppet_lookup_cmd teardown removes node1/node2 SSL keys but not the CA-signed certs, so back-to-back runs against the same CA need a puppetserver ca clean first. Fresh pipeline VMs are unaffected.

Checklist

I have:

PRs OpenVoxProject#384/OpenVoxProject#385 removed the deprecated data_binding_terminus and environment_data_provider settings and the metadata.json data_provider key, as accepted in the OpenVox 9 deprecation review. Two acceptance tests still configured environment and module data through those removed mechanisms and began failing on all platforms once 9.0.0 beta packages were built (acceptance-pipelines run 31098859281).

Migrate the fixtures the same way OpenVoxProject#385 migrated the in-repo spec fixtures:

- tests/lookup/lookup.rb: bind the environment and module data functions through hiera.yaml (version 5, v4_data_hash) at the environment root and module roots; drop the data_provider key from metadata.json.

- tests/parser_functions/puppet_lookup_cmd.rb: env2/env3 (function providers) get env-level hiera.yaml v5 with v4_data_hash: environment::data; env4 (none) gets an explicit empty hierarchy, since environments always have a data layer under Hiera 5; production/env1 keep their still-supported v4 env hiera.yaml. mod2/mod3 (function) get module hiera.yaml v5 with v4_data_hash; mod4 (none) loses its hiera.yaml entirely so the module layer is absent, preserving the not-found behavior the assertions expect. The inert environment_data_provider lines and all 20 metadata.json data_provider keys are removed. One --explain assertion is updated because the environment data provider section now always appears in explain output (previously absent under provider none).

Verified on a local beaker rig (single almalinux 9 primary running openvox-agent 9.0.0~beta2 and openvox-server 9.0.0~beta4, the versions from the failing pipeline run): both pipeline failures reproduced exactly with the pristine tests, and both tests pass with this change. All lookup *value* expectations are unchanged -- the loader picks the same function implementations the v4 providers did (ruby when both ruby and puppet-language exist, e.g. env2/mod2; puppet-language when only it exists, e.g. env3/mod3) and the v4_data_hash backend even preserves the Deprecated API function explain wording the test asserts.

Note for rerunning on persistent hosts: the puppet_lookup_cmd teardown removes node1/node2 SSL keys but not the CA-signed certs, so back-to-back runs against the same CA need a puppetserver ca clean first. Fresh pipeline VMs are unaffected.

Signed-off-by: Steven Pritchard <steven.pritchard@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@bastelfreak bastelfreak closed this Aug 7, 2026
@bastelfreak bastelfreak reopened this Aug 7, 2026
@bastelfreak bastelfreak mentioned this pull request Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants