summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-08-22 22:13:23 -0500
committerLuke Kanies <luke@madstop.com>2007-08-22 22:13:23 -0500
commit7c4d39ec09c10871d7eb234fe4392381245ff443 (patch)
tree32476596280f2b04107e00bcf256b8d7d4826794 /test
parentb599862fc85c968676799edde865a96faa66a75b (diff)
Adding environment information to the client fact list. The environment is retrieved from the normal Puppet configuration, so it is set via puppet.conf or the cli, rather than being a normal fact.
Diffstat (limited to 'test')
-rwxr-xr-xtest/network/client/master.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/network/client/master.rb b/test/network/client/master.rb
index 7746d20ff..7896d4019 100755
--- a/test/network/client/master.rb
+++ b/test/network/client/master.rb
@@ -683,6 +683,16 @@ end
end
end
+ def test_environment_is_added_to_facts
+ facts = Puppet::Network::Client::Master.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::Network::Client::Master.facts
+ assert_equal(facts["environment"], Puppet[:environment], "Did not add environment to client facts")
+ end
+
# This is partially to fix #532, but also to save on memory.
def test_remove_objects_after_every_run
client = mkclient