summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration')
-rwxr-xr-xspec/integration/type/file.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/integration/type/file.rb b/spec/integration/type/file.rb
index cced1ed1c..3b03d53e3 100755
--- a/spec/integration/type/file.rb
+++ b/spec/integration/type/file.rb
@@ -115,6 +115,27 @@ describe Puppet::Type.type(:file) do
File.lstat(newpath).ftype.should == "file"
end
end
+
+ it "should not recursively manage files managed by a more specific explicit file" do
+ dir = tmpfile("file_source_integration_source")
+
+ subdir = File.join(dir, "subdir")
+ file = File.join(subdir, "file")
+
+ FileUtils.mkdir_p(subdir)
+ File.open(file, "w") { |f| f.puts "" }
+
+ base = Puppet::Type::File.new(:name => dir, :recurse => true, :backup => false, :mode => "755")
+ sub = Puppet::Type::File.new(:name => subdir, :recurse => true, :backup => false, :mode => "644")
+
+ @catalog = Puppet::Resource::Catalog.new
+ @catalog.add_resource base
+ @catalog.add_resource sub
+
+ @catalog.apply
+
+ (File.stat(file).mode & 007777).should == 0644
+ end
end
describe "when generating resources" do