[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:34:46 UTC 2010


The following commit has been merged in the upstream branch:
commit bba45f1defe7525e59e9e5c66882e6416bfad99e
Author: Rein Henrichs <rein at puppetlabs.com>
Date:   Wed Jun 23 11:22:06 2010 -0700

    [#4055] Confine CouchDB-related specs to the couchdb feature
    
    Prevents unmet dependency problems when running tests without the
    couchrest gem

diff --git a/lib/puppet/indirector/couch.rb b/lib/puppet/indirector/couch.rb
index dc3e495..6818ee8 100644
--- a/lib/puppet/indirector/couch.rb
+++ b/lib/puppet/indirector/couch.rb
@@ -1,3 +1,5 @@
+raise "Couch terminus not supported without couchrest gem" unless Puppet.features.couchdb?
+
 require 'couchrest'
 class Puppet::Indirector::Couch < Puppet::Indirector::Terminus
 
diff --git a/spec/unit/indirector/facts/couch.rb b/spec/unit/indirector/facts/couch.rb
index 409cb50..0884012 100644
--- a/spec/unit/indirector/facts/couch.rb
+++ b/spec/unit/indirector/facts/couch.rb
@@ -3,9 +3,11 @@
 require File.dirname(__FILE__) + '/../../../spec_helper'
 
 require 'puppet/node/facts'
-require 'puppet/indirector/facts/couch'
 
-describe Puppet::Node::Facts::Couch do
+describe "Puppet::Node::Facts::Couch" do
+    confine "couchrest gem is missing; cannot test couch terminus" => Puppet.features.couchdb?
+    require 'puppet/indirector/facts/couch' if Puppet.features.couchdb?
+
     before do
         @mock_db = mock('couch db')
         mock_document = CouchRest::Document.new(:_id => fake_request.key, :facts => fake_request.values)

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list