Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hiera: Test for wrong interpolation syntax #143

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

bastelfreak
Copy link
Member

@bastelfreak bastelfreak commented Apr 4, 2023

This commit adds new base functions to validate hiera data. Previously we only tested hiera keys and eyaml. This also adds one specific check, to validate the correct syntax for lookup function interpolation.

@bastelfreak bastelfreak force-pushed the lookup branch 6 times, most recently from d8c50be to 73c82df Compare March 8, 2024 16:13
@bastelfreak bastelfreak self-assigned this Mar 8, 2024
@bastelfreak bastelfreak added the enhancement New feature or request label Mar 8, 2024
@bastelfreak bastelfreak force-pushed the lookup branch 2 times, most recently from 04cf85f to 7d913b5 Compare March 8, 2024 18:57
end

# gets a hash or array, returns all keys + values as array
def flatten_data(data, parent_key = [])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was written with the help of chatgpt

This commit adds new base functions to validate hiera *data*. Previously
we only tested hiera *keys* and eyaml. This also adds one specific
check, to validate the correct syntax for lookup function interpolation.
@bastelfreak bastelfreak merged commit 32d2a31 into voxpupuli:master Mar 12, 2024
10 checks passed
@bastelfreak bastelfreak deleted the lookup branch March 12, 2024 11:32
bastelfreak added a commit to bastelfreak/puppetlabs_spec_helper that referenced this pull request Mar 12, 2024
This is a new option in puppet-syntax 4.1.0:
voxpupuli/puppet-syntax#143

It will be enabled in puppet-syntax 5 be default:
voxpupuli/puppet-syntax#167
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants