]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commit
(1093) - Fix unresolved fact error 1093-fix_unresolved_fact_error
authorjordanbreen28 <jordan.breen@perforce.com>
Tue, 29 Nov 2022 12:28:58 +0000 (12:28 +0000)
committerjordanbreen28 <jordan.breen@perforce.com>
Tue, 6 Dec 2022 15:01:11 +0000 (15:01 +0000)
commit14c1371a40ae612d7e09a4e1ac7a2db0fb81f523
treed4d3a62726432a8ea1e9a222d900640d0ec1f9e9
parente7efae5be693ed475fbc2468bba09af692960fe2
(1093) - Fix unresolved fact error

Prior to this commit, work was carried out on this module to update all instances of the now deprecated Facter::Util::Resolution, and replace all with its newer and supported counterpart Facter::Core::Execution.
However, these do not behave exactly the same. Facter::Util::Resolution initially ran a which to locate the binary before executing, preventing any errors from occuring. The newer Facter::Core::Execution method did not do this, instead it attempted to execut>

This commit aims to introduce an "on_fail:false" flag to each execute statement, so that a failed execute will return false (boolean) as oppose to an error, which can then be used for further logic.
lib/facter/ip6tables_version.rb
lib/facter/iptables_persistent_version.rb
lib/facter/iptables_version.rb
spec/unit/facter/iptables_persistent_version_spec.rb
spec/unit/facter/iptables_spec.rb