diff options
author | Luke Kanies <luke@madstop.com> | 2009-01-19 18:19:22 -0600 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-02-06 18:08:40 -0600 |
commit | 9d76b70c07c86f0041a0e6a1537227de1b619017 (patch) | |
tree | d47ae564e8984b61461e530839ccc1a34e200850 | |
parent | a5c2d7acde8a3af94a9674c32f6ee4ef94288d17 (diff) | |
download | puppet-9d76b70c07c86f0041a0e6a1537227de1b619017.tar.gz puppet-9d76b70c07c86f0041a0e6a1537227de1b619017.tar.xz puppet-9d76b70c07c86f0041a0e6a1537227de1b619017.zip |
Removing the Agent code that added client-side facts
It's now moved to the Facter indirector terminus.
Signed-off-by: Luke Kanies <luke@madstop.com>
-rw-r--r-- | lib/puppet/agent.rb | 9 | ||||
-rwxr-xr-x | test/agent.rb | 37 |
2 files changed, 0 insertions, 46 deletions
diff --git a/lib/puppet/agent.rb b/lib/puppet/agent.rb index f6d96acc2..74c8d7310 100644 --- a/lib/puppet/agent.rb +++ b/lib/puppet/agent.rb @@ -54,15 +54,6 @@ class Puppet::Agent newhash end - # Add our client version to the list of facts, so people can use it - # in their manifests - facts["clientversion"] = Puppet.version.to_s - - # And add our environment as a fact. - unless facts.include?("environment") - facts["environment"] = Puppet[:environment] - end - facts end diff --git a/test/agent.rb b/test/agent.rb index 775e16d02..be0e7a9a6 100755 --- a/test/agent.rb +++ b/test/agent.rb @@ -37,17 +37,6 @@ class TestAgent < Test::Unit::TestCase client.run end - # Make sure we're getting the client version in our list of facts - def test_clientversionfact - facts = nil - assert_nothing_raised { - facts = Puppet::Agent.facts - } - - assert_equal(Puppet.version.to_s, facts["clientversion"]) - - end - # Make sure non-string facts don't make things go kablooie def test_nonstring_facts FileUtils.mkdir_p(Puppet[:statedir]) @@ -186,16 +175,6 @@ end "Lost value to hostname") end - # Make sure that setting environment by fact takes precedence to configuration - def test_setenvironmentwithfact - name = "environment" - value = "test_environment" - - Facter.stubs(:to_hash).returns(name => value) - - assert_equal(value, Puppet::Agent.facts[name]) - end - # Make sure we load all facts on startup. def test_loadfacts dirs = [tempfile(), tempfile()] @@ -272,12 +251,6 @@ end Facter.to_hash.each do |fact, value| assert_equal(facts[fact.downcase], value.to_s, "%s is not equal" % fact.inspect) end - - # Make sure the puppet version got added - assert_equal(Puppet::PUPPETVERSION, facts["clientversion"], "client version did not get added") - - # And make sure the ruby version is in there - assert_equal(RUBY_VERSION, facts["rubyversion"], "ruby version did not get added") end # #540 - make sure downloads aren't affected by noop @@ -379,16 +352,6 @@ end end end - def test_environment_is_added_to_facts - facts = Puppet::Agent.facts - assert_equal(facts["environment"], Puppet[:environment], "Did not add environment to client facts") - - # Now set it to a real value - Puppet[:environment] = "something" - facts = Puppet::Agent.facts - assert_equal(facts["environment"], Puppet[:environment], "Did not add environment to client facts") - end - # #685 def test_http_failures_do_not_kill_puppetd client = Puppet::Agent.new |