summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-10-27 12:10:36 -0500
committerLuke Kanies <luke@madstop.com>2008-11-04 16:20:45 -0600
commitb4f4866b452cad870e635a8c97e265bd47e3f5ff (patch)
treeee2e38027c9b6408561d8769bbcfabbd73e0189c /test
parentcaf15c27b84f2777d68e569cea11ef9534c44ed4 (diff)
downloadpuppet-b4f4866b452cad870e635a8c97e265bd47e3f5ff.tar.gz
puppet-b4f4866b452cad870e635a8c97e265bd47e3f5ff.tar.xz
puppet-b4f4866b452cad870e635a8c97e265bd47e3f5ff.zip
Making it so (once again) files with sources set can still be deleted
(which I think is kinda stupid, but apparently people want it). Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/ral/type/file.rb47
1 files changed, 0 insertions, 47 deletions
diff --git a/test/ral/type/file.rb b/test/ral/type/file.rb
index f14281d33..255b9e7eb 100755
--- a/test/ral/type/file.rb
+++ b/test/ral/type/file.rb
@@ -741,53 +741,6 @@ class TestFile < Test::Unit::TestCase
assert_events([], file)
end
- # Make sure that content gets used before ensure
- def test_contentbeatsensure
- dest = tempfile()
-
- file = nil
- assert_nothing_raised {
- file = Puppet.type(:file).create(
- :name => dest,
- :ensure => "file",
- :content => "this is some content, yo"
- )
- }
-
- currentvalues = file.retrieve
-
- assert_events([:file_created], file)
- file.retrieve
- assert_events([], file)
- assert_events([], file)
- end
-
- # Make sure that content gets used before ensure
- def test_deletion_beats_source
- dest = tempfile()
- source = tempfile()
- File.open(source, "w") { |f| f.puts "yay" }
-
- file = nil
- assert_nothing_raised {
- file = Puppet.type(:file).create(
- :name => dest,
- :ensure => :absent,
- :source => source
- )
- }
-
- file.retrieve
-
- assert_events([], file)
- assert(! FileTest.exists?(dest), "file was copied during deletion")
-
- # Now create the dest, and make sure it gets deleted
- File.open(dest, "w") { |f| f.puts "boo" }
- assert_events([:file_removed], file)
- assert(! FileTest.exists?(dest), "file was not deleted during deletion")
- end
-
def test_nameandpath
path = tempfile()