[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

Luke Kanies luke at puppetlabs.com
Wed Jul 14 10:32:24 UTC 2010


The following commit has been merged in the upstream branch:
commit 410b71ca4c85971b4fa3ccab461942c5968816dc
Author: Luke Kanies <luke at puppetlabs.com>
Date:   Mon Apr 12 11:07:05 2010 -0700

    Removing invalid File integration test
    
    The point of this test was to confirm that we could take
    a given file resource and have it work multiple times in
    memory, but that's not actually possible given our current
    code.  We copy the values over from the source metadata,
    and suddenly have no method for differentiation between
    values set by the user and those set by the remote source.
    
    Signed-off-by: Luke Kanies <luke at puppetlabs.com>

diff --git a/spec/integration/type/file.rb b/spec/integration/type/file.rb
index 259c975..6222f0a 100755
--- a/spec/integration/type/file.rb
+++ b/spec/integration/type/file.rb
@@ -19,12 +19,6 @@ describe Puppet::Type.type(:file) do
     end
 
     describe "when writing files" do
-        before do
-            Puppet::Util::Log.newdestination :console
-        end
-
-        after { Puppet::Util::Log.close :console }
-
         it "should backup files to a filebucket when one is configured" do
             bucket = Puppet::Type.type(:filebucket).new :path => tmpfile("filebucket"), :name => "mybucket"
             file = Puppet::Type.type(:file).new :path => tmpfile("bucket_backs"), :backup => "mybucket", :content => "foo"
@@ -358,6 +352,7 @@ describe Puppet::Type.type(:file) do
             dest = tmpfile("destwith spaces")
 
             File.open(source, "w") { |f| f.print "foo" }
+            File.chmod(0755, source)
 
             file = Puppet::Type::File.new(:path => dest, :source => source)
 
@@ -367,29 +362,7 @@ describe Puppet::Type.type(:file) do
             catalog.apply
 
             File.read(dest).should == "foo"
-        end
-
-        it "should be able to notice changed files in the same process" do
-            source = tmpfile("source")
-            dest = tmpfile("dest")
-
-            File.open(source, "w") { |f| f.print "foo" }
-
-            file = Puppet::Type::File.new(:name => dest, :source => source, :backup => false)
-
-            catalog = Puppet::Resource::Catalog.new
-            catalog.add_resource file
-            catalog.apply
-
-            File.read(dest).should == "foo"
-
-            # Now change the file
-            File.open(source, "w") { |f| f.print "bar" }
-            file.expire
-            catalog.apply
-
-            # And make sure it's changed
-            File.read(dest).should == "bar"
+            (File.stat(dest).mode & 007777).should == 0755
         end
 
         it "should be able to copy individual files even if recurse has been specified" do

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list