diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2010-11-01 11:45:27 -0700 |
|---|---|---|
| committer | Jesse Wolfe <jes5199@gmail.com> | 2010-11-01 11:49:41 -0700 |
| commit | fb5f859cf4a89042a1768b6cbc2dbfc43da49c99 (patch) | |
| tree | 74ad789bb27f18b87bdbeaa83dfe9306105ed3a2 /spec | |
| parent | 5f0cf4ef50a3676229a1c824b9a730b6951e1c7a (diff) | |
| download | puppet-fb5f859cf4a89042a1768b6cbc2dbfc43da49c99.tar.gz puppet-fb5f859cf4a89042a1768b6cbc2dbfc43da49c99.tar.xz puppet-fb5f859cf4a89042a1768b6cbc2dbfc43da49c99.zip | |
Fix #5164 Change Facts timestamp when they are received by the master
This patch causes the puppet master to re-timestamp facts when they are
received by the catalog compiler terminus. This makes the timestamps
more trustworthy, as it means that they are all based upon the same
clock's time.
Paired-With: Paul Berry <paul@puppetlabs.com>
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/unit/indirector/catalog/compiler_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/unit/indirector/catalog/compiler_spec.rb b/spec/unit/indirector/catalog/compiler_spec.rb index a9c2e3e28..f9980807a 100755 --- a/spec/unit/indirector/catalog/compiler_spec.rb +++ b/spec/unit/indirector/catalog/compiler_spec.rb @@ -167,12 +167,17 @@ describe Puppet::Resource::Catalog::Compiler do @compiler.extract_facts_from_request(@request) end - it "should use the Facts class to deserialize the provided facts" do + it "should use the Facts class to deserialize the provided facts and update the timestamp" do @request.options[:facts_format] = "foo" @request.options[:facts] = "bar" Puppet::Node::Facts.expects(:convert_from).returns @facts + @facts.timestamp = Time.parse('2010-11-01') + @now = Time.parse('2010-11-02') + Time.expects(:now).returns(@now) + @compiler.extract_facts_from_request(@request) + @facts.timestamp.should == @now end it "should use the provided fact format" do |
