[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:05 UTC 2011


The following commit has been merged in the experimental branch:
commit 349f6f2f25f4e13c2bf7c16a54f2d1c3ae85ac5f
Author: Daniel Pittman <daniel at rimspace.net>
Date:   Tue Mar 8 17:05:01 2011 -0800

    (#6641) Make it easier to add future platforms to the suite.
    
    When a new fstab fixture is added, we also want to try to test mount output.
    If that fixture is missing, we would have failed a test, but now mark it
    pending.
    
    This is more correct when, for example, we don't yet have that fixture: it
    isn't technically a failure, just an incomplete set of test data.

diff --git a/spec/unit/provider/mount/parsed_spec.rb b/spec/unit/provider/mount/parsed_spec.rb
index e8a862f..43defbe 100755
--- a/spec/unit/provider/mount/parsed_spec.rb
+++ b/spec/unit/provider/mount/parsed_spec.rb
@@ -201,6 +201,14 @@ FSTAB
             pending "We need to stub the operatingsystem fact at load time, but can't"
         end
 
+        # Stub the mount output to our fixture.
+        begin
+          mount = my_fixture(platform + '.mount')
+          @provider.stubs(:mountcmd).returns File.read(mount)
+        rescue
+          pending "is #{platform}.mount missing at this point?"
+        end
+
         # Note: we have to stub default_target before creating resources
         # because it is used by Puppet::Type::Mount.new to populate the
         # :target property.
@@ -216,8 +224,6 @@ FSTAB
         [@res_ghost, @res_mounted, @res_unmounted, @res_absent].each do |resource|
           @resource_hash[resource.name] = resource
         end
-
-        @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