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

Daniel Pittman daniel at rimspace.net
Tue May 10 08:06:03 UTC 2011


The following commit has been merged in the experimental branch:
commit 6a96584ea92afc83383dad85d1a2db956a58c323
Author: Daniel Pittman <daniel at rimspace.net>
Date:   Tue Mar 8 16:38:02 2011 -0800

    (#6441) Mark solaris tests pending, because we can't stub it.
    
    In the final combination test we need to mark Solaris pending, because we
    genuinely have a bug where we can't test due to stubbing order.

diff --git a/spec/unit/provider/mount/parsed_spec.rb b/spec/unit/provider/mount/parsed_spec.rb
index 3bc5b98..e8a862f 100755
--- a/spec/unit/provider/mount/parsed_spec.rb
+++ b/spec/unit/provider/mount/parsed_spec.rb
@@ -193,8 +193,13 @@ FSTAB
     platform = File.basename(fstab, '.fstab')
     describe "when prefetching on #{platform}" do
       before :each do
-        pending "solaris seems ... odd" if platform == "solaris"
-        @platform = platform
+        if Facter[:operatingsystem] == "Solaris" then
+          platform == 'solaris' or
+            pending "We need to stub the operatingsystem fact at load time, but can't"
+        else
+          platform != 'solaris' or
+            pending "We need to stub the operatingsystem fact at load time, but can't"
+        end
 
         # Note: we have to stub default_target before creating resources
         # because it is used by Puppet::Type::Mount.new to populate the
@@ -212,7 +217,7 @@ FSTAB
           @resource_hash[resource.name] = resource
         end
 
-        @provider.stubs(:mountcmd).returns File.read(my_fixture(@platform + '.mount'))
+        @provider.stubs(:mountcmd).returns File.read(my_fixture(platform + '.mount'))
       end
 
       it "should set :ensure to :unmounted if found in fstab but not mounted" do

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list