diff options
| author | Luke Kanies <luke@madstop.com> | 2008-10-27 12:10:36 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-11-04 16:20:45 -0600 |
| commit | b4f4866b452cad870e635a8c97e265bd47e3f5ff (patch) | |
| tree | ee2e38027c9b6408561d8769bbcfabbd73e0189c /test | |
| parent | caf15c27b84f2777d68e569cea11ef9534c44ed4 (diff) | |
| download | puppet-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-x | test/ral/type/file.rb | 47 |
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() |
