Signed-off-by: James Turnbull <[email protected]>
---
 lib/puppet/node/facts.rb |    1 +
 spec/unit/node/facts.rb  |    7 ++++++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/node/facts.rb b/lib/puppet/node/facts.rb
index 7c1a188..16738a7 100755
--- a/lib/puppet/node/facts.rb
+++ b/lib/puppet/node/facts.rb
@@ -24,6 +24,7 @@ class Puppet::Node::Facts
         values["clientcert"] = Puppet.settings[:certname]
         values["clientversion"] = Puppet.version.to_s
         values["environment"] ||= Puppet.settings[:environment]
+        values["config_version"] = @version
     end
 
     def initialize(name, values = {})
diff --git a/spec/unit/node/facts.rb b/spec/unit/node/facts.rb
index 43532cc..93dc65c 100755
--- a/spec/unit/node/facts.rb
+++ b/spec/unit/node/facts.rb
@@ -36,7 +36,12 @@ describe Puppet::Node::Facts, "when indirecting" do
         @facts.values["environment"].should == "foo"
     end
 
-    it "should be able to downcase fact values" do
+    it "should add the catalogue version as a fact when adding local facts" do
+        @facts.add_local_facts
+        @facts.values["config_version"].should == @version
+    end 
+    
+     it "should be able to downcase fact values" do
         Puppet.settings.stubs(:value).returns "eh"
         Puppet.settings.expects(:value).with(:downcasefacts).returns true
 
-- 
1.6.6.1

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to