[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.4-89-gcbbd363
James Turnbull
james at lovedthanlost.net
Tue May 18 09:04:49 UTC 2010
The following commit has been merged in the upstream branch:
commit 5abe571e167744ac198960c8e35c699375ec5cf7
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 dc7e58f..7c31833 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 ab6aa68..73c3273 100755
--- a/spec/unit/resource/catalog.rb
+++ b/spec/unit/resource/catalog.rb
@@ -832,6 +832,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
@@ -844,6 +846,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
@@ -855,6 +862,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