Create a custom fact that resolves a core fact. e.g.
{code}
Facter.add(:my_custom_fact) do setcode do Facter.value('system_uptime.seconds') end end
{code}
Create a custom fact group that contains "system_uptime" and "my_custom_fact".
* request all the facts ** check that the cache file contains my_custom_fact and system_uptime ** check that my_custom_fact and system_uptime.seconds have the same value * request all facts again
Create a custom fact that resolves a core fact. e.g. {code}Facter.add(:my_custom_fact) do setcode do Facter.value('system_uptime.seconds') end end {code} Create a custom fact group that contains "system_uptime" and "my_custom_fact". * request all the facts ** check that the cache file contains my_custom_fact and system_uptime ** check that my_custom_fact and system_uptime.seconds have the same value
* request all facts again and check thatmy_custom_fact and system_uptime.seconds return the values from cache.