diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2010-03-31 17:34:16 -0700 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | 913b63cddfaed68605aa3341010b0aa53c9870a5 (patch) | |
| tree | bcdc70d641f20f04f7569dec62438bab89273784 /spec/unit | |
| parent | a228399fb921eabd635bddd92b63d86ee3c26d2c (diff) | |
| download | puppet-913b63cddfaed68605aa3341010b0aa53c9870a5.tar.gz puppet-913b63cddfaed68605aa3341010b0aa53c9870a5.tar.xz puppet-913b63cddfaed68605aa3341010b0aa53c9870a5.zip | |
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.
Diffstat (limited to 'spec/unit')
| -rwxr-xr-x | spec/unit/resource/catalog.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/resource/catalog.rb b/spec/unit/resource/catalog.rb index 853bf9bee..afa98fa35 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 |
