summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2010-07-17 17:25:04 +0200
committerMarkus Roberts <Markus@reality.com>2010-07-18 19:44:08 -0700
commit6e07a199011b434ea6d7b3c69d14e6ca7cf9cf8e (patch)
treeb4fcf70fec6ea861b8134584a2c6dd804bb6aa84 /spec
parent5b68afe0be7abd4f6743c4ad05513b6879f40153 (diff)
downloadpuppet-6e07a199011b434ea6d7b3c69d14e6ca7cf9cf8e.tar.gz
puppet-6e07a199011b434ea6d7b3c69d14e6ca7cf9cf8e.tar.xz
puppet-6e07a199011b434ea6d7b3c69d14e6ca7cf9cf8e.zip
Fix #4262 - Puppetmaster used to log compilation time
It looks like a merge went wrong and we were returning abruptely from a benchmark block, thus jumping over a precious log information. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/indirector/catalog/compiler_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/indirector/catalog/compiler_spec.rb b/spec/unit/indirector/catalog/compiler_spec.rb
index 755509f53..2ae5f6ff3 100755
--- a/spec/unit/indirector/catalog/compiler_spec.rb
+++ b/spec/unit/indirector/catalog/compiler_spec.rb
@@ -137,6 +137,16 @@ describe Puppet::Resource::Catalog::Compiler do
Puppet::Parser::Compiler.stubs(:compile)
@compiler.find(@request)
end
+
+ it "should log the benchmark result" do
+ Puppet::Node.stubs(:find).returns(@node)
+ @compiler.stubs(:networked?).returns(true)
+ Puppet::Parser::Compiler.stubs(:compile)
+
+ Puppet.expects(:notice).with { |msg| msg =~ /Compiled catalog/ }
+
+ @compiler.find(@request)
+ end
end
describe "when extracting facts from the request" do