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

Default filebeat_version fact to nil if filebeat is not installed #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

willaerk
Copy link

@willaerk willaerk commented Nov 7, 2023

I think the default for *_version facts is nil, if the software is not available ( eg. https://github.com/voxpupuli/puppet-php/blob/master/lib/facter/phpversion.rb). The current implementation, setting filebeat_version to false breaks spec tests for modules that include the filebeat class (a profiles module for example). This is caused by the explicit false value for the fact, as the normal fact resolution is not performed during a spec test.
Functionally, false behaves the same as the nil value, so nothing really changes by moving the value to nil if the software is not installed.

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.

1 participant