diff options
author | Luke Kanies <luke@madstop.com> | 2008-07-01 12:57:56 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-07-01 12:57:56 -0500 |
commit | ee9d0025eeebda1522d450b5bd3cda769d7455d5 (patch) | |
tree | 9c03a2ff0d8d943674d00ae1de388085b533e590 /test | |
parent | 117869fa1614cd3b4ff4e5e0df5ece699eb1fe56 (diff) | |
download | puppet-ee9d0025eeebda1522d450b5bd3cda769d7455d5.tar.gz puppet-ee9d0025eeebda1522d450b5bd3cda769d7455d5.tar.xz puppet-ee9d0025eeebda1522d450b5bd3cda769d7455d5.zip |
Fixed #1114 - Facts in plugin directories should now be autoloaded,
as long as you're using Facter 1.5.
Diffstat (limited to 'test')
-rwxr-xr-x | test/network/client/master.rb | 16 |
1 files changed, 10 insertions, 6 deletions
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 |