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

Nick Lewis nick at puppetlabs.com
Tue May 10 08:05:29 UTC 2011


The following commit has been merged in the experimental branch:
commit 9c0e55b43f6db69f060d54c894f2303ecbbe04e3
Author: Devon Peters <devon.peters at e-hps.com>
Date:   Wed Feb 2 09:29:53 2011 -0800

    (#5496) Added tests for the new zpool output format
    
    Reviewed-By: Nick Lewis

diff --git a/spec/unit/provider/zpool/solaris_spec.rb b/spec/unit/provider/zpool/solaris_spec.rb
index 99e6997..f15b7d1 100755
--- a/spec/unit/provider/zpool/solaris_spec.rb
+++ b/spec/unit/provider/zpool/solaris_spec.rb
@@ -76,6 +76,13 @@ describe provider_class do
       end
     end
 
+    describe "when the vdev is a single mirror on solaris 10u9 or later" do
+      it "should call create_multi_array with mirror" do
+        @zpool_data = ["mirrorpool", "mirror-0", "disk1", "disk2"]
+        @provider.process_zpool_data(@zpool_data)[:mirror].should == ["disk1 disk2"]
+      end
+    end
+
     describe "when the vdev is a double mirror" do
       it "should call create_multi_array with mirror" do
         @zpool_data = ["mirrorpool", "mirror", "disk1", "disk2", "mirror", "disk3", "disk4"]
@@ -83,6 +90,13 @@ describe provider_class do
       end
     end
 
+    describe "when the vdev is a double mirror on solaris 10u9 or later" do
+      it "should call create_multi_array with mirror" do
+        @zpool_data = ["mirrorpool", "mirror-0", "disk1", "disk2", "mirror-1", "disk3", "disk4"]
+        @provider.process_zpool_data(@zpool_data)[:mirror].should == ["disk1 disk2", "disk3 disk4"]
+      end
+    end
+
     describe "when the vdev is a raidz1" do
       it "should call create_multi_array with raidz1" do
         @zpool_data = ["mirrorpool", "raidz1", "disk1", "disk2"]
@@ -90,6 +104,13 @@ describe provider_class do
       end
     end
 
+    describe "when the vdev is a raidz1 on solaris 10u9 or later" do
+      it "should call create_multi_array with raidz1" do
+        @zpool_data = ["mirrorpool", "raidz1-0", "disk1", "disk2"]
+        @provider.process_zpool_data(@zpool_data)[:raidz].should == ["disk1 disk2"]
+      end
+    end
+
     describe "when the vdev is a raidz2" do
       it "should call create_multi_array with raidz2 and set the raid_parity" do
         @zpool_data = ["mirrorpool", "raidz2", "disk1", "disk2"]
@@ -98,6 +119,15 @@ describe provider_class do
         pool[:raid_parity].should == "raidz2"
       end
     end
+
+    describe "when the vdev is a raidz2 on solaris 10u9 or later" do
+      it "should call create_multi_array with raidz2 and set the raid_parity" do
+        @zpool_data = ["mirrorpool", "raidz2-0", "disk1", "disk2"]
+        pool = @provider.process_zpool_data(@zpool_data)
+        pool[:raidz].should == ["disk1 disk2"]
+        pool[:raid_parity].should == "raidz2"
+      end
+    end
   end
 
   describe "when calling the getters and setters" do

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list