From ee9d0025eeebda1522d450b5bd3cda769d7455d5 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Tue, 1 Jul 2008 12:57:56 -0500 Subject: Fixed #1114 - Facts in plugin directories should now be autoloaded, as long as you're using Facter 1.5. --- test/network/client/master.rb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'test/network/client') diff --git a/test/network/client/master.rb b/test/network/client/master.rb index 9f71247fa..0c1405217 100755 --- a/test/network/client/master.rb +++ b/test/network/client/master.rb @@ -177,10 +177,12 @@ end assert(File.exists?(destfile), "Did not get fact") - assert_equal(hostname, Facter.value(:hostname), + facts = Puppet::Network::Client.master.facts + + assert_equal(hostname, facts["hostname"], "Lost value to hostname") - assert_equal("yayness", Facter.value(:myfact), + assert_equal("yayness", facts["myfact"], "Did not get correct fact value") # Now modify the file and make sure the type is replaced @@ -194,20 +196,22 @@ end assert_nothing_raised { Puppet::Network::Client.master.getfacts } + facts = Puppet::Network::Client.master.facts - assert_equal("funtest", Facter.value(:myfact), + assert_equal("funtest", facts["myfact"], "Did not reload fact") - assert_equal(hostname, Facter.value(:hostname), + assert_equal(hostname, facts["hostname"], "Lost value to hostname") # Now run it again and make sure the fact still loads assert_nothing_raised { Puppet::Network::Client.master.getfacts } + facts = Puppet::Network::Client.master.facts - assert_equal("funtest", Facter.value(:myfact), + assert_equal("funtest", facts["myfact"], "Did not reload fact") - assert_equal(hostname, Facter.value(:hostname), + assert_equal(hostname, facts["hostname"], "Lost value to hostname") end -- cgit