[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Nick Lewis nick at puppetlabs.com
Tue May 10 07:59:38 UTC 2011


The following commit has been merged in the experimental branch:
commit 2c98db60a6a667663745b4e0f5f7ad70c15fc364
Author: Nick Lewis <nick at puppetlabs.com>
Date:   Thu Oct 28 14:30:02 2010 -0700

    (#5148) Fix failing spec due to timezone
    
    Time.parse(...) will yield a string in the local timezone. So when
    this spec was run in a non -0700 timezone, it was failing, because
    it was comparing a string in local time to a string in -0700. This
    fixes it to compare to the local string representation of the time.

diff --git a/spec/unit/node/facts_spec.rb b/spec/unit/node/facts_spec.rb
index 19049e9..cb2aa3d 100755
--- a/spec/unit/node/facts_spec.rb
+++ b/spec/unit/node/facts_spec.rb
@@ -130,7 +130,7 @@ describe Puppet::Node::Facts, "when indirecting" do
         facts = Puppet::Node::Facts.new("foo", {'a' => 1, 'b' => 2, 'c' => 3})
         facts.expiration = @expiration
         pson = PSON.parse(facts.to_pson)
-        pson.should == {"name"=>"foo", "timestamp"=>"Thu Oct 28 11:16:31 -0700 2010", "expiration"=>"Thu Oct 28 11:21:31 -0700 2010", "values"=>{"a"=>1, "b"=>2, "c"=>3}}
+        pson.should == {"name"=>"foo", "timestamp"=>@timestamp.to_s, "expiration"=>@expiration.to_s, "values"=>{"a"=>1, "b"=>2, "c"=>3}}
       end
     end
   end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list