[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35
test branch
puppet-dev at googlegroups.com
Wed Jul 14 10:32:50 UTC 2010
The following commit has been merged in the upstream branch:
commit 913b63cddfaed68605aa3341010b0aa53c9870a5
Author: Jesse Wolfe <jes5199 at gmail.com>
Date: Wed Mar 31 17:34:16 2010 -0700
Bug #3451: Don't leak the terminus class setting from Puppet::Resource::Catalog's spec
This issue causes other specs to fail, because they depend on the
default terminus being unchanged.
diff --git a/lib/puppet/indirector/indirection.rb b/lib/puppet/indirector/indirection.rb
index 35f1776..06aa190 100644
--- a/lib/puppet/indirector/indirection.rb
+++ b/lib/puppet/indirector/indirection.rb
@@ -145,6 +145,10 @@ class Puppet::Indirector::Indirection
@terminus_class
end
+ def reset_terminus_class
+ @terminus_class = nil
+ end
+
# Specify the terminus class to use.
def terminus_class=(klass)
validate_terminus_class(klass)
diff --git a/spec/unit/resource/catalog.rb b/spec/unit/resource/catalog.rb
index 853bf9b..afa98fa 100755
--- a/spec/unit/resource/catalog.rb
+++ b/spec/unit/resource/catalog.rb
@@ -819,6 +819,8 @@ describe Puppet::Resource::Catalog, "when compiling" do
describe "when indirecting" do
before do
+ @real_indirection = Puppet::Resource::Catalog.indirection
+
@indirection = stub 'indirection', :name => :catalog
Puppet::Util::Cacher.expire
@@ -831,6 +833,11 @@ describe Puppet::Resource::Catalog, "when compiling" do
end
it "should use the value of the 'catalog_terminus' setting to determine its terminus class" do
+ # Puppet only checks the terminus setting the first time you ask
+ # so this returns the object to the clean state
+ # at the expense of making this test less pure
+ Puppet::Resource::Catalog.indirection.reset_terminus_class
+
Puppet.settings[:catalog_terminus] = "rest"
Puppet::Resource::Catalog.indirection.terminus_class.should == :rest
end
@@ -842,6 +849,7 @@ describe Puppet::Resource::Catalog, "when compiling" do
after do
Puppet::Util::Cacher.expire
+ @real_indirection.reset_terminus_class
end
end
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list