You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the service_provider fact from the stdlib module in my own modules. Because this fact won't be in facterdb I have to provide values for it. Now, I can do this using add_custom_fact :service_provider, ->(os, facts) { ... } however at least for this fact, the logic can be quite cumbersome. I also have to duplicate this logic across every module that uses this same fact.
It would be handy if (somehow) a module that provides a custom fact also exports some example values for use in tests split by OS which could then be picked up by rspec-puppet-facts. I'm not sure how it would work, but given every module dependency is available under spec/fixtures/modules/* during a test run some well-defined location in each module could be used. So stdlib would have example values that on for example, RHEL6, service_provider is init, on RHEL7 its systemd, plus all of the other OS values, etc.
I found voxpupuli/facterdb#49 which is about the package_provider fact, but it's the same problem.
The text was updated successfully, but these errors were encountered:
I'm using the
service_provider
fact from the stdlib module in my own modules. Because this fact won't be in facterdb I have to provide values for it. Now, I can do this usingadd_custom_fact :service_provider, ->(os, facts) { ... }
however at least for this fact, the logic can be quite cumbersome. I also have to duplicate this logic across every module that uses this same fact.It would be handy if (somehow) a module that provides a custom fact also exports some example values for use in tests split by OS which could then be picked up by rspec-puppet-facts. I'm not sure how it would work, but given every module dependency is available under
spec/fixtures/modules/*
during a test run some well-defined location in each module could be used. So stdlib would have example values that on for example, RHEL6,service_provider
isinit
, on RHEL7 itssystemd
, plus all of the other OS values, etc.I found voxpupuli/facterdb#49 which is about the
package_provider
fact, but it's the same problem.The text was updated successfully, but these errors were encountered: