[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Daniel Pittman daniel at puppetlabs.com
Tue May 10 08:06:10 UTC 2011


The following commit has been merged in the experimental branch:
commit 1a55c7a4c225dc022fa640bf46f7bc940013151d
Author: Daniel Pittman <daniel at puppetlabs.com>
Date:   Thu Mar 10 16:08:26 2011 -0800

    (#5479) Test that we auto-require the zone dataset.
    
    This adds a test at the catalog level to ensure that we generate the right
    graph relationships; this indirectly tests that the underlying code does the
    right thing, but importantly also makes us fairly immune to low level changes.
    
    Reviewed-By: Daniel Pittman <daniel at puppetlabs.com>
    Reviewed-By: Matt Robinson <matt at puppetlabs.com>

diff --git a/spec/unit/type/zone_spec.rb b/spec/unit/type/zone_spec.rb
index 726ccc2..a3e748b 100755
--- a/spec/unit/type/zone_spec.rb
+++ b/spec/unit/type/zone_spec.rb
@@ -57,4 +57,24 @@ describe zone do
     zone.new(:name => "dummy", :path => "/dummy", :ip => "if", :iptype => :exclusive)
   end
 
+  it "should auto-require :dataset entries" do
+    fs = 'random-pool/some-zfs'
+
+    # ick
+    provider = stub 'zfs::provider'
+    provider.stubs(:name).returns(:solaris)
+    Puppet::Type.type(:zfs).stubs(:defaultprovider).returns(provider)
+
+    catalog = Puppet::Resource::Catalog.new
+    zfs_instance = Puppet::Type.type(:zfs).new(:name => fs)
+    catalog.add_resource zfs_instance
+
+    zone_instance = zone.new(:name    => "dummy",
+                             :path    => "/foo",
+                             :ip      => 'en1:1.0.0.0',
+                             :dataset => fs)
+    catalog.add_resource zone_instance
+
+    catalog.relationship_graph.dependencies(zone_instance).should == [zfs_instance]
+  end
 end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list