Signed-off-by: Paul Nasrat <[EMAIL PROTECTED]>
---
spec/unit/type/file.rb | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/spec/unit/type/file.rb b/spec/unit/type/file.rb
index 7f9688f..26a8ff9 100755
--- a/spec/unit/type/file.rb
+++ b/spec/unit/type/file.rb
@@ -109,5 +109,23 @@ describe Puppet::Type.type(:file) do
("%o" % (File.stat(@file).mode & 007777)).should == "%o" % 0755
end
+
+ it "should default to copy dangling symlinks as links" do
+ todir = tempfile
+ Dir.mkdir(todir)
+ dangling_link = File.join(@basedir, "dangling_link")
+ File.symlink("/some/where/else", dangling_link)
+ @symlink_resource = Puppet.type(:file).create(
+ :path => todir,
+ :source => @basedir,
+ :ensure => "directory",
+ :recurse => true
+ )
+
+ @catalog.add_resource @symlink_resource
+ @catalog.apply
+
+ Dir.entries(todir).should include ["dangling_link", "file", "link"]
+ end
end
end
--
1.5.3.4
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---