summaryrefslogtreecommitdiff
path: root/spec/unit/facter/pe_required_facts_spec.rb
AgeCommit message (Collapse)Author
2014-04-16(maint) Remove facter versions testKylo Ginsberg
This test attempts to emulate various versions of facter, but is still dependent on the version of facter it is running against. The immediate symptom was that the test breaks with facter 2.0.1 because it adds another external facts search directory. I tried a couple ways to stub this but allowing it to pretend to run against one set of facters, while actually running against one real facter (which might itself be one of several versions) eluded me. So this patch just removes the test.
2013-12-18(Maint) Update stubbing to work with facter 1.7.4Andrew Parker
Facter 1.7.4 changed how it decides on what directory to look in for facts.d based on the user it is running as. This stubs out that bit of code to make it think it is running as root.
2013-05-07(#20582) Restore facter_dot_d to stdlib for PE usersJeff McCune
Without this patch Puppet Enterprise users who install the most recent version of stdlib lose the ability to resolve certain facts critical to the operation of Puppet Enterprise. These facts are defined externally in the file `/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt`. As an example, Puppet Enterprise catalogs fail to compile if the `fact_stomp_server`, and `fact_stomp_port` facts are not defined. `facter_dot_d` was removed from stdlib version 4 because Facter version 1.7 now supports external facts defined in `/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt`. Puppet Enterprise does not yet include Facter 1.7, however. The most recent PE release, 2.8.1, includes Facter 1.6.17. With this version of Facter, users who replace the version of stdlib that ships with PE with the most recent version from the Forge will lose the ability to resolve facts from `/etc/puppetlabs/facter/facts.d/puppet_enterprise_installer.txt`. This patch addresses the problem by detecting if Facter version < 1.7 is loaded. If so, then the facter_dot_d.rb facts will be defined using the stdlib custom fact. If Facter >= 1.7 is being used then stdlib will not define external facts.